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: glColor Problem

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    21

    glColor Problem

    Hi I am displaying text using Outline fonts.
    As per OpenGL documentation the glColor() and glCallLists() calls should be within glBegin() and glEnd(). What should be the mode for glBegin(...)?.

    glBegin(?);
    glColor4f(Red,Green,Blue,Alpha);
    glCallLists(strlen(string),GL_UNSIGNED_BYTE, string);
    glEnd();

    Thanks,
    Kannan A S

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: glColor Problem

    You actually do not need to use glBegin in this case. The glBegin/glEnd commands are compiled in the display list when you call wglUseFontOutlines.

    So, the only thing you have to do is:

    Code :
    glColor4f(Red,Green,Blue,Alpha);
    glCallLists(strlen(string),GL_UNSIGNED_BYTE, string);
    Regards.

    Eric

    P.S.: actually, if you add glBegin/glEnd around these calls, chances are that nothing will appear (you are not allowed to use glBegin between glBegin/glEnd !).

    [This message has been edited by Eric (edited 07-10-2001).]

Posting Permissions

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