summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-08-09 07:06:52 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-08-09 07:06:52 +0000
commit5bfac9d653357c906946563b9494d7ae69cdad92 (patch)
tree0cc119af894a398497eba6f56fe2f224f6947616 /src/gui/opengl
parentf08e1ecdc88e9373a31c1505d5db7f905431c644 (diff)
parent77da617dc8e378a631ee8c15b1b414f16b87f147 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopengldebug.cpp6
-rw-r--r--src/gui/opengl/qopengltexture.cpp5
-rw-r--r--src/gui/opengl/qopenglversionfunctions.cpp10
3 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index e747372df9..8b2ffb1a20 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -916,6 +916,12 @@ QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(const QOpenGLDebugMessage &d
}
/*!
+ \fn QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(QOpenGLDebugMessage &&debugMessage)
+
+ Move-assigns \a debugMessage to this object.
+*/
+
+/*!
\fn void QOpenGLDebugMessage::swap(QOpenGLDebugMessage &debugMessage)
Swaps the message \a debugMessage with this message. This operation is very
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 9b82233b9a..301b2ad13d 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -179,8 +179,9 @@ void QOpenGLTexturePrivate::destroy()
// not created or already destroyed
return;
}
- if (QOpenGLContext::currentContext() != context) {
- qWarning("Requires a valid current OpenGL context.\n"
+ QOpenGLContext *currentContext = QOpenGLContext::currentContext();
+ if (!currentContext || !QOpenGLContext::areSharing(currentContext, context)) {
+ qWarning("Texture is not valid in the current context.\n"
"Texture has not been destroyed");
return;
}
diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp
index 346a526054..17cd55720a 100644
--- a/src/gui/opengl/qopenglversionfunctions.cpp
+++ b/src/gui/opengl/qopenglversionfunctions.cpp
@@ -186,11 +186,17 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co
\sa QOpenGLContext::versionFunctions()
*/
+/*!
+ Constructs a QAbstractOpenGLFunctions object.
+*/
QAbstractOpenGLFunctions::QAbstractOpenGLFunctions()
: d_ptr(new QAbstractOpenGLFunctionsPrivate)
{
}
+/*!
+ Destroys a QAbstractOpenGLFunctions object.
+*/
QAbstractOpenGLFunctions::~QAbstractOpenGLFunctions()
{
Q_D(QAbstractOpenGLFunctions);
@@ -228,12 +234,16 @@ bool QAbstractOpenGLFunctions::isInitialized() const
return d->initialized;
}
+/*! \internal
+ */
void QAbstractOpenGLFunctions::setOwningContext(const QOpenGLContext *context)
{
Q_D(QAbstractOpenGLFunctions);
d->owningContext = const_cast<QOpenGLContext*>(context);
}
+/*! \internal
+ */
QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
{
Q_D(const QAbstractOpenGLFunctions);