I would like suggestions as to how to render text quickly in OpenGL.
Currently, I am reading a true type font and dynamically generating a texture containing all the ASCII characters, for each font used, for each font size used. Each texture is generated just once and kept for later use.
During the draw phase, I draw everything line by line.
I have a static array on memory, compute the kerning ect, modify the vertex positions and texture coordinates for the line. Then I bind the corresponding texture and render the line.
Unfortunately this seems to be very slow. Is there a better way?
The best way IMO is to use distance fields. Will use less space, be fast, supports several nice text effects easily, and is pretty easy to implement ( especially since you've already seem to have the font -> texture parts ready ).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With