How do I draw a text in openGL/java?

≯℡__Kan透↙ 提交于 2019-12-11 03:45:36

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!