ID3D10Effect::Optimize method (d3d10effect.h)
Minimize the amount of memory required for an effect.
Syntax
HRESULT Optimize();
Return value
Type: HRESULT
Returns one of the following Direct3D 10 Return Codes.
Remarks
An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the API. You can minimize the amount of memory required by an effect by calling ID3D10Effect::Optimize which removes the reflection metadata from memory. API methods to read variables will no longer work once reflection data has been removed.
The following methods will fail after Optimize has been called on an effect.
- ID3D10Effect::GetConstantBufferByIndex
- ID3D10Effect::GetConstantBufferByName
- ID3D10Effect::GetDesc
- ID3D10Effect::GetDevice
- ID3D10Effect::GetTechniqueByIndex
- ID3D10Effect::GetTechniqueByName
- ID3D10Effect::GetVariableByIndex
- ID3D10Effect::GetVariableByName
- ID3D10Effect::GetVariableBySemantic
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d10effect.h |