Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.12.2
-
None
-
arm, mali
Description
I have a QSGMaterial that binds an external texture to a shader:
The code looks like:
glActiveTexture(GL_TEXTURE7);
glGenTextures(1, &texId);
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texId);
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage);
program()->setUniformValue(texId, 7);
// Qt expects us to activate GL_TEXTURE0 after rendering
glActiveTexture(GL_TEXTURE0);
Note: GL_TEXTURE7 is an arbitrary texture unit
Qt seems to expect GL_TEXTURE0 beeing activated when leaving the updateState otherwise you'll get corrupted textures.