summaryrefslogtreecommitdiffstats
path: root/src/render/texture/gltexture_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/texture/gltexture_p.h')
-rw-r--r--src/render/texture/gltexture_p.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/render/texture/gltexture_p.h b/src/render/texture/gltexture_p.h
index 424e77854..4c0957f76 100644
--- a/src/render/texture/gltexture_p.h
+++ b/src/render/texture/gltexture_p.h
@@ -148,6 +148,16 @@ public:
m_dirty |= TextureData;
}
+ bool isDirty()
+ {
+ QMutexLocker locker(&m_dirtyFlagMutex);
+ return m_dirty == 0 ? false : true;
+ }
+
+ QMutex *textureLock()
+ {
+ return &m_dirtyFlagMutex;
+ }
protected:
template<class APITexture, class APITextureImage>
@@ -164,11 +174,12 @@ protected:
void setParameters(const TextureParameters &params);
void setProperties(const TextureProperties &props);
void setImages(const QVector<Image> &images);
+ void setGenerator(const QTextureGeneratorPtr &generator);
private:
enum DirtyFlag {
- TextureData = 0x01, // one or more generators have been executed, data needs uploading to GPU
+ TextureData = 0x01, // one or more image generators have been executed, data needs uploading to GPU
Properties = 0x02, // texture needs to be (re-)created
Parameters = 0x04 // texture parameters need to be (re-)set
@@ -188,6 +199,8 @@ private:
TextureDataManager *m_textureDataManager;
TextureImageDataManager *m_textureImageDataManager;
+ // target which is actually used for GL texture
+ QAbstractTexture::Target m_actualTarget;
TextureProperties m_properties;
TextureParameters m_parameters;