Textogl renders text in OpenGL from nearly any font (any format supported by Freetype).
- Create a textogl::Font_sys object for the desired font.
- Call textogl::Font_sys::render_text() with the desired text, position, and color.
- If the text will not change each frame, consider using textogl::Static_text object. This will prevent needing to rebuild quads for each rendering call
- Freetype
- OpenGL 3.3 + OR OpenGL ES 2.0+
- GLM (Optional - Allows passing glm vectors to textogl for colors and positions)
- Compiler supporting c++11
Textogl uses CMake to build
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=<prefix path> # add -DBUILD_SHARED_LIBS=1 for a shared libary, add -DUSE_GLM=0 to skip checking for GLM
$ make
# make install
Textogl is configured to generate a .deb package file. To do so, substitute the above with the following:
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=1
$ make
$ cpack
# dpkg -i libtextogl-dev*.deb
If doxygen is installed, library documentation can be generated with: $ make doc