The Implementation of OpenGL Character String Output on Both Windows and Linux
To render 2D characters in OpenGL 3D applications(especially the cross-platform applications) is always quite complicated and boring. One can use the bitmap or texture, but it's hard to handle and need many codes. And the most important, hard to achieve the expected effect.
Fortunately, there are some tools could do this tough work for us. We can just configure the tools, and then use them in our program. The most popular and powerful and free(really free) tool is QuesoGLC . It's an implementation of GLC(OpenGL Character Renderer).
QuesoGLC is easy to use and import into our project. It's corss-platform. And it supports the unicode characters which means you can render Chinese, Japaness, Russian characters perfectly with the local fonts.
Now, we'll introduce how to install, configure and use QuesoGLC in our own projects.
ONE. INSTALLATION:
QuesoGLC is based on FreeType2 and Fontconfig . We need to install these two dependencies before we compile the QuesoGLC.
In Linux platforms, it'll be easy to do that. Just use: "sudo apt-get install quesoglc" or something like that. The system will deal with the dependencies for you automatically.
In Windows platforms, just go to the