Hi
I am getting some strange (and random) errors when trying to use a shader.
Fragment info
-------------
0(14) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
0(14) : error C0501: type name expected at token "<undefined>"
This is a simple shader just taking the color from the the first texture
Vertex:
void main() {
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
}
Fragment:
uniform sampler2D Texture0;
uniform sampler2D Texture1;
void main() {
vec4 tex0, tex1;
tex0 = texture2D(Texture0, gl_TexCoord[0].st);
tex1 = texture2D(Texture1, gl_TexCoord[0].st);
gl_FragColor = tex1;
}
I've run this code some times, and sometimes I get the error, sometimes I don't. But I can't see any syntax errors?
I set the TextureX-variables like this:
glUniform1i(glGetUniformLocation(programID, "Texture0"), tex0);
[Edited by - Terrimus on November 26, 2009 11:20:05 AM]