XNA Creators Club Online
Page 1 of 1 (10 items)
Sort Posts: Previous Next

Technique annotations; difference between Xbox and PC

Last post 09/10/2007 12:07 by Matt Godbolt. 9 replies.
  • 04/10/2007 9:37

    Technique annotations; difference between Xbox and PC

    I've just added support for annotations on techniques to our engine.  This works fine on windows, but on the Xbox 360, the annotations come through as empty.

    E.g. for:

    technique FontHighlight
    <
        string blend = "additive";
        bool cull = false;
        bool zenable = false;
    >
    { ... }


    On Windows I read CurrentTechnique.Annotations has a count of three, and looking in the structure I can see all the names and parameters.  My "reader" code of things like:
    EffectAnnotation blendAnnotation = annotations["blend"];
    if (blendAnnotation != null)
    {
    switch (blendAnnotation.GetValueString())
    {
    ...
    }

    happily find the annotation and all's well.

    But on the Xbox, the CurrentTechnique.Annotations has a count of 3, but the reader code never "finds" the annotations.  Similarly if I look into the structure manually, I see three annotations._passes._items, but each has a Name of "", a ParameterClass of "Scalar", RowCount of 0 and a type of "Void", regardless of the actual annotation.

    I can't see any reference in the documentation about annotations being windows-only; and as the "count" of annotations is correct, just not the data, I wondered if this was a bug in the Xbox XNA framework - or am I missing something?

    Cheers for any help offered.  As you might have realised I'm trying to reimplement the renderstate system in a way which allows me to modify each Effect's render states on the fly - if I specify "AlphaBlendEnable = ..." in the pass, everything works, but I can't then find out at runtime what the current alpha blend state is, nor can I turn it on and off.  So any thoughts on that appreciated too!
  • 04/10/2007 9:42 In reply to

    Re: Technique annotations; difference between Xbox and PC

    A little more information; dumping the Windows and Xbox shader XNB files in a hex editor, I can clearly see all the annotations in the Windows version.  However, the technique annotations are missing in the Xbox XNB file, although I can see some of the author-time annotations we use on the parameters.
  • 04/10/2007 9:43 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Scratch that; apologies - I *can* see the annotations in the Xbox XNB file.  Which makes it even more confusing as to why they aren't appearing at run time.
  • 04/10/2007 10:29 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Can someone from Microsoft weigh in on this?  I am implementing DxSas effect scripting for my engine and I'm concerned if annotations aren't available on XBox, it will totally break my scene manager.
  • 04/10/2007 11:51 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Sounds like this could be a bug: file it on connect and we'll take a look.

    I assume annotations for things other than techniques are coming through ok?
    XNA Framework Developer - blog - homepage
  • 04/10/2007 12:26 In reply to

    Re: Technique annotations; difference between Xbox and PC

    I'll check on the other annotations, then raise a connect issue as you suggest - thanks.
  • 04/10/2007 12:44 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Parameter annotations come through ok.  Upon looking at Connect, there's a similar problem with EffectPass annotations not coming through : https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=282526&SiteID=226

    I've added my technique issue as a comment to this; it would seem likely they're related.
  • 09/10/2007 3:54 In reply to

    Re: Technique annotations; difference between Xbox and PC

    According to Connect; this bug (and many others, apparently) has just been closed.  Fingers crossed there's a release soon!
  • 09/10/2007 12:05 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Bugs are marked closed on connect whenever we import them into our internal tracking system.

    The two systems aren't quite as integrated as one might like :-)
    XNA Framework Developer - blog - homepage
  • 09/10/2007 12:07 In reply to

    Re: Technique annotations; difference between Xbox and PC

    Righto Shawn, thanks for that -- you got my hopes up!  For now looks like I'll have to fall back on magic naming conventions of the Techniques themselves.  Cheers :)
Page 1 of 1 (10 items) Previous Next