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

Thread: Crazy glColor problem

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Posts
    116

    Crazy glColor problem

    I'm setup all the framework for an openGL program and I've got this crazy problem. Take a look at the following lines:

    glBegin(GL_TRIANGLES);
    glColor3f(1.0f,1.0f,1.0f);
    glVertex2f(0,0);
    glVertex2f(50,0);
    glVertex2f(0,50);
    glEnd();

    That's as simple as it gets but for some reason my triangle is a very dark green. I don't get it. Why isn't it white? I tried changing the color to a darker color and I can make the triangle black, I just can't get it to be any brighter than dark green.

    Has anyone seen anything like this?

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Crazy glColor problem

    stick this in front
    glDisable(GL_LIGHTING);
    glDisable(GL_TEXTURE_2D);

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Posts
    116

    Re: Crazy glColor problem

    Thanks,

    I didn't think I had enabled textures anywhere but I did. Stupid me.

Posting Permissions

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