hello,
i am about to port all my rendering from "old" opengl to glsl.
now i have a mesh with different textures, so in "old" gl i just used bindTexture to change the texture. i guess, i still need to do this, but something is missing, since my everything seems to be rendered with the first texture only.
uniform sampler2D tex;
void main() {
gl_FragColor = tex2D(tex, gl_TexCoord[0].st);
}
"tex" is the name of the texture which i put to glsl like this:
int loc = glGetUniformLocationARB(id, "tex");
glUniform1iARB(loc, 0);
note: i am not talking about multitexturing! :-)