Add Parameter Information with Annotations
Annotations are user-specific data that can be attached to any technique, pass, or parameter. An annotation is a flexible way to add information to individual parameters. The information can be read back and used any way the application chooses. An annotation can be of any data type and can be added dynamically. Annotation declarations are delimited by angle brackets. An annotation contains:
- A data type.
- A variable name.
- An equals sign (=).
- The data value.
- A ending semicolon (;).
For instance, both of the previous examples in this paper contain this annotation:
texture Tex0 < string name = "tiger.bmp"; >;
The annotation is attached to the texture object and specifies the texture file that should be used to initialize the texture object. The annotation does not initialize the texture object, it is simply a piece of user information that is attached to the variable. An application can read the annotation with either ID3DXBaseEffect::GetAnnotation or ID3DXBaseEffect::GetAnnotationByName to return the string. Annotations can also be added by the application.
- Must be either numeric or strings.
- Must always be initialized with a default value.
- Can be associated with Techniques and Passes (Direct3D 9) and top-level Effect Parameters.
- Can be written to and read from with either ID3DXEffect or ID3DXEffectCompiler.
- Can be added with ID3DXEffect.
- Cannot be referenced inside the effect.
- Cannot have sub-semantics or sub-annotations.
but how to get the Annotations in directx 10/11?
we can get ID3D10Effect interface. but i can't find a member function which can be used to get the annotaions.
does the directx10 effect support annotation?