Results 1 to 2 of 2

Thread: glColor Problem

  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 Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    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).]

Similar Threads

  1. trying to get 1st program to run : glcolor problem
    By meemoeuk in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-24-2016, 12:10 PM
  2. glColor problem
    By aus79er in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-28-2002, 10:08 AM
  3. glColor
    By jenny in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-22-2002, 07:13 PM
  4. glColor() problem
    By suresh kannan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-11-2001, 03:08 PM
  5. Crazy glColor problem
    By ribblem in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-06-2000, 09:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean