summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-12-22 09:53:00 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-12-22 09:53:00 +0100
commit96f72a8f8e5f0bee3ce3bb92cc859e28e59fa45c (patch)
treed5e0cb7db578a37c1ad7cc0fd0f0ffe71a0a0624
parentf4560ff1e42aa5655376490f601ae15a5058c3b9 (diff)
compile and work
-rw-r--r--src/adaptationlayers/qsgthreadedtexturemanager.cpp4
-rw-r--r--src/scenegraph/coreapi/qsgtexturemanager.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/adaptationlayers/qsgthreadedtexturemanager.cpp b/src/adaptationlayers/qsgthreadedtexturemanager.cpp
index 8fa207b..6e5dc91 100644
--- a/src/adaptationlayers/qsgthreadedtexturemanager.cpp
+++ b/src/adaptationlayers/qsgthreadedtexturemanager.cpp
@@ -215,8 +215,8 @@ void QSGThreadedTextureManager::uploadInThread(const QImage &image, QSGTexture *
glBindTexture(GL_TEXTURE_2D, id);
QImage copy = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
-// swizzleBGRAToRGBA(&copy);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, image.constBits());
+ swizzleBGRAToRGBA(&copy);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, image.constBits());
bool fail = glGetError() != GL_NO_ERROR;
diff --git a/src/scenegraph/coreapi/qsgtexturemanager.cpp b/src/scenegraph/coreapi/qsgtexturemanager.cpp
index 31b8d5f..433a012 100644
--- a/src/scenegraph/coreapi/qsgtexturemanager.cpp
+++ b/src/scenegraph/coreapi/qsgtexturemanager.cpp
@@ -182,7 +182,7 @@ uint QSGTextureManagerPrivate::upload(const QImage &image, GLuint id)
QImage i = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
#ifdef QT_OPENGL_ES
- swizzleBGRAToRGBA(&i);
+ QSGTextureManager::swizzleBGRAToRGBA(&i);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, i.width(), i.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, i.constBits());
#else
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, image.constBits());