Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LWJGL 3 - Rendering Text [closed]

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

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

  • Different fonts / font sizes / bold, italics, etc
  • Font coloring
  • Font transforms

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

like image 967
Tetramputechture Avatar asked Jun 28 '15 23:06

Tetramputechture


1 Answers

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

Further details and examples for the same can be found here.

like image 126
Gavin Avatar answered Oct 20 '22 05:10

Gavin