From 10aa64d74c0208ed9f42e88e6deb3000e9cad6df Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Sat, 22 Sep 2012 16:34:21 +0100 Subject: OpenGL: Add a set of version and context specific OpenGL classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds part of the output of utils/glgen and some simple modifications to QOpenGLContext to allow easy access to classes containing functions specific to a given OpenGL context and version. This allows compile-time detection of mis-use of OpenGL features. For example, trying to use glBegin(GL_TRIANGLES) with an OpenGL 3.2 Core Profile context will be detected by the compiler rather than at runtime. These capabilities make it much easier to add functionality to Qt and applications that relies upon core features of OpenGL from specific versions e.g. geometry shaders. Change-Id: Ieb584a489792595f831bc77dee84935c03bb5a64 Reviewed-by: Samuel Rødal --- src/gui/kernel/qopenglcontext_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel/qopenglcontext_p.h') diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index ba5434e8ac..8a36df3e7c 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -213,6 +213,9 @@ public: //QWidgetPrivate::deleteTLSysExtra() } + mutable QHash versionFunctions; + mutable QHash versionFunctionsBackend; + void *qGLContextHandle; void (*qGLContextDeleteFunction)(void *handle); -- cgit v1.2.3