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 ?
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!
-----------------------------------------------------------------------------------------------------------------------