Print Text to Screen

Started by
1 comment, last by e-u-l-o-g-y 17 years, 7 months ago
Hello, ive created a OpenGL scene with a loaded 3ds model, and id like to be able to call a function that prints text onto the screen. If written a function but the colour, the font is not customizable, and it has a white box backgroudn behind it always. If anyone could give some tips on how i could write a function that prints only the text to the screen without the white background, it would be very appreciated :D
Advertisement
I don't know how you are writing the text but if you are using texture mapped font, make a black texture with greyscale characters, use it as alphamap with blending and specify the color before rendering the characters.

This way: colored better looking text, higher performance

If you use bitmap fonts consider using glut.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
NEHE Lesson 13
NEHE Lesson 14
my-eulogy - A blog about coding and gfxsdgi - Semi-Daily Game IdeaChunkyHacker - Viewer for Relic chunky formats (used in DOW)

This topic is closed to new replies.

Advertisement