EffectStateManager Class (Microsoft.DirectX.Direct3D)

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

  • Effect.BeginPass is called.
  • Effect state is dynamically updated by calling the appropriate state change application programming interface (API). See individual method pages for details.

Definition

Visual Basic MustInherit Public Class EffectStateManager
    Inherits ObjectLeave Site
C# public abstract class EffectStateManager : ObjectLeave Site
C++ public ref class EffectStateManager abstract : ObjectLeave Site
JScript public abstract class EffectStateManager extends ObjectLeave Site

Members Table

The following table lists the members exposed by the object.

Methods

Method Description
EffectStateManager Initializes a new instance of the EffectStateManager class.
Finalize Allows the EffectStateManager object to free resources before it is destroyed by the garbage collector.
LightEnable Enables or disables a light.
SetLight Sets a light.
SetMaterial Sets a material.
SetNPatchMode Sets the number of subdivision segments for N-patches.
SetPixelShader Sets a pixel shader.
SetPixelShaderConstantBoolean Sets an array of pixel shader Boolean constants.
SetPixelShaderConstantInt32 Sets an array of pixel shader integer constants.
SetPixelShaderConstantSingle Sets an array of pixel shader floating-point constants.
SetRenderState Sets a render state.
SetSamplerState Sets a sampler state.
SetTexture Sets a texture.
SetTextureStageState Sets a texture stage state.
SetTransform Sets a transform.
SetVertexFormat Sets a vertex format code.
SetVertexShader Sets a vertex shader.
SetVertexShaderConstantBoolean Sets an array of vertex shader Boolean constants.
SetVertexShaderConstantInt32 Sets an array of vertex shader integer constants.
SetVertexShaderConstantSingle Sets an array of vertex shader floating-point constants.

Inheritance Hierarchy

ObjectLeave Site

EffectStateManager

Remarks

A user creates a class that inherits from EffectStateManager and implements all the methods. Once the derived class is created, you can get or set the state manager within an effect using Effect.StateManager.

Class Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3DX (microsoft.directx.direct3dx.dll)
Strong Name Microsoft.DirectX.Direct3DX,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492