diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-12-03 00:07:22 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-12-06 21:52:53 (GMT) |
commit | 147195bccfdf90924a1525398e9c7b3119c1e278 (patch) | |
tree | 1e75453e2952568a33083e2bd0f251c43c637431 /src/opengl/qpixmapdata_gl_p.h | |
parent | 76c415b586991d978d46a888fb40c631513407dc (diff) | |
download | Qt-147195bccfdf90924a1525398e9c7b3119c1e278.zip Qt-147195bccfdf90924a1525398e9c7b3119c1e278.tar.gz Qt-147195bccfdf90924a1525398e9c7b3119c1e278.tar.bz2 |
Compressed texture binding for QtOpenGL: ETC1 and PVRTC
The QGLContext::bindTexture(QString) function has been augmented
with support for ETC1, PVRTC2, and PVRTC4 compressed textures,
in addition to the existing DDS support.
The QGLPixmapData class has also been modified to recognize
compressed texture formats in fromFile() and fromData().
This change also fixes a bug in bindTexture() that prevented
the same compressed texture file from being bound in multiple
contexts. There is now a separate file cache for each context group.
Task-number: QT-2547
Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qpixmapdata_gl_p.h')
-rw-r--r-- | src/opengl/qpixmapdata_gl_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 8a13e03..007c52a 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -106,6 +106,10 @@ public: // Re-implemented from QPixmapData: void resize(int width, int height); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); + bool fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags); + bool fromData(const uchar *buffer, uint len, const char *format, + Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); bool scroll(int dx, int dy, const QRect &rect); void fill(const QColor &color); |