diff options
author | Jørgen Lind <jorgen.lind@digia.com> | 2014-09-08 15:34:31 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2014-12-11 10:36:39 +0100 |
commit | d46d3ef044c6f2a03d2eb5446420ecf5940d57a8 (patch) | |
tree | dc0c57f49b3afda1778047848aa3e2dedf5afeec /src/gui/opengl/qopenglfunctions.cpp | |
parent | 53022e04bb578c12cdc9460d7ce4eedefbc8c2e4 (diff) |
Add GL_EXT_discard_framebuffer to QOpenGLExtensions
Change-Id: I57e8dd2ea2e6f018a46eaabed2ca8b6d417358a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 3631c019d3..99604ca8b2 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -415,6 +415,9 @@ static int qt_gl_resolve_extensions() // We don't match GL_APPLE_texture_format_BGRA8888 here because it has different semantics. if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888") || extensionMatcher.match("GL_EXT_texture_format_BGRA8888")) extensions |= QOpenGLExtensions::BGRATextureFormat; + + if (extensionMatcher.match("GL_EXT_discard_framebuffer")) + extensions |= QOpenGLExtensions::DiscardFramebuffer; } else { extensions |= QOpenGLExtensions::ElementIndexUint | QOpenGLExtensions::MapBuffer; @@ -3257,6 +3260,11 @@ static void QOPENGLF_APIENTRY qopenglfResolveGetBufferSubData(GLenum target, qop (target, offset, size, data); } +static void QOPENGLF_APIENTRY qopenglfResolveDiscardFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments) +{ + RESOLVE_FUNC_VOID(ResolveEXT, DiscardFramebuffer)(target, numAttachments, attachments); +} + #if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC) // Special translation functions for ES-specific calls on desktop GL @@ -3495,6 +3503,7 @@ QOpenGLExtensionsPrivate::QOpenGLExtensionsPrivate(QOpenGLContext *ctx) BlitFramebuffer = qopenglfResolveBlitFramebuffer; RenderbufferStorageMultisample = qopenglfResolveRenderbufferStorageMultisample; GetBufferSubData = qopenglfResolveGetBufferSubData; + DiscardFramebuffer = qopenglfResolveDiscardFramebuffer; } QT_END_NAMESPACE |