Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Signals Direct3D to begin recording a device-state block.
Syntax
HRESULT BeginStateBlock();
Return value
Type: HRESULT
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
Remarks
Applications can ensure that all recorded states are valid by calling the IDirect3DDevice9::ValidateDevice method prior to calling this method.
The following methods can be recorded in a state block, after calling IDirect3DDevice9::BeginStateBlock and before 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
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d9helper.h (include D3D9.h) |
Library | D3D9.lib |