summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-06 22:36:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-17 20:31:30 +0100
commit159f42222d06acd9a7ea9b25167e52060d47ab4c (patch)
tree0c0e18cdf8ce605d147df8ac738ce0ffa07a4d75 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
parent3250ec0c8f9666cd3dbb724894cd529d5af51ffb (diff)
Remove duplicated code for handling OpenGL extensions in QtOpenGL
We now re-use QOpenGLExtensions/Functions from QtGui in the same way as QtGui uses these classes. There is still some duplicated logic in qglfunctions.cpp, but this code now at least uses the shared QOpenGLExtensionMatcher class. Change-Id: Ie04008c43d430ae805e6ec1c45e7e363deeb3b8f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 401a3824c5..b0517fd083 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -62,6 +62,7 @@
#include <private/qfontengine_p.h>
#include <private/qdatabuffer_p.h>
#include <private/qtriangulatingstroker_p.h>
+#include <private/qopenglextensions_p.h>
enum EngineMode {
ImageDrawingMode,
@@ -256,6 +257,8 @@ public:
EngineMode mode;
QFontEngineGlyphCache::Type glyphCacheType;
+ QOpenGLExtensions funcs;
+
// Dirty flags
bool matrixDirty; // Implies matrix uniforms are also dirty
bool compositionModeDirty;
@@ -317,9 +320,9 @@ void QGL2PaintEngineExPrivate::setVertexAttributePointer(unsigned int arrayIndex
vertexAttribPointers[arrayIndex] = pointer;
if (arrayIndex == QT_OPACITY_ATTR)
- glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, pointer);
+ funcs.glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, pointer);
else
- glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, pointer);
+ funcs.glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, pointer);
}
QT_END_NAMESPACE