Standard Annotation Scripting Syntax
Microsoft DirectX 9.0 SDK Update (October 2004)

Standard Annotation Scripting Syntax


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.

Syntax

Annotation scripts are declared with the following syntax:

String scriptType = "[ScriptCommand]";

Where:

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

Script CommandsDescription
ClearSetColorClear the rendertarget to this color.
ClearSetDepthClear the rendertarget depth buffer to this value.
ClearSetStencilClear the rendertarget stencil buffer to this value.
Draw
  • Scene - draw all geometry.
  • Geometry - draw inside of a geometry loop. Only one Microsoft Direct3D draw call should be performed per loop outside of a geometry loop.
  • Buffer - draw a full screen quad.
  • Arbitrary - string of draw instructions that a specialized program would understand.
GeometryListDraw order hint.
  • ZFrontToBack
  • ZBackToFront
  • Scene
  • Arbitrary
HintCallback hint to the application.
LoopByTypeControl the draw loop when parameter changes are expected or multiple passes are required.
  • Passes - draw all passes.
  • Lights - draw with each light enabled.
  • Geometry - draw all geometry that uses a particular material.
  • RenderTargets - draw all render targets.
  • Arbitrary
LoopByCountOverride LoopByType. LoopByCount must precede LoopByType.
LoopEndEnd of a loop.
LoopGetCountLoop iteration count.
LoopGetIndexLoop index count.
PassPass name or number.
RenderColorTargetColor rendertarget, whose value is one of the following:
  • Texture name
  • Blank to reset to default
RenderDepthStencilTargetDepth/stencil rendertarget, whose value is one of the following:
  • texture name
  • Blank to reset to default
TechniqueTechnique name or number.


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.