Jump to content
  • Advertisement
Sign in to follow this  
Schlagwerk

glPrint... yeah.

This topic is 4442 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

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);
    glLoadIdentity();
    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. :/

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!