diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-11-26 11:13:16 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-12-01 20:04:11 +0100 |
commit | 2dbcaf5d96ffc2bbd41a6bd6b7d3d36131edb69b (patch) | |
tree | 35f4d02953b5a14b841858a5f5d03d6120fbd74d | |
parent | f9f270a6c85fbf42de1e7bf34cc1887e90a0dcf1 (diff) |
QOpenGLFramebufferObject: pass sized format also with dynamic GL
The GL_RGBA8_OES define is not in scope for dynamic OpenGL builds, so
pass in GL_RGBA8 instead (it is defined as the same value, 0x8058) when
in ES mode. The functionality check already ensures the extension is
available, so the ifdef guards can be removed.
This fixes default multisampled FBO creation under ANGLE when using
-opengl dynamic.
Task-number: QTBUG-40921
Change-Id: Iac4b7e230a463c27b61af75c3307421f9deac856
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index b185e332e6..cbc992b7e8 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -479,11 +479,9 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi GLenum storageFormat = internal_format; // ES requires a sized format. The older desktop extension does not. Correct the format on ES. if (ctx->isOpenGLES() && internal_format == GL_RGBA) { -#ifdef GL_RGBA8_OES if (funcs.hasOpenGLExtension(QOpenGLExtensions::Sized8Formats)) - storageFormat = GL_RGBA8_OES; + storageFormat = GL_RGBA8; else -#endif storageFormat = GL_RGBA4; } |