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!