Jump to content
  • Advertisement
Sign in to follow this  
db123

how to get the Annotations of D3D10 Effect?

This topic is 2429 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I find these api in directx 9.

Add Parameter Information with Annotations
[color=#2A2A2A]
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 (;).
    [color=#2A2A2A]
    For instance, both of the previous examples in this paper contain this annotation:[color=#000000]







    texture Tex0 < string name = "tiger.bmp"; >;


    [color=#2A2A2A]
    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.[color=#2A2A2A]
    Each annotation:

    • 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.

      [/quote]

      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?sad.png sad.png sad.png

Share this post


Link to post
Share on other sites
Advertisement
[color=#ff0000]resolved:
[color=#ff0000]GetAnnotationByIndex Get an annotation by index.

[color=#ff0000]GetAnnotationByName Get an annotation by name.

[color=#ff0000]this is in the ID3D10EffectVariable Interface.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!