Effect System Interfaces (Direct3D 10)

The effect system defines several interfaces for managing effect state. There are two types of interfaces: those used by the runtime to render an effect and reflection interfaces for getting and setting effect variables.

Effect Runtime Interfaces

Use runtime interfaces to render an effect.

Runtime Interfaces Description
ID3D10Effect Interface Collection of one or more techniques for rendering.
ID3D10Include Interface An interface for adding custom behaviors when reading include files.
ID3D10EffectPass Interface A collection of state assignments.
ID3D10EffectPool Interface Create a memory location for variables to be shared between effects.
ID3D10EffectTechnique Interface A collection of one or more passes.

 

Effect Reflection Interfaces

Reflection is implemented in the effect system to support reading (and writing) effect state. There are multiple ways to access effect variables.

Setting Groups of Effect State

Use these interfaces to get and set a group of state.

Reflection Interfaces Description
ID3D10EffectBlendVariable Interface Get and set blend state.
ID3D10EffectDepthStencilVariable Interface Get and set depth-stencil state.
ID3D10EffectRasterizerVariable Interface Get and set rasterizer state.
ID3D10EffectSamplerVariable Interface Get and set sampler state.

 

Setting Effect Resources

Use these interfaces to get and set resources.

Reflection Interfaces Description
ID3D10EffectConstantBuffer Interface Access data in a texture buffer or constant buffer.
ID3D10EffectDepthStencilViewVariable Interface Access data in a depth-stencil resource.
ID3D10EffectRenderTargetViewVariable Interface Access data in a render target.
ID3D10EffectShaderResourceVariable Interface Access data in a shader resource.

 

Setting Other Effect Variables

Use these interfaces to get and set state by the variable type.

Reflection Interfaces Description
ID3D10EffectMatrixVariable Interface Get and set a matrix.
ID3D10EffectScalarVariable Interface Get and set a scalar.
ID3D10EffectShaderVariable Interface Get and set a shader variable.
ID3D10EffectStringVariable Interface Get and set a string.
ID3D10EffectType Interface Get a variable type.
ID3D10EffectVectorVariable Interface Get and set a vector.

 

All reflection interfaces derive from ID3D10EffectVariable Interface.

Effects

Programming Guide for Direct3D 10