# glPrint... yeah.

## Recommended Posts

I'm making a 2D puzzle game where printing text to the screen is pretty crucial (score, level, what have you). When I call the glPrint function (taken from Lesson #13) it puts a black, translucent overlay on the whole screen except for the text, which shows up normally. Here's some of the code from my DrawGLScene() function:
int DrawGLScene(GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glTranslatef(-8.0,-5.0,-15.0);

glPushMatrix();
glTranslatef(3.0,HEIGHT+2,0.0);
glDisable(GL_LIGHTING);
glPrint("(%i,%i)",selectiony,selectionx);
glEnable(GL_LIGHTING);
glPopMatrix();
// Draw everything else...
}
I remember that I figured this out once before, but that code is long gone and I can't remember for the life of me how I did it. I skimmed through the redbook but I couldn't find anything that seemed relevant. :/

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627675
• Total Posts
2978569

• 11
• 11
• 10
• 12
• 22