Reputation: 29
I find a simple (and portable) lib for integrate in a my OpenGL based game.
more simple and little of FreeType?
thanks
Upvotes: 2
Views: 1800
Reputation: 2123
If you want to use FreeType, I have a simple OpenGL example of how to use it. I render glyphs to a glyph cache that is backed by a texture. Then I draw the text using simple texture mapped quads.
https://github.com/ccxvii/snippets/blob/master/glfont.c
If you don't want to use FreeType, you can trivially replace it with Sean Barret's stb_truetype.h truetype font rasterizer:
http://nothings.org/stb/stb_truetype.h
Upvotes: 0
Reputation: 1311
Try FTGL. Its portable, simple in use and can render 3D fonts. But it uses FreeType2.
Upvotes: 2
Reputation: 9981
If your using QT, there's a built in font rendering subsystem, assuming you've sub classed QGLWidget, there is a set of text rendering methods you can call
If you don't find a library, you could always render the text out to an image using photoshop, and then use it as a texture atlas, and render textured quads out
Upvotes: 1
Reputation: 1112
Try FreeType, here is a NeHe lesson on how to use it in an OpenGL program.
Upvotes: 0