summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-05-24 20:28:06 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-24 22:04:49 +0200
commit5b0bf90d262ba6ece448c463d0fed5095cd5eb21 (patch)
tree67d3b2315f5cf78e0ecfd3495e9c1ad843908364 /src/gui/opengl/qopengltexture.cpp
parentbe0bfe09ee4b99e9ab45c6898949b5d144e77a29 (diff)
Introduce QOpenGLTexture::target()
To extract the target of a given texture object. Somehow this accessor was missing. Change-Id: Ie43366bed3627a20204600e68e426b55abf37af6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r--src/gui/opengl/qopengltexture.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 8fefd43977..ac0b4f4e78 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -1483,6 +1483,17 @@ QOpenGLTexture::~QOpenGLTexture()
}
/*!
+ Returns the binding target of this texture.
+
+ \since 5.4
+*/
+QOpenGLTexture::Target QOpenGLTexture::target() const
+{
+ Q_D(const QOpenGLTexture);
+ return d->target;
+}
+
+/*!
Creates the underlying OpenGL texture object. This requires a current valid
OpenGL context. If the texture object already exists, this function does
nothing.