diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-04-28 12:36:25 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-07-02 10:25:08 (GMT) |
commit | 0441db10ddf2bd9141d7801e1e53c9cbdde2ebc7 (patch) | |
tree | 5d8dcff3a2d031fcb20cf4f4b57b640235b9c42d /src/opengl | |
parent | 83abd5b9c8cf2b069c6b065ad37c93afe59d5d03 (diff) | |
download | Qt-0441db10ddf2bd9141d7801e1e53c9cbdde2ebc7.zip Qt-0441db10ddf2bd9141d7801e1e53c9cbdde2ebc7.tar.gz Qt-0441db10ddf2bd9141d7801e1e53c9cbdde2ebc7.tar.bz2 |
Remove the DDS texture cache.
It has no practical use and is a leftover from when pixmap/image
textures and dds textures used the same cache.
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl.cpp | 26 | ||||
-rw-r--r-- | src/opengl/qgl_p.h | 3 |
2 files changed, 0 insertions, 29 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 753a984..3e556e0 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2089,20 +2089,10 @@ void QGLContextPrivate::syncGlState() GLuint QGLContext::bindTexture(const QString &fileName) { - Q_D(QGLContext); - QGLDDSCache *dds_cache = &(d->group->m_dds_cache); - QGLDDSCache::const_iterator it = dds_cache->constFind(fileName); - if (it != dds_cache->constEnd()) { - glBindTexture(GL_TEXTURE_2D, it.value()); - return it.value(); - } - QGLTexture texture(this); QSize size = texture.bindCompressedTexture(fileName); if (!size.isValid()) return 0; - - dds_cache->insert(fileName, texture.id); return texture.id; } @@ -2728,24 +2718,8 @@ GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, Q */ void QGLContext::deleteTexture(GLuint id) { - Q_D(QGLContext); - if (QGLTextureCache::instance()->remove(this, id)) return; - - // check the DDS cache if the texture wasn't found in the pixmap/image - // cache - QGLDDSCache *dds_cache = &(d->group->m_dds_cache); - QList<QString> ddsKeys = dds_cache->keys(); - for (int i = 0; i < ddsKeys.size(); ++i) { - GLuint texture = dds_cache->value(ddsKeys.at(i)); - if (id == texture) { - dds_cache->remove(ddsKeys.at(i)); - break; - } - } - - // Finally, actually delete the texture ID glDeleteTextures(1, &id); } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 1399359..9b1856e 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -209,8 +209,6 @@ public: class QGLContextResource; class QGLSharedResourceGuard; -typedef QHash<QString, GLuint> QGLDDSCache; - // QGLContextPrivate has the responsibility of creating context groups. // QGLContextPrivate maintains the reference counter and destroys // context groups when needed. @@ -239,7 +237,6 @@ private: QHash<QGLContextResource *, void *> m_resources; QGLSharedResourceGuard *m_guards; // double-linked list of active guards. QAtomicInt m_refs; - QGLDDSCache m_dds_cache; void cleanupResources(const QGLContext *ctx); |