IDirect3DDevice9::BeginStateBlock 方法 (d3d9.h)
指示 Direct3D 开始记录设备状态块。
语法
HRESULT BeginStateBlock();
返回值
类型: HRESULT
如果该方法成功,则返回值D3D_OK。 如果方法失败,则返回值可以是下列值之一:D3DERR_INVALIDCALL、E_OUTOFMEMORY。
备注
在调用此方法之前,应用程序可以通过调用 IDirect3DDevice9::ValidateDevice 方法确保所有记录的状态都有效。
以下方法可以在调用 IDirect3DDevice9::BeginStateBlock 之后和 IDirect3DDevice9::EndStateBlock 之前记录在状态块中。
- IDirect3DDevice9::LightEnable
- IDirect3DDevice9::SetClipPlane
- IDirect3DDevice9::SetCurrentTexturePalette
- IDirect3DDevice9::SetFVF
- IDirect3DDevice9::SetIndices
- IDirect3DDevice9::SetLight
- IDirect3DDevice9::SetMaterial
- IDirect3DDevice9::SetNPatchMode
- IDirect3DDevice9::SetPixelShader
- IDirect3DDevice9::SetPixelShaderConstantB
- IDirect3DDevice9::SetPixelShaderConstantF
- IDirect3DDevice9::SetPixelShaderConstantI
- IDirect3DDevice9::SetRenderState
- IDirect3DDevice9::SetSamplerState
- IDirect3DDevice9::SetScissorRect
- IDirect3DDevice9::SetStreamSource
- IDirect3DDevice9::SetStreamSourceFreq
- IDirect3DDevice9::SetTexture
- IDirect3DDevice9::SetTextureStageState
- IDirect3DDevice9::SetTransform
- IDirect3DDevice9::SetViewport
- IDirect3DDevice9::SetVertexDeclaration
- IDirect3DDevice9::SetVertexShader
- IDirect3DDevice9::SetVertexShaderConstantB
- IDirect3DDevice9::SetVertexShaderConstantF
- IDirect3DDevice9::SetVertexShaderConstantI
要求
目标平台 | Windows |
标头 | d3d9.h (包括 D3D9.h) |
Library | D3D9.lib |