Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Display Lists and glColor problem

This topic is 6003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ()
	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);
	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);
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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!