问题
I need to draw a String in Arial, lets say "hello world", on the window (the game uses openGL). But I have no idea how to draw text using openGL. I have searched but have found nothing that I understand. So I basically need to draw a Arial string on the screen in openGL in java.
回答1:
Take a look at TextRendrer , Its in the first few links on a google search
回答2:
You could also use slick if you're using lwjgl - http://slick.cokeandcode.com/ It's very easy to use, you simply create a unicode font, load the glyphs and then use it to write text.
来源:https://stackoverflow.com/questions/8375944/how-do-i-draw-a-text-in-opengl-java