ID3DXEffectStateManager interface

This is a user-implemented interface that allows a user to set the device state from an effect. Each of the methods in this interface must be implemented by the user and will then be used as callbacks to the application when either of the following occur:

  • An effect calls ID3DXEffect::BeginPass.
  • Effect state is dynamically updated by calling the appropriate state change API. See individual method pages for details.

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.

Members

The ID3DXEffectStateManager interface inherits from the IUnknown interface. ID3DXEffectStateManager also has these types of members:

Methods

The ID3DXEffectStateManager interface has these methods.

Method Description
LightEnable A callback function that must be implemented by a user to enable/disable a light.
SetFVF A callback function that must be implemented by a user to set a FVF code.
SetLight A callback function that must be implemented by a user to set a light.
SetMaterial A callback function that must be implemented by a user to set material state.
SetNPatchMode A callback function that must be implemented by a user to set the number of subdivision segments for N-patches.
SetPixelShader A callback function that must be implemented by a user to set a pixel shader.
SetPixelShaderConstantB A callback function that must be implemented by a user to set an array of vertex shader Boolean constants.
SetPixelShaderConstantF A callback function that must be implemented by a user to set an array of vertex shader floating-point constants.
SetPixelShaderConstantI A callback function that must be implemented by a user to set an array of vertex shader integer constants.
SetRenderState A callback function that must be implemented by a user to set render state.
SetSamplerState A callback function that must be implemented by a user to set a sampler.
SetTexture A callback function that must be implemented by a user to set a texture.
SetTextureStageState A callback function that must be implemented by a user to set the texture stage state.
SetTransform A callback function that must be implemented by a user to set a transform.
SetVertexShader A callback function that must be implemented by a user to set a vertex shader.
SetVertexShaderConstantB A callback function that must be implemented by a user to set an array of vertex shader Boolean constants.
SetVertexShaderConstantF A callback function that must be implemented by a user to set an array of vertex shader floating-point constants.
SetVertexShaderConstantI A callback function that must be implemented by a user to set an array of vertex shader integer constants.

 

Remarks

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;

Requirements

Requirement Value
Header
D3DX9Effect.h
Library
D3dx9.lib

See also

Effect Interfaces