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

Thread: glLightModel*(...)

  1. #1
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    22

    glLightModel*(...)

    I have the following line in my code:

    glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR);

    , but GL_SINGLE_COLOR is an undeclared identifier. I am pretty sure I included all includes. They are:

    #include <cmath>
    #include <GL/gl.h>
    #include <GL/glu.h>
    #include <GL/glut.h>

    What could be a solution to this problem?

    Thank you,
    -TS...

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2005
    Posts
    8

    Re: glLightModel*(...)

    What compiler are you using?

    If it's a GCC compiler, are you sure you're linking the libraries in?
    ----
    "I aspire, sir, to be better than I am." - Data, Star Trek: Nemesis

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: glLightModel*(...)

    Make sure you have headers for OpenGL 1.2 or later. Or get a copy of glext.h.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

  4. #4
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    22

    Re: glLightModel*(...)

    I'm using Visual C++ 6.0 ...
    It works for GCC compiling, but not for VSC++ 6.0 :\ I have rare opportunities to access a GCC compiler since I'm mostly at home and unable to reach the office computers. Hence I must use a Windows O/S.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    147

    Re: glLightModel*(...)

    http://oss.sgi.com/projects/ogl-sample/registry/

    GL_SINGLE_COLOR is defined in glext.h

Posting Permissions

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