LWJGL Forum

Programming => OpenGL => Topic started by: Naug on September 22, 2014, 13:40:45

Title: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: Naug on September 22, 2014, 13:40:45
I've been looking around and didn't find anything =/ Rendering text in an OpenGL frame seems to be a non-trivial problem and I would be real happy if I could find a decent library for it.
Title: Re: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: Cornix on September 22, 2014, 13:44:59
LWJGL does not offer anything in that way. You have to either write your own library or use some third party library for that. I personally dont know any, I wrote my own.
Title: Re: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: Naug on September 22, 2014, 14:04:50
Look for one hour, find nothing.
Write forum post
Look five more minutes, find this (https://www.youtube.com/watch?v=JFQhhwVqqs8).
Story of my life :D

Thanks to cornix for the reply :)
Title: Re: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: Cornix on September 22, 2014, 15:04:18
I've looked at the code and it doesnt look very flexible or powerful. It also uses outdated functionality. I would not recommend it, but if its enough for your needs then go ahead.
Title: Re: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: kappa on September 22, 2014, 16:19:47
Both LibGDX  (http://libgdx.badlogicgames.com/)and Slick2D (http://slick.ninjacave.com/) have OpenGL text rendering implementation which you can view/copy.

Further check out the LWJGL Wiki (http://lwjgl.org/wiki/index.php?title=Main_Page), if I recall correctly there is a tutorial on how to render truetype fonts in LWJGL using the Slick-Util library.

Lastly do have a search of these forums, there are a number of posts in which people have posted their implementations of text rendering in LWJGL.
Title: Re: Does LWJGL come with a TextRenderer to use with OpenGL?
Post by: Naug on September 24, 2014, 12:22:20
Yeah, that SimpleText was no where near what I thought it would be. Tried Slick2D now and that suits my needs just fine. Thanks for the replies :)