Jump to content
  • Advertisement

Archived

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

slashandburn

Wrong Color on "Bitmap Fonts"

This topic is 5965 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 using NeHe's "Bitmap Fonts" example in my project, And it will change colors or become darker based on what i render before the text. How can i fix this? [edited by - slashandburn on April 18, 2002 6:07:28 PM]

Share this post


Link to post
Share on other sites
Advertisement
This is my code, What could bewrong?

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);


glLoadIdentity();
glTranslatef(0,-1,-6);
glCallList(miscmesh[17]);

glLoadIdentity();
glTranslatef(0,-1,-6);
glCallList(miscmesh[19]);

glLoadIdentity();
glTranslatef(0,-1,-6);
glCallList(miscmesh[20]);

glLoadIdentity();
glTranslatef(-3.4,2,-10.0);
glCallList(rustmesh);

glColor4f(1.0f,1.0f,1.0f,0.5f);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);

glEnable(GL_BLEND);
glDisable(GL_DEPTH_TEST);

glLoadIdentity();
glTranslatef(0,-1,-6);
glCallList(miscmesh[18]);

glDisable(GL_BLEND);
glEnable(GL_DEPTH_TEST);


//glDisable(GL_DEPTH_TEST);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-10.0f);
glColor3f(1.0, 0.0, 0.0);
glRasterPos2f(-5.25,3.4);
glPrint("Land : ");
glPrint(data.info.name.c_str());
glRasterPos2f(-5.25,3.18);
glPrint("Fish : ");
glPrint("%3i",data.info.numberfish);
glRasterPos2f(-5.25,2.98);
glPrint("Evil : ");
glPrint("%3i",data.info.numberpred);
glRasterPos2f(-5.25,2.78);
glPrint("Info : ");
glPrint(data.info.description.c_str());

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!