diff options
Diffstat (limited to 'src/gui/opengl/qopenglframebufferobject_p.h')
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject_p.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h index 1c7d2e1e5d..f0e07f2119 100644 --- a/src/gui/opengl/qopenglframebufferobject_p.h +++ b/src/gui/opengl/qopenglframebufferobject_p.h @@ -59,12 +59,6 @@ QT_BEGIN_NAMESPACE -#ifndef QT_OPENGL_ES -#define DEFAULT_FORMAT GL_RGBA8 -#else -#define DEFAULT_FORMAT GL_RGBA -#endif - class QOpenGLFramebufferObjectFormatPrivate { public: @@ -73,9 +67,13 @@ public: samples(0), attachment(QOpenGLFramebufferObject::NoAttachment), target(GL_TEXTURE_2D), - internal_format(DEFAULT_FORMAT), mipmap(false) { +#ifndef QT_OPENGL_ES_2 + internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8; +#else + internal_format = GL_RGBA; +#endif } QOpenGLFramebufferObjectFormatPrivate (const QOpenGLFramebufferObjectFormatPrivate *other) |