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

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:

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