From 96f72a8f8e5f0bee3ce3bb92cc859e28e59fa45c Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 22 Dec 2010 09:53:00 +0100 Subject: compile and work --- src/adaptationlayers/qsgthreadedtexturemanager.cpp | 4 ++-- src/scenegraph/coreapi/qsgtexturemanager.cpp | 2 +- 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(©); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, image.constBits()); + swizzleBGRAToRGBA(©); + 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()); -- cgit v1.2.3