When an application uses the state manager to implement custom callbacks, an effect no longer automatically saves and restores state when calling ID3DXEffect::BeginPass and ID3DXEffect::EndPass. Because the application has implemented a custom save and restore behavior in the callbacks, this automatic behavior is bypassed.
Method | Description |
---|---|
ID3DXEffectStateManager::LightEnable | A callback function that must be implemented by a user to enable/disable a light. |
ID3DXEffectStateManager::SetFVF | A callback function that must be implemented by a user to set a FVF code. |
ID3DXEffectStateManager::SetLight | A callback function that must be implemented by a user to set a light. |
ID3DXEffectStateManager::SetMaterial | A callback function that must be implemented by a user to set material state. |
ID3DXEffectStateManager::SetNPatchMode | A callback function that must be implemented by a user to set the number of subdivision segments for N-patches. |
ID3DXEffectStateManager::SetPixelShader | A callback function that must be implemented by a user to set a pixel shader. |
ID3DXEffectStateManager::SetPixelShaderConstantB | A callback function that must be implemented by a user to set an array of vertex shader Boolean constants. |
ID3DXEffectStateManager::SetPixelShaderConstantF | A callback function that must be implemented by a user to set an array of vertex shader floating-point constants. |
ID3DXEffectStateManager::SetPixelShaderConstantI | A callback function that must be implemented by a user to set an array of vertex shader integer constants. |
ID3DXEffectStateManager::SetRenderState | A callback function that must be implemented by a user to set render state. |
ID3DXEffectStateManager::SetSamplerState | A callback function that must be implemented by a user to set a sampler. |
ID3DXEffectStateManager::SetTexture | A callback function that must be implemented by a user to set a texture. |
ID3DXEffectStateManager::SetTextureStageState | A callback function that must be implemented by a user to set the texture stage state. |
ID3DXEffectStateManager::SetTransform | A callback function that must be implemented by a user to set a transform. |
ID3DXEffectStateManager::SetVertexShader | A callback function that must be implemented by a user to set a vertex shader. |
ID3DXEffectStateManager::SetVertexShaderConstantB | A callback function that must be implemented by a user to set an array of vertex shader Boolean constants. |
ID3DXEffectStateManager::SetVertexShaderConstantF | A callback function that must be implemented by a user to set an array of vertex shader floating-point constants. |
ID3DXEffectStateManager::SetVertexShaderConstantI | A callback function that must be implemented by a user to set an array of vertex shader integer constants. |
A user creates an ID3DXEffectStateManager interface by implementing a class that derives from this interface, and implementing all the interface methods. Once the interface is created, you can get or set the state manager within an effect using ID3DXEffect::GetStateManager and ID3DXEffect::SetStateManager.
The LPD3DXEFFECTSTATEMANAGER type is defined as a pointer to this interface.
typedef interface ID3DXEffectStateManager ID3DXEffectStateManager; typedef interface ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;