The scenegraph as a whole does not typically do GL error checking. That
means GL errors occurring elsewhere could cause the etcprovider to unload
textures that loaded correctly.
Change-Id: Ic8e0caa62dab50b391e226cf0a493bc7e357dc46
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
"paddedWidth: " << m_paddedSize.width() << "paddedHeight: " << m_paddedSize.height();
#endif
+#ifndef QT_NO_DEBUG
+ while (glGetError() != GL_NO_ERROR) { }
+#endif
+
QOpenGLContext *ctx = QOpenGLContext::currentContext();
Q_ASSERT(ctx != 0);
ctx->functions()->glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_ETC1_RGB8_OES,
(m_paddedSize.width() * m_paddedSize.height()) >> 1,
m_data.data() + 16);
+#ifndef QT_NO_DEBUG
// Gracefully fail in case of an error...
GLuint error = glGetError();
if (error != GL_NO_ERROR) {
m_texture_id = 0;
return;
}
+#endif
m_uploaded = true;
updateBindOptions(true);