void glMenuPrintHighlight(int x,int y,int z,int q,const char *fmt,...)
{
char str[1000];
int prev_i = 0,i = 0;
va_list ap;
va_start(ap, fmt);
vsprintf(str, fmt, ap);
va_end(ap);
glListBase(MenuFontOffset-32);
while( 1 )
{
glWindowPos3i(x,y,z);
if( i == 0 )
glColor4f(0,0,0,1);
else
glColor4f(0.9921875, 0.8125, 0.26953125, 1.0);
while( str && str != '\n' )
i++;
glCallLists(i-prev_i, GL_UNSIGNED_BYTE, (GLubyte *)(str+prev_i));
if( !str )
break;
i++;
prev_i = i;
y -= 20;
q--;
}
}
glCallLists drives me nuts
The raster color is copied from the primary color when you set the raster position. You need to set the primary color before glWindowPos so the correct raster color is set also.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement