Display Lists and glColor problem

Started by
0 comments, last by SCRUB 22 years, 3 months ago
Im having a problem with display lists and glColor, for some reason when I Print using White it come out in my previous set color of red !!!!!! here is a cut down version of my code
  
////////////////////////////////////////////

void Display ()
{
	glClear (GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	glLoadIdentity ();
	glColor3f (1.0f, 0.0f, 0.0f);	(==RED===)
	console.DrawConsole (CON_DROP);
}

/////////////////////////////////////////////

console::DrawConsole ()
{
	vec4_t color(0.8f, 0.8f, 0.8f,0.75f); (==WHITE==)

	glRasterPos2f (rasPosX, rasPosY);
	if (!text->Print2D (fontName, color, "] %s",inputtext))		(==pass the White==)
		error_t::File ("error.log", "error printing console input text");
}
//////////////////////////////////////////////

text::Print2d ()
{
#ifdef _DEBUG
	vec4_t colortest;
	glGetFloatv (GL_CURRENT_COLOR, colortest.v);
#endif
	glColor4f (color.v[0], color.v[1], color.v[2], color.v[3]);	
	glDisable (GL_TEXTURE_2D);							
	glListBase (base);								
	glCallLists (strlen (text), GL_UNSIGNED_BYTE, text);	
	glEnable (GL_TEXTURE_2D);							
#ifdef _DEBUG
	glGetFloatv (GL_CURRENT_COLOR, colortest.v);
#endif	
}
  
now GL_CURRENT_COLOR returns RED just before setting the color to WHITE. Then I call GL_CURRENT_COLOR after and its WHITE !!! what simple thing/rule am I missing ?? thanks p.s. I did a search and couldnt find anyhting
LE SCRUB
Advertisement
gots it.
the color is set when you call glRasterPos.
thanks
LE SCRUB

This topic is closed to new replies.

Advertisement