本文整理汇总了C++中IDirect3DDevice9::GetRenderState方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirect3DDevice9::GetRenderState方法的具体用法?C++ IDirect3DDevice9::GetRenderState怎么用?C++ IDirect3DDevice9::GetRenderState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirect3DDevice9
的用法示例。
在下文中一共展示了IDirect3DDevice9::GetRenderState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Save
void CState::Save()
{
// viewport
m_D3DDev->GetViewport(&m_Vp);
// render states
m_D3DDev->GetRenderState(D3DRS_ZENABLE, &m_Z);
m_D3DDev->GetRenderState(D3DRS_CULLMODE, &m_CullMode);
m_D3DDev->GetRenderState(D3DRS_ALPHATESTENABLE, &m_AlphaTest);
m_D3DDev->GetRenderState(D3DRS_ALPHABLENDENABLE, &m_AlphaBlend);
m_D3DDev->GetRenderState(D3DRS_BLENDOP, &m_BlendOp);
m_D3DDev->GetRenderState(D3DRS_SRCBLEND, &m_SrcBlend);
m_D3DDev->GetRenderState(D3DRS_DESTBLEND, &m_DstBlend);
m_D3DDev->GetRenderState(D3DRS_CLIPPLANEENABLE, &m_ClipPlane);
m_D3DDev->GetRenderState(D3DRS_FILLMODE, &m_FillMode);
m_D3DDev->GetRenderState(D3DRS_LASTPIXEL, &m_LastPixel);
m_D3DDev->GetRenderState(D3DRS_FOGENABLE, &m_Fog);
m_D3DDev->GetRenderState(D3DRS_STENCILENABLE, &m_Stencil);
m_D3DDev->GetRenderState(D3DRS_COLORWRITEENABLE, &m_ColorWrite);
m_D3DDev->GetRenderState(D3DRS_SCISSORTESTENABLE, &m_Scissor);
if( m_Caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND )
m_D3DDev->GetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, &m_SeparateAlphaBlend);
//if( m_Caps.LineCaps & D3DLINECAPS_ANTIALIAS )
m_D3DDev->GetRenderState(D3DRS_ANTIALIASEDLINEENABLE, &m_AntiAliasedLine);
// primitive
m_D3DDev->GetFVF(&m_FVF);
m_D3DDev->GetStreamSource(0, &m_StreamData, &m_StreamOffset, &m_StreamStride);
m_D3DDev->GetVertexShader(&m_VertexShader);
// texture
m_D3DDev->GetTexture(0, &m_Tex);
m_D3DDev->GetPixelShader(&m_PixelShader);
// texture stage states
m_D3DDev->GetTextureStageState(0, D3DTSS_COLOROP, &m_ColorOp);
m_D3DDev->GetTextureStageState(0, D3DTSS_COLORARG1, &m_ColorArg1);
m_D3DDev->GetTextureStageState(0, D3DTSS_COLORARG2, &m_ColorArg2);
m_D3DDev->GetTextureStageState(0, D3DTSS_ALPHAOP, &m_AlphaOp);
m_D3DDev->GetTextureStageState(0, D3DTSS_ALPHAARG1, &m_AlphaArg1);
m_D3DDev->GetTextureStageState(0, D3DTSS_TEXCOORDINDEX, &m_TexCoordIndex);
m_D3DDev->GetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, &m_TexTransfFlags);
m_D3DDev->GetSamplerState(0, D3DSAMP_ADDRESSU, &m_AddressU);
m_D3DDev->GetSamplerState(0, D3DSAMP_ADDRESSV, &m_AddressV);
m_D3DDev->GetSamplerState(0, D3DSAMP_MAGFILTER, &m_MagFilter);
m_D3DDev->GetSamplerState(0, D3DSAMP_MINFILTER, &m_MinFilter);
m_D3DDev->GetSamplerState(0, D3DSAMP_MIPFILTER, &m_MipFilter);
}