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>
This commit is contained in:
parent
f9f270a6c8
commit
2dbcaf5d96
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user