![]() |
![]() |
![]() |
An annotation is metadata attached to a parameter that can be used by an effect to get additional information about a parameter's intended usage. Instead of creating naming guidelines for parameters, Microsoft has created a set of industry-standard annotations. Parameters do not have to use annotation scripts. To get more information about using standard semantics and standard annotations, see Using Standard Semantics and Standard Annotations.
Annotation scripts are declared with the following syntax:
String scriptType = "[ScriptCommand]";
Where:
ScriptExecute | An entry point for scripts. It can only be placed on techniques and the parameter marked with the StandardsGlobal semantic superset of ScriptFunction. |
ScriptFunction | The script or partial script describing operation of this file. |
ScriptSetup | An entry-point script used for setup of existing state. |
The syntax for a ScriptCommand is:
[ScriptCommand] = [Command]; [Command]; [ScriptCommand] [Command]=[Argument]; [Command]=[Argument]; [ScriptCommand] [Command] = command (see command section below) [Argument]= [Value] [Value]![Hint] [Value]= [Option:string] [Option: variable] [Option:string]=string string,[Option:string] [Option: parameter]= parameter_name parameter_name,[Option: parameter] [Hint]= parameter_name (which will selects the option by index) string (which helps the user select the option by index)
Where:
Use:
Script Commands | Description |
---|---|
ClearSetColor | Clear the rendertarget to this color. |
ClearSetDepth | Clear the rendertarget depth buffer to this value. |
ClearSetStencil | Clear the rendertarget stencil buffer to this value. |
Draw |
|
GeometryList | Draw order hint.
|
Hint | Callback hint to the application. |
LoopByType | Control the draw loop when parameter changes are expected or multiple passes are required.
|
LoopByCount | Override LoopByType. LoopByCount must precede LoopByType. |
LoopEnd | End of a loop. |
LoopGetCount | Loop iteration count. |
LoopGetIndex | Loop index count. |
Pass | Pass name or number. |
RenderColorTarget | Color rendertarget, whose value is one of the following:
|
RenderDepthStencilTarget | Depth/stencil rendertarget, whose value is one of the following:
|
Technique | Technique name or number. |