JOGL与Android上的OpenGL ES API。(JOGL vs OpenGL ES API on Android. Pros&Cons)

编程入门 行业动态 更新时间:2024-10-25 06:33:32
JOGL与Android上的OpenGL ES API。(JOGL vs OpenGL ES API on Android. Pros&Cons)

我们正在尝试将我们的项目从PC版迁移到Android版。 PC版使用JOGL。 谁能解释在Android应用程序中使用JOGL而不是OpenGL ES API的主要优点?

例如,JOGL的PC专业人士是:

从理论上讲,您可以在任何平台上使用它。 它或多或少地集成了AWT,Swing和SWT。 它也是某种包装器,因此理论上有一些抽象可以更容易地使用OpenGL。

但是我看不到在Android中使用它的优点,从我的角度来看这是缺点:

这是另一个依赖,APK大小会更大。 影响JOGL和OpenGL ES的一些问题需要更多时间来查明和修复。 这不是一个不需要一些时间进行重构的银弹,因为在Android中我们应该为活动,服务等使用正确的模式。 JOGL拥有较少的教程和较小的OpenGL ES API社区。

那么在Android项目中使用它有什么意义呢?

We are trying to migrate our project from PC version to Android. PC version uses JOGL. Can anyone explain main advantages of using JOGL in Android application instead of OpenGL ES API?

For example, on PC pros of JOGL are:

In theory you can use it on any platform. It's more or less integrated with AWT, Swing and SWT. Also it's some kind of wrapper, so in theory there are some abstractions that make it easier to use OpenGL.

But I can't see advantages of using it in Android, here are the cons from my point of view:

It's another dependency, APK size will be larger. Some issues that affect both JOGL and OpenGL ES will require more time to pinpoint and fix. It's not a silver bullet that would not require some time for refactoring, since in Android we should use right patterns for Activities, Services, etc. JOGL has less tutorials and smaller community that OpenGL ES API has.

So what's the point of using it in Android project?

最满意答案

您只能在我们支持的平台上使用JOGL。 我确认JOGL与AWT,Swing和SWT具有良好的互操作性(还没有OpenJFX / JavaFX,但是当Oracle做必要的事情时我们会改进它)。 是的,有一些很好的抽象,但你忘记了很多东西:

JOGL有自己的无AWT图像管理。 它比ImageIO更好地支持JPEG,速度更快 即使您的应用程序暂停并放入后台(当您按下“home”时),也可以保留OpenGL上下文,它是内置的 您可以在计算机上测试OpenGL-ES代码,即使它不能替换真实设备上的测试 您可以在桌面和嵌入式环境中使用完全相同的OpenGL代码,尤其是在您已经使用GL2ES2的情况下 如果出现问题,您可以依赖我们,Google Play上已经有一些商业游戏

我承认在Android下缺乏关于JOGL的文档。 对不起,我花了几个月的时间编写了一个关于JogAmp的Ardor3D Continuation的教程 ,我更喜欢把JOGL Android用法的任务留给更有经验的人。

编辑:对于迟到的回复抱歉,但我的OpenID有问题。 请在我们的官方论坛上发布有关JOGL的问题。

You can use JOGL only on the platforms that we support. I confirm that JOGL has a good interoperability with AWT, Swing and SWT (not yet with OpenJFX/JavaFX but we'll improve that when Oracle does the necessary things). Yes there are some nice abstractions but you forget tons of things:

JOGL has its own AWT-free image management. It has a better support of JPEG than ImageIO and it is faster You can preserve the OpenGL context even when your application is paused and put in background (when you press "home"), it's build-in You can test your OpenGL-ES code on your computer even though it doesn't replace the tests on a real device You can use exactly the same OpenGL code on desktop and embedded environments, especially if you already use GL2ES2 you can rely on us if something goes wrong, there are already a few commercial games on Google Play

I admit that there is a lack of documentation about JOGL under Android. I'm sorry, I have spent several months in writing a tutorial about JogAmp's Ardor3D Continuation and I prefer leaving the task of doing the same for JOGL Android usage to someone more experienced with it.

Edit.: Sorry for the late reply but I had a problem with my OpenID. Please rather post questions about JOGL on our official forum.

更多推荐

本文发布于:2023-04-29 04:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334577.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:OpenGL   Android   JOGL   ES   Cons

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!