simple texture

Say that i have two textures. One that is given to my uniform(tex) and another one is used when I render.


//This is my code
glTexCoord2f (f.vert[i].texture.u, 
              f.vert[i].texture.v);

“texture” is another texture then was given to the uniform. What will happend?

Vertex shader

void main () {
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_Position = ftransform();
} 

Fragment shader

uniform sampler2D tex;
	
void main() {
	vec4 color = texture2D(tex,gl_TexCoord[0].st);
	gl_FragColor = color;
}

Hope my question is clear?

For a fragment shader enabled rendering, fragment shader will use the first texture.“One that is given to my uniform(tex)”.

U can use other texture mapped rendering by disabling the shader.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.