Lesson 13 Bitmapped fonts

Started by
0 comments, last by brekehan 21 years, 8 months ago
I am somewhat confused on whats going on here: // Selects The Font We Want oldfont = (HFONT)SelectObject(hDC, font); // Builds 96 Characters Starting At Character 32 wglUseFontBitmaps(hDC, 32, 96, base); // Selects The Font We Want SelectObject(hDC, oldfont); // Delete The Font DeleteObject(font); Is he selecting the new font we made and storing the old one, making some glfont thingy with the open gl function and then selecting the default we started with again? Is there a description somewhere of what wglUseFontBitmaps does exactly? and what happens if you don''t reselect the oldfont? Thanx, Christopher
Advertisement
Yes. He selects in the new font, creates a display list based on that font, then puts the old font back into place.

---
Make it work.
Make it fast.

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]

This topic is closed to new replies.

Advertisement