Is there a decent OpenGL text drawing library for the iPhone SDK?

前端 未结 8 781
无人共我
无人共我 2020-11-28 20:54

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

8条回答
  •  无人及你
    2020-11-28 21:24

    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

提交回复
热议问题