summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_gl.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-01-22 11:39:18 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-01-22 11:42:22 (GMT)
commit2ab883ca32df15f649b98120278707e078668c05 (patch)
tree24660f7a3464197f897b94d9fff646ad24166097 /src/opengl/qpixmapdata_gl.cpp
parent89664f6c813449afa41db13e00a0b0f46c36365f (diff)
downloadQt-2ab883ca32df15f649b98120278707e078668c05.zip
Qt-2ab883ca32df15f649b98120278707e078668c05.tar.gz
Qt-2ab883ca32df15f649b98120278707e078668c05.tar.bz2
Fix y-inverted pixmaps properly.
There is a lot of code depending on that pixmaps are flipped upside down in the gl graphicssystem, so toggling this requires extensive testing. Since we're anyway questioning the relevance of this feature (compared to raster + GL viewport) its simply not worth the effort to fix it properly right now. Revert "Fixed y-inverted pixmaps on N900." This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01.
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())