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>
This commit is contained in:
parent
be0bfe09ee
commit
5b0bf90d26
@ -1482,6 +1482,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
|
||||
|
@ -100,6 +100,8 @@ public:
|
||||
explicit QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);
|
||||
~QOpenGLTexture();
|
||||
|
||||
Target target() const;
|
||||
|
||||
// Creation and destruction
|
||||
bool create();
|
||||
void destroy();
|
||||
|
Loading…
Reference in New Issue
Block a user