java LWJGL 移植到安卓

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4585716/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 07:05:03  来源:igfitidea点击:

LWJGL port to android

javaandroidlwjgl

提问by Deniz Zoeteman

Is there a LWJGL port for Android available? (does not matter if the phone needs to rooted)

是否有适用于 Android 的 LWJGL 端口?(手机是否需要root也没关系)

采纳答案by Ricket

One of LWJGL's main features is its OpenGL support. Android natively supports OpenGL ES so there's basically no need for LWJGL. As for the rest of LWJGL, it doesn't apply on the Android platform anyway - for example there is obviously no mouse to an Android device - so I don't see a direct LWJGL port ever being developed.

LWJGL 的主要特性之一是它对 OpenGL 的支持。Android 本身就支持 OpenGL ES,因此基本上不需要 LWJGL。至于 LWJGL 的其余部分,它无论如何都不适用于 Android 平台——例如,Android 设备显然没有鼠标——所以我没有看到直接的 LWJGL 端口正在开发中。

Check out the Android reference, especially the android.opengl package, for a good starting point.

查看 Android参考,尤其是android.opengl 包,这是一个很好的起点。

回答by Zoe

Things have happened since this question was answered in 2011.

自从 2011 年回答这个问题以来,事情已经发生了。

There is a portIt is new that LWJGL has support for Android.

有一个港口LWJGL对 Android 的支持是新的。

The linked repo has the setup instructions and the demo, the actual code is in the LWJGL3 repo under the Android branch.

链接的repo有安装说明和demo,实际代码在Android分支LWJGL3 repo中。

I've been using it for a while now, and this library has a bunch of useful features that aren't just connected to OpenGLES, OpenAL, OpenVR and Vulkan, but it also has a lot of utilities for things like 3D model loading, layouts, dialogs, fonts and a lot more. Meaning the Android port of LWJGL is a considerable add-on to the current OpenGL ES support.

我已经使用它一段时间了,这个库有很多有用的功能,不仅连接到 OpenGLES、OpenAL、OpenVR 和 Vulkan,而且它还有很多实用程序,比如 3D 模型加载,布局、对话框、字体等等。这意味着 LWJGL 的 Android 端口是当前 OpenGL ES 支持的重要附加组件。

As for other libraries though, you can use no libraries because of the native support. Alternatively, you can use LibGDX or jMonkeyEngine, those are the only two others I know of and have used. Note that these are frameworks and not libraries like LWJGL, meaning they set up a given system you have to follow (one of the reasons I dislike them). It's harder implementing custom features without having to bring out a lot of other parts of the framework that aren't that well documented.

但是对于其他库,由于本机支持,您可以不使用任何库。或者,您可以使用 LibGDX 或 jMonkeyEngine,这是我所知道并使用过的仅有的两个。请注意,这些是框架而不是 LWJGL 之类的库,这意味着它们设置了您必须遵循的给定系统(我不喜欢它们的原因之一)。更难实现自定义功能,而不必带出框架的许多其他没有很好记录的部分。

回答by William Reed

A good 3D and 2D engine that uses LWJGL and works well for Android development (and also Desktop and Web Apps) is libGDX.

一个使用 LWJGL 并且适用于 Android 开发(以及桌面和 Web 应用程序)的良好 3D 和 2D 引擎是libGDX

回答by William Reed

I can't say for sure, but during last autumn I was searching for quite a long time for that and couldn't find anything. So I would say no, but don't bank on that.

我不能肯定,但去年秋天我为此寻找了很长时间,但没有找到任何东西。所以我会说不,但不要指望这一点。