Updates:
* November 2013
- Added v1.1 of the standard example code, with a small
fix to clear vertex array state after drawing.
* February 2013
- Added a version that works with OpenGL ES 2.0, provided
by Aleksandar Kodzhabashev.
* January 2013
- Added a version that includes z-values for rendering text
in 3D space. It was written by Jocelyn Demoy.
* September 2012
- Added a mirror for the code download.
- Added a Scala port of the code, provided by Alexey Aksenov.
This post is intended for developers. It describes the method I used for rendering high-quality dynamic text efficiently using OpenGL ES 1.0, with TrueType/OpenType font files.
One of the most frustrating things I have encountered while working with 3D APIs (such as OpenGL) is the complete lack of support for
text rendering. Because of this unexplainable shortcoming, we have to implement text rendering on our own. Before starting with my Android game, I had already done this multiple times for both Direct3D and OpenGL, using methods ranging from static text on a bitmap to complete bitmap fonts (usually generated via a tool).
Sadly, these implementations did not translate well to OpenGL ES....so I had to do it again :)
Interested? Keep reading for details and a download of full source code that can be used immediately in any project, without limitation!