Aeluned
05-17-2004, 07:08 AM
Also,
has anyone used structures in their shaders?
I'm having some difficulty doing so.
I have this declared globally:
struct TexInfo
{
uniform sampler2D tex; //texture unit
uniform int method; //method(reflective,projected,etc...)
uniform int application;//Blend,Decal,Modulate, etc...
};
uniform TexInfo textureInfo[4];
then in a function later on i have:
if(textureInfo[i].method == reflective)
{
do something...
}
the program compiles but fails to link.
thanks in advance.
has anyone used structures in their shaders?
I'm having some difficulty doing so.
I have this declared globally:
struct TexInfo
{
uniform sampler2D tex; //texture unit
uniform int method; //method(reflective,projected,etc...)
uniform int application;//Blend,Decal,Modulate, etc...
};
uniform TexInfo textureInfo[4];
then in a function later on i have:
if(textureInfo[i].method == reflective)
{
do something...
}
the program compiles but fails to link.
thanks in advance.