summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglframebufferobject_p.h')
-rw-r--r--src/opengl/qglframebufferobject_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 3b36c5c2b6..0edce5da2f 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -71,7 +71,9 @@ public:
mipmap(false)
{
#ifndef QT_OPENGL_ES_2
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ const bool isES = ctx ? ctx->isES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL;
+ internal_format = isES ? GL_RGBA : GL_RGBA8;
#else
internal_format = GL_RGBA;
#endif