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 7 of 7

Thread: Texture Changes Color

Threaded View

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    4

    Question Texture Changes Color

    I'm having some issues with my textures affecting the color of non-textured polygons. From the 'Color mixed with texture' thread, I saw this: "Yes, when your glTexEnv mode is MODULATE, then the final color is glColor*texture*lighting."

    How can I arrange it so that my final color is only glColor*lighting? I'm using OpenGL 2.1.

    Right now I've got this:
    Code :
        if (enableLighting)
        {
            glEnable(GL_LIGHTING);
            glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ambientDiffuse->toArray());
        }//if enableLighting
        else
        {
            glDisable(GL_LIGHTING);
            glColor4fv(ambientDiffuse->toArray());
        }//else enableLighting
    Last edited by Ebonair; 07-27-2012 at 02:14 PM. Reason: Changed glColor*texture to glColor*lighting

Posting Permissions

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