From 2dbcaf5d96ffc2bbd41a6bd6b7d3d36131edb69b Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Wed, 26 Nov 2014 11:13:16 +0200 Subject: 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 --- src/gui/opengl/qopenglframebufferobject.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3