LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: madeinsoviets on February 18, 2011, 15:34:49

Title: Validation warning! Sampler value sampler02 has not been set in fragment shader
Post by: madeinsoviets on February 18, 2011, 15:34:49
Guys, i just cannot get it...
i'm using two uniforms in fragment shader - both samplers (sampler01 and sampler02)

uniform sampler2D sampler01;
uniform sampler2D sampler02;

in vec2 texCoord;

void main(){
    gl_FragColor = texture(sampler01, texCoord) * texture(sampler02, texCoord);
}


It always tell me that "Validation warning! - Sampler value sampler02 has not been set in fragment shader
Validation successful."

But i'm almost sure that i done everything correct - i have correct results in rendering and i also tryed to switch some stuff and so on..
Does anyone have any ideas why i continue get those warnings?

Simplifyed rendering code:
glLoadIdentity();

gluLookAt(0, 0, -5, 0, 0, 0, 0, 1, 0);

vertBuff.bindBuffer();
glVertexPointer(3, GL_FLOAT, 0, 0);

indBuff.bindBuffer();

program.bind();

texCoords.send(texCoordBuff, 2);

// Tex 1
tex1.bind(0);
sampler01.send(0);

// Tex 2
tex2.bind(1);
sampler02.send(1);

glDrawElements(GL_TRIANGLES, indBuff.getIntCnt(), GL_UNSIGNED_INT, 0);