Isn't it strange that glTexEnv still functions when using GLSL shaders? Shouldn't it be disabled after having called glUseProgram? Specifically, the effect of glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD) for example, affects how pixels are combined independently of what you have coded in your shaders.
Perhaps I am missing something...
GLSL and glTexEnv
Assuming a GL 2.x context, the vertex and fragment processing pipelines can independently be switched from fixed function to shaders. If your shader program contains a vertex shader without a fragment shader, then enabling it will leave the fixed function fragment processing active (and vice-versa).
Except for specific cases, it's generally not considered good practice to do that though.
Except for specific cases, it's generally not considered good practice to do that though.
This may be driver-dependent behaviour. Per the specs, glTexEnv should have no effect whatsoever, but your driver may be taking shortcuts, including not checking if shaders are being used before setting glTexEnv modes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement