如何在openGL / java中绘制文本? [英] How do I draw a text in openGL/java?

查看:156
本文介绍了如何在openGL / java中绘制文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Arial上的窗口上绘制一个String,比如说 hello world(游戏使用openGL)。但是我不知道如何使用openGL绘制文本。我已经搜索过,但是没有发现我所理解的东西。因此,我基本上需要在Java的openGL中在屏幕上绘制Arial字符串。

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.

推荐答案

如果您愿意,也可以使用slick重新使用lwjgl- http://slick.cokeandcode.com/
它非常易于使用,您只需创建一个Unicode字体,加载字形,然后使用它来编写文本。

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.

这篇关于如何在openGL / java中绘制文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆