PDA

View Full Version : Texture questions



morello
12-29-2010, 06:57 AM
How would I make a textured mesh shiny (the equivalent of GL_SPECULAR and GL_SHININESS for a material)? I don't need the specularity to vary across the mesh, but it needs to take account of normals.

Also, how would I apply a texture to the front surface of a mesh, but a material to the back surface? I know how to do this with two different materials, but not for a combination of a material and a texture.

carsten neumann
12-29-2010, 08:54 AM
I assume you are using the fixed function pipeline (aka. compatibility profile).
Lighting is still performed using the material properties you set up with glMaterial() calls. The texture is only put on top of that (if you use glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) that is).
I don't know how to make texturing only affect front faces with the fixed function pipeline, sorry.