2011/3/13 Rico Schüller kgbricola@web.de:
- if (tag != 0xfeff0901)
Looks like the kind of thing you'd want a constant or inline function for. If I were to guess, the feff part means it's an effect (similar to the ffff for d3d9 pixel shaders and the fffe for d3d9 vertex shaders), and 0901 for version 9.1 (also similar to the d3d9 shader version token).
Am 13.03.2011 22:59, schrieb Henri Verbeet:
2011/3/13 Rico Schüllerkgbricola@web.de:
- if (tag != 0xfeff0901)
Looks like the kind of thing you'd want a constant or inline function for. If I were to guess, the feff part means it's an effect (similar to the ffff for d3d9 pixel shaders and the fffe for d3d9 vertex shaders), and 0901 for version 9.1 (also similar to the d3d9 shader version token).
Yes, it is the shader/effect version. I used the value because I was not able to generate other targets for d3dx9 with the current sdk.
I think a mask for the effect ((tag >> 16) == 0xfeff)) would be fine here. There shouldn't be a huge difference between the versions (tag & 0xffff), but I expect one.
I'll send an improved version.
Cheers Rico
2011/3/14 Rico Schüller kgbricola@web.de:
Yes, it is the shader/effect version. I used the value because I was not able to generate other targets for d3dx9 with the current sdk.
I think a mask for the effect ((tag >> 16) == 0xfeff)) would be fine here. There shouldn't be a huge difference between the versions (tag & 0xffff), but I expect one.
Checking for a specific version should be ok if that's all we support at the moment. But I think something like "d3dx9_effect_version(9, 1)" would be much clearer than 0xfeff0901.