summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2013-03-20 17:20:28 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 08:56:47 +0200
commit1b34df6ea600bd361768be4091a255987e38f91c (patch)
treec6560a72770a7d7371f559280a2b8fa7a4ebe22c /src/gui/kernel/qopenglcontext.cpp
parent42d681f9cfc984046a93b9efe19903d46ac68bb1 (diff)
Long live QOpenGLTexture!
Task-number: QTBUG-33274 Change-Id: I9259d947d11f8ba330a2cd7f5620d8f1af0a804b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index c93752c3d7..9f03020c22 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -56,6 +56,10 @@
#include <private/qopenglextensions_p.h>
#include <private/qopenglversionfunctionsfactory_p.h>
+#if !defined(QT_OPENGL_ES_2)
+#include <private/qopengltexturehelper_p.h>
+#endif
+
#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -523,6 +527,10 @@ void QOpenGLContext::destroy()
d->versionFunctions.clear();
qDeleteAll(d->versionFunctionsBackend);
d->versionFunctionsBackend.clear();
+#if !defined(QT_OPENGL_ES_2)
+ delete d->textureFunctions;
+ d->textureFunctions = 0;
+#endif
}
/*!
@@ -976,6 +984,26 @@ void QOpenGLContext::removeFunctionsBackend(const QOpenGLVersionStatus &v)
d->versionFunctionsBackend.remove(v);
}
+#if !defined(QT_OPENGL_ES_2)
+/*!
+ \internal
+*/
+QOpenGLTextureHelper* QOpenGLContext::textureFunctions() const
+{
+ Q_D(const QOpenGLContext);
+ return d->textureFunctions;
+}
+
+/*!
+ \internal
+*/
+void QOpenGLContext::setTextureFunctions(QOpenGLTextureHelper* textureFuncs)
+{
+ Q_D(QOpenGLContext);
+ d->textureFunctions = textureFuncs;
+}
+#endif
+
/*!
\class QOpenGLContextGroup
\since 5.0