I\'m trying to figure out a simple to draw some text in OpenGL. My research has shown its a fairly complex task. It involves creating (or generating at runtime) a font atl
I've created a Font class similar to the "musings" font library, minus the memory leaks and minus the texture creation for every character, every frame. It still uses a different glTexture for each character though. Note: Texture2D has been changed to comment out its texture deletion.
init in constructor:
_font = new Font("Helvetica", 40);
use in redraw() method:
_font->draw("Hello, World!", 50, 100, ALIGN_LEFT);
GitHub link:
https://github.com/chandl34/public/tree/master/personal/c%2B%2B/Font