summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_gl.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-01-27 10:47:01 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-01-27 10:47:01 (GMT)
commitdd8a0d85b070c363c8e4575ec967ae0ad8dfebec (patch)
tree5901a878931bbd3c4bffed0b0dba332af5e04181 /src/opengl/qpixmapdata_gl.cpp
parentc0160230c4fd6f226d0c5ddabe3762f5fa855768 (diff)
parentec90f6ed28ec735ce963c4257ea1095ecbc6c6ba (diff)
downloadQt-dd8a0d85b070c363c8e4575ec967ae0ad8dfebec.zip
Qt-dd8a0d85b070c363c8e4575ec967ae0ad8dfebec.tar.gz
Qt-dd8a0d85b070c363c8e4575ec967ae0ad8dfebec.tar.bz2
Merge commit 'qt/4.6' into kinetic-declarativeui
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r--src/opengl/qpixmapdata_gl.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 6d47687..aa80664 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -252,10 +252,6 @@ QGLPixmapData::QGLPixmapData(PixelType type)
{
setSerialNumber(++qt_gl_pixmap_serial);
m_glDevice.setPixmapData(this);
-
- // Set InteralBindOptions minus the memory managed, since this
- // QGLTexture is not managed as part of the internal texture cache
- m_texture.options = QGLContext::PremultipliedAlphaBindOption;
}
QGLPixmapData::~QGLPixmapData()
@@ -344,18 +340,18 @@ void QGLPixmapData::ensureCreated() const
}
if (!m_source.isNull()) {
- glBindTexture(target, m_texture.id);
if (external_format == GL_RGB) {
- const QImage tx = m_source.convertToFormat(QImage::Format_RGB888);
+ const QImage tx = m_source.convertToFormat(QImage::Format_RGB888).mirrored(false, true);
+
+ glBindTexture(target, m_texture.id);
glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
GL_UNSIGNED_BYTE, tx.bits());
} else {
const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format);
+
+ glBindTexture(target, m_texture.id);
glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
GL_UNSIGNED_BYTE, tx.bits());
- // convertToGLFormat will flip the Y axis, so it needs to
- // be drawn upside down
- m_texture.options |= QGLContext::InvertedYBindOption;
}
if (useFramebufferObjects())