i.MX6-Sabrelite OpenGL ES 3.0 integer texture

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6-Sabrelite OpenGL ES 3.0 integer texture

944件の閲覧回数
adrianhodos
Contributor I

I'm using the following code to draw a full screen textured quad. This code works on my desktop (Nvidia GT 430), but gets me a black screen on the SabreLite.

uint8_t MEM_BUFF[1280 * 800 * 4];

memset(MEM_BUFF, 0xFF, sizeof(MEM_BUFF));

GLuint texHandle{};
glGenTextures(1, &texHandle);
glBindTexture(GL_TEXTURE_2D, texHandle);
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8UI, 1280, 800);
glTexSubImage2D(GL_TEXTURE_2D,
                    0,
                    0,
                    0,
                    1280,
                    800,
                    GL_RGBA_INTEGER,
                    GL_UNSIGNED_BYTE,
                    MEM_BUFF);

And the following shader code :

#version 300 es

precision highp float;

out vec4 FragColor;
uniform highp usampler2D YFrameData;

void main() {
  ivec2 pixCoords = ivec2(gl_FragCoord.xy);
  uint Y = uint(texelFetch(YFrameData, pixCoords, 0).r);
  FragColor = vec4(float(Y) / 256.0f, 0.0f, 0.0f, 1.0f);
}

Am I doing something wrong ?

0 件の賞賛
返信
1 返信

797件の閲覧回数
art
NXP Employee
NXP Employee

The i.MX6 series processors, except of i.MX6DualPro and i.MX6QuadPro, do not support OpenGL ES 3.0. Only OpenGL ES 2.0 is supported.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信