我可以在我的 Java 应用程序中使用 OpenGL 吗?如果是,如何?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5922439/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I use OpenGL in my Java applications? If yes, how?
提问by oktalBlizzard
I want to start creating some 3D software for Linux, and heard that OpenGL is the library of choice for Linux 3D development.
我想开始为 Linux 创建一些 3D 软件,听说 OpenGL 是 Linux 3D 开发的首选库。
Is there any way to use it with Java? if yes, how?
有没有办法将它与Java一起使用?如果是,如何?
采纳答案by MichaelHouse
Yes, there are lots of ways to use OpenGL in Java. For example:
是的,有很多方法可以在 Java 中使用 OpenGL。例如:
http://en.wikipedia.org/wiki/Java_OpenGL
LWJGL
http://en.wikipedia.org/wiki/Java_OpenGL
LWJGL
EDIT
编辑
Additionally, since you're new to programming. You may want to get a handle on some of the basics of programming before taking on 3D graphics. I've got a friend who is new to programming started on these tutorials. No verdict on how good they are yet, but should make a good start.
此外,由于您是编程新手。在学习 3D 图形之前,您可能希望掌握一些编程的基础知识。我有一个不熟悉编程的朋友从这些教程开始。还没有关于它们有多好的结论,但应该有一个好的开始。
回答by Owen
I like LWJGL, it's got several ways to make life just that little bit easier for game developers. Just bear in mind that 3D graphics is pretty daunting. Don't be discouraged if you don't get the camera pointing the right way on your first try.
我喜欢LWJGL,它有多种方法可以让游戏开发者的生活更轻松一点。请记住,3D 图形非常令人生畏。如果您在第一次尝试时没有让相机指向正确的方向,请不要气馁。
回答by Andrew White
Yes, and you probably need to setup JOGL in eclipse.
是的,您可能需要在 eclipse 中设置JOGL。
回答by reccles
The kits mentioned so far, LWJGL, JOGL are good suggestions.
到目前为止提到的套件,LWJGL,JOGL 都是不错的建议。
If you are just looking to play around and make neat things I suggest looking at JMonkeyEngine. It won't get you as close to the metal as the other libraries but you can jump into making something neat a lot quicker then the raw API's.
如果您只是想玩玩并制作整洁的东西,我建议您查看JMonkeyEngine。它不会像其他库那样让你接近金属,但你可以比原始 API 更快地制作一些整洁的东西。
回答by drojokef
Answer is simple, you can use JOGL.
答案很简单,你可以使用JOGL。