LWJGL 3 - Render text

I am trying to render text in LWJGL 3 using legacy OpenGL. I cannot use Slick-Util, which relies on older versions of LWJGL and legacy OpenGL.

I would use FreeType if I was writing standard C ++ OpenGL, but I can't. So how would I start to create a class that can handle rendering of text, with support for:

  • Various fonts / font size / bold, italic, etc.
  • Font color
  • Converting fonts

Does anyone have good resources on this topic, preferably in Java and LWJGL?

+3


source to share


1 answer


LWJGL3 has a built-in STB binding that can load TTF font files, there are examples in the LWJGL3 repository that show you how to render text using it.



More information and examples for this can be found here .

+1


source







All Articles