From ab3649b02eeddc7a0d932a7afad63a7ca4890483 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 7 Dec 2010 07:49:03 +0100 Subject: Remove hacks required by bad threading initialization --- src/adaptationlayers/qsgeglfsthreadedtexturemanager.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/adaptationlayers/qsgeglfsthreadedtexturemanager.cpp b/src/adaptationlayers/qsgeglfsthreadedtexturemanager.cpp index b868979..9a285eb 100644 --- a/src/adaptationlayers/qsgeglfsthreadedtexturemanager.cpp +++ b/src/adaptationlayers/qsgeglfsthreadedtexturemanager.cpp @@ -107,8 +107,6 @@ static inline void qgl_byteSwapImage(QImage &img) void QSGEglFSThreadedTextureManager::uploadInThread(TextureReference *texture, const QImage &im, UploadHints hints) { - while (glGetError() != GL_NO_ERROR) printf("bust...\n"); - #ifdef DO_TIMING QTime time; time.start(); @@ -126,17 +124,12 @@ void QSGEglFSThreadedTextureManager::uploadInThread(TextureReference *texture, c int bpl = image.bytesPerLine(); const uchar *bits = image.constBits(); - // This should not be neccesary... - if (d->uploadsScanlines) - makeThreadContextCurrent(); - GLuint id; glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); if (d->uploadsScanlines) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); - glBindTexture(GL_TEXTURE_2D, id); // Should also not be required, but it fails without... driver bug, for sure.. for (int y=0; ysetAlphaChannel(image.hasAlphaChannel()); texture->setOwnsTexture(true); texture->setTextureId(id); texture->setTextureSize(image.size()); -- cgit v1.2.3