![]() |
![]() |
Options for saving and creating effects.
Effect State Save and Restore Flags | ||
---|---|---|
Name | Description | Value |
D3DXFX_DONOTSAVESTATE | No state is saved when calling ID3DXEffect::Begin or restored when calling ID3DXEffect::End. | (1 << 0) |
D3DXFX_DONOTSAVESAMPLERSTATE | A stateblock saves state when calling ID3DXEffect::Begin and restores state when calling ID3DXEffect::End. | (1 << 2) |
D3DXFX_DONOTSAVESHADERSTATE | A stateblock saves state (except shaders and shader constants) when calling ID3DXEffect::Begin and restores state when calling ID3DXEffect::End. | (1 << 1) |
Effect Creation Flag | ||
Name | Description | Value |
D3DXFX_NOT_CLONEABLE | The effect will be non-cloneable and will not contain any shader binary data. ID3DXBaseEffect::GetPassDesc will not return shader function pointers. Setting this flag reduces effect memory usage by about 50% because it eliminates the need for the effect system to keep a copy of the shaders in memory. This flag is used by D3DXCreateEffect, D3DXCreateEffectFromFile, and D3DXCreateEffectFromResource. | (1 << 11) |
The effect system uses state blocks to save and restore state automatically. For more information about state blocks, see State Blocks Save and Restore State.