How do I overlay Text in my window using openGL.
You render text the same way you render everything else. You get a texture with the text and render it. And if you want it to be an overlay you render it on top of everything else with an orthogonal projection and depth testing disabled.
See the Truetype and EasyFont stb demos (https://github.com/LWJGL/lwjgl3/tree/master/modules/core/src/test/java/org/lwjgl/demo/stb).
Talking about text is there an easy way to read individual charachters from a string? ::)
Quote from: technik3k on September 17, 2015, 01:02:53
Talking about text is there an easy way to read individual charachters from a string? ::)
I would say:
char a_char = a_text_string.charAt(i);
Would it work If I disable render with deapth when rendering text? And would I just do glDisable(GL_DEPTH_TEST); then when I'm done glEnable(GL_DEPTH_TEST);
yes, you also need to change your projection matrix to map coordinates to 2D instead of 3D