Commit 28b47897 authored by Laszlo Agocs's avatar Laszlo Agocs

gl: rely on QOpenGLExtensions::SRGBFrameBuffer in caps

do not reimplement the same logic that is already there in
qopenglfunctions.cpp
parent df85b7cd
......@@ -180,10 +180,6 @@ QT_BEGIN_NAMESPACE
#define GL_FRAMEBUFFER_SRGB 0x8DB9
#endif
#ifndef GL_FRAMEBUFFER_SRGB_CAPABLE
#define GL_FRAMEBUFFER_SRGB_CAPABLE 0x8DBA
#endif
static QSurfaceFormat qrhigles2_effectiveFormat()
{
QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
......@@ -314,13 +310,7 @@ bool QRhiGles2::create(QRhi::Flags flags)
caps.r8Format = f->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats);
caps.r16Format = f->hasOpenGLExtension(QOpenGLExtensions::Sized16Formats);
caps.srgbCapableDefaultFramebuffer = false;
if (ctx->hasExtension(QByteArrayLiteral("GL_ARB_framebuffer_sRGB"))) {
GLint srgbCapable = 0;
f->glGetIntegerv(GL_FRAMEBUFFER_SRGB_CAPABLE, &srgbCapable);
if (srgbCapable)
caps.srgbCapableDefaultFramebuffer = true;
}
caps.srgbCapableDefaultFramebuffer = f->hasOpenGLExtension(QOpenGLExtensions::SRGBFrameBuffer);
nativeHandlesStruct.context = ctx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment