?/TD>
Microsoft DirectX 9.0

Usages and Literals


Usage

Usage is similar to a parameter's scope, because it defines the scope in which the parameter is valid.

ValueDescription
constThe parameter will be constant within the scope of all functions. (Note that such parameters can still be written to with either ID3DXEffect or ID3DXEffectCompiler, because this occurs outside the scope of all functions.)
sharedThe parameter will be shared in the effect pool.
staticThe parameter will be invisible to the application, that is, you cannot access them from ID3DXEffectCompiler or ID3DXEffectCompiler.

Literals

Marking a parameter as literal indicates that its value will never change. This enables the effect compiler to do extra optimization.

Only non-shared top-level parameters can be marked as literal. Parameters can only be marked as literal with ID3DXEffectCompiler. Literal values cannot be set with ID3DXEffect.



© 2002 Microsoft Corporation. All rights reserved.