问题标签 [opengl-es-3.1]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1393 浏览

android - Android 何时支持 OpenGL ES 3.1?

OpenGL ES 3.1 规范于 2014 年3 月 17 日发布。

有人知道是否有将其添加到 Android SDK 的时间表吗?

0 投票
2 回答
8560 浏览

ios - Opengl ES 3.1 对 ios 的支持?

我对 ios 的开发有点陌生,我想知道 iOS 是否支持新的 opengGL ES 3.1?如果是这样,我在哪里下载图书馆?

0 投票
1 回答
2595 浏览

android - OpenGL ES 3.1 支持(Android L 开发者预览版)

我昨天在 Nexus 5 上安装了 Android L 开发者预览版,希望开始实现计算着色器。我希望为我提供支持 GLES31 的 OpenGL 上下文的代码是:

在 Android 4.4.4 上创建 OpenGL ES 3.0 上下文的完全相同的代码。

但相反,我得到了没有新 GLES31 功能的 OpenGL ES 3.0 上下文。

我是否缺少有关 OpenGL 上下文创建的一些基本内容 - 或者当前的 Android L 开发人员预览图像 (= LPV79) 不支持 OpenGL ES 3.1 的情况?

0 投票
1 回答
4188 浏览

android - 在 Android 5 (Open GL ES 3.1) 中使用计算着色器

我正在学习 OpenGL ES,特别是 OpenGL ES 3.1 中的计算着色器,特别是 Android 5.0.1 中的计算着色器。

我定义了 3 个着色器(计算、顶点和片段)并附加到两个不同的程序,一个用于计算着色器,一个用于顶点和片段着色器。

当我只使用顶点和片段着色器时我没有问题,但现在我添加了计算着色器,我收到以下错误:

我试图弄清楚我错过了什么,但我是这个话题的新手,我不确定从哪里开始寻找问题。

对象的构造函数是:

绘图功能:

作为参考,着色器在帖子的末尾。

笔记:

  1. 我在 Android 文档中找不到 GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT。它不应该在那里吗?文档中提到了它
  2. 绘制调用使应用程序崩溃。直到 glDrawArrays() 之前一切似乎都很好。

任何关于寻找什么的想法都值得赞赏。

顶点着色器:

片段着色器:

计算着色器:

0 投票
0 回答
332 浏览

android - OpenGL ES 3.1“imageStore”在 Mali T760 上不起作用

我正在使用 OpenGL ES 3.1 制作移动图形程序。

我确认我的程序在 Adreno OpenGL ES 3.1 模拟器上运行良好(我的显卡是 Nvidia GTX 580)。但是,当我在智能手机(Samsung Galaxy Note 4 - Mali T760)上安装我的程序时,出现了一个严重的问题。

我在着色器功能中使用“imageStore”。此功能在模拟器上运行良好,但在安卓手机上只能写 0。

这个问题有什么问题或解决方案吗?

0 投票
1 回答
272 浏览

graphics - Android Lollipop 上的 Android Extension Pack 图形基准测试

现在我在 Google Play 上查看最新的图形基准。获得 GFXBench 3.1 和 Basemark ES 3.1 来验证我的 Android Lollipop 上的 OpenGLES 3.1。我可以下载任何基准/游戏/兼容性测试套件来测试 GLES3.1 之上的 Android 扩展包 (AEP) 吗?

0 投票
1 回答
4612 浏览

java - 具有 OpenGL ES 3.1 上下文的 GLSurfaceView

我正在使用 OpenGL 开发 Android。我知道如何使用GLSurfaceView及其自定义派生类来创建 OpenGL ES 2.0 上下文,方法如下GLSurfaceView

和 OpenGL ES 3.0 上下文:

如何为 OpenGL ES 3.1 创建上下文?

0 投票
1 回答
603 浏览

opengl-es - 2 个计算着色器,1 个 glMemoryBarrier = OK?

设置(Android 设备上的 OpenGL ES 3.1):

Compute_shader_clear(在 PROGRAM_A 中):

Compute_shader_main(在 PROGRAM_B 中):

两个计算着色器都指向同一个纹理(绑定零 = 图像单元零)

应用调用代码:

这个设置似乎没有问题,但这种解释是否正确?:

  1. 屏障是必要的,因为两个调度命令可能同时运行。

  2. 屏障意味着在第一次调度中的所有 imageStore 调用完成之前,第二次调度中不会执行任何 imageStore。

0 投票
2 回答
480 浏览

opengl-es - AMD OpenGL ES SDK 3.1 片段着色器的问题

AMD OpenGL ES SDK for 3.1(截至 2016 年 5 月 13 日)中的片段着色器是这样的:

这是完全错误的。我最接近纠正它的是:

这只是在最后一行将纹理转换为 texture2D。

不知道尝试计算漫反射着色器发生了什么。它使用来获取浮点数,并在浮点数上调用 swizzle(我认为这就是您所说的.xxx运算符)来尝试复制它?

有人如何轻松地了解有关着色器的更多信息?这似乎是一个很难熟练掌握的领域。

0 投票
1 回答
1368 浏览

c++ - OpenGL ES 3.1 - Unable to create IMMUTABLE Textures with glTexImage2D

I'm trying to create an immutable texture with glTexImage2D() that I can then bind using glBindImageTexture()

Here's my C++ code :

As I don't need Mipmap levels I set GL_TEXTURE_MAX_LEVEL to 0.
Then I call glTexImage2D() to set up all texture's levels (only one here) and I have no errors raised.

Unfortunately the result of
glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_IMMUTABLE_FORMAT,&status) is 0 which means that the texture is not immutable.

Now, when I try to call glBindImageTexture(), error 1282 is raised because as it is written in the khronos documentation, this opengl function needs an immutable texture.

Any ideas on what I'm doing wrong ?

Thanks in advance ;)

EDIT :

Thank you to both of you for your time and for all the information provided but There are things I don't understand.

This paragraph of the glTexStorage2D() man (khronos documentation) confuses me:

The behavior of glTexStorage2D depends on the target parameter. When target is GL_TEXTURE_2D, calling glTexStorage2D is equivalent, assuming no errors are generated, to executing the following pseudo-code:

Since no texture data is actually provided, the values used in the pseudo-code for format and type are irrelevant and may be considered to be any values that are legal for the chosen internalformat enumerant. internalformat must be one of the sized internal formats given in Table 1, or one of the compressed internal formats given in Table 2 below. Upon success, the value of GL_TEXTURE_IMMUTABLE_FORMAT becomes GL_TRUE. The value of GL_TEXTURE_IMMUTABLE_FORMAT may be discovered by calling glGetTexParameter with pname set to GL_TEXTURE_IMMUTABLE_FORMAT. No further changes to the dimensions or format of the texture object may be made. Using any command that might alter the dimensions or format of the texture object (such as glTexImage2D or another call to glTexStorage2D) will result in the generation of a GL_INVALID_OPERATION error, even if it would not, in fact, alter the dimensions or format of the object.

It remains unclear for me wether the paragraph above is about glTexImage2D() or glTexStorage2D().

Moreover, my underlying question is: Can we bind a texture created with glTexImage2D() using glBindImageTexture() ? (I saw code samples where these two functions were actually used together, here for instance)