mkhouzam
05-31-2007, 08:06 AM
Hello, I am working on a driver for windows, I would like to know if GLSL needs to support structs of samplers.
I went through the specs and couldn't find evidence pointing either way.
Basically, would this be OK glsl code or something that only CG would compile.
struct HappyTexture{
Sampler2D myTexture;
char myTextureName[16];
};
uniform HappyTextures myTex[3];
main()
{
// do shader voodoo to myTex[n].myTexture
...
}}
I went through the specs and couldn't find evidence pointing either way.
Basically, would this be OK glsl code or something that only CG would compile.
struct HappyTexture{
Sampler2D myTexture;
char myTextureName[16];
};
uniform HappyTextures myTex[3];
main()
{
// do shader voodoo to myTex[n].myTexture
...
}}