如何在 Linux 上开发 OpenGL ES (GLES) 2.0 应用程序?

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

How to develop OpenGL ES (GLES) 2.0 applications on Linux?

linuxubuntuopengl-es

提问by l.thee.a

I would like to develop OpenGL ES 2.0 apps on my Ubuntu machine. I could not find any libraries/emulators that support GLES 2.0 yet. Any suggestions?

我想在我的 Ubuntu 机器上开发 OpenGL ES 2.0 应用程序。我还没有找到任何支持 GLES 2.0 的库/模拟器。有什么建议?

采纳答案by Bertan Gundogdu

Update:

更新:

You can (still) use PowerVR SDK and now it supports Vulkan as well. Updated links:

您可以(仍然)使用 PowerVR SDK,现在它也支持 Vulkan。更新链接:

At the time of my original answer, PowerVR SDK was the most complete solution (Mesa gained full OpenGL ES 2.0 support with its 3.1 release according to its Wikipedia page).

在我最初的回答时,PowerVR SDK 是最完整的解决方案(根据其维基百科页面,Mesa 在其 3.1 版本中获得了完整的 OpenGL ES 2.0 支持)。

Now, Mesa and Mali SDK can also be a choice. For detailed info on those, please refer to this detailed answerby fxsc

现在,Mesa 和 Mali SDK 也可以是一种选择。有关这些详细信息,请参阅本详细的解答西罗桑蒂利

Original Answer:

原答案:

You can use POWERVR SDK to emulate Opengl es on your PC. You can download the SDK here. The archive provides the necessary steps to install the emulation libraries as a documentation file and includes tutorials and demo applications with source codes.

您可以使用 POWERVR SDK 在您的 PC 上模拟 Opengl es。您可以在此处下载 SDK 。该档案提供了将仿真库作为文档文件安装的必要步骤,并包括教程和带有源代码的演示应用程序。

回答by Justicle

Develop to the OpenGL 2.0 standard, and don't use immediate mode or fixed function mode. Essentially your program will be ES 2.0 compliant.

按照OpenGL 2.0标准开发,不要使用立即模式或固定函数模式。本质上,您的程序将符合 ES 2.0。

回答by Ignacio Vazquez-Abrams

Mesa supports it. If you want to restrict yourself to OpenGL ES onlythen you'll need to build it into a separate directory and then add the appropriate include and library directories.

Mesa支持它。如果你想给自己限制的OpenGL ES只有那么你就需要把它建设成一个单独的目录,然后添加相应的包括和库目录。

回答by Arne

you can generate a header that has only those functions that you really need. And with glfw you can create an opengl es context. So you can't accidently use functions that you do not want to use, because they won't be defined in this way. I found this that might help you here.

您可以生成一个仅包含您真正需要的功能的标头。使用 glfw,您可以创建一个 opengl es 上下文。所以你不能不小心使用你不想使用的函数,因为它们不会以这种方式定义。我发现这可能对你有帮助。

gl load from the unofficial opengl sdk

从非官方的 opengl sdk 加载 gl