Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Texture questions

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2010
    Posts
    7

    Texture questions

    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.

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2010
    Posts
    491

    Re: Texture questions

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •