Wednesday, January 22, 2020

OpenGL Character Renderer

OpenGL does not have native support for drawing text on-screen, and while many libraries already exist to deal with this issue (FreeType, bitmaps in GLUT, etc.), they are often quite expansive and a bit of a headache to set up properly. This can be a bit frustrating if one wants to quickly draw some characters, so I wrote the following character renderer library to do just that. It's a single header file that can be easily included in any project, and allows one to render all ASCII symbols using either lines or rasterized pixels. The header, along with two text files containing the relevant pixel and line data necessary for rendering, is linked below, and includes comments about how to properly use/call the functions.

No comments:

Post a Comment