summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-18 12:52:16 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-07-18 13:14:44 (GMT)
commit7ddf40aa71ca0adb7846bf8b0df2240a3870d894 (patch)
tree6acb5a3e9484b56a96851ad34c008aa67b0d8f5d
parent9f6d3ebf349dbf77a9c499aeea75cb220181658c (diff)
downloadQt-7ddf40aa71ca0adb7846bf8b0df2240a3870d894.zip
Qt-7ddf40aa71ca0adb7846bf8b0df2240a3870d894.tar.gz
Qt-7ddf40aa71ca0adb7846bf8b0df2240a3870d894.tar.bz2
Prevent failed rendering for NPOT textures in GLES2.
Shouldn't use the (default) GL_REPEAT wrap mode on GLES2 unless GL_OES_texture_npot is present. Reviewed-by: Kim
-rw-r--r--src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp
index ec6c33f..73435df 100644
--- a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp
@@ -159,7 +159,9 @@ Qt::HANDLE QMeeGoPixmapData::imageToEGLSharedImage(const QImage &image)
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glBindTexture(GL_TEXTURE_2D, textureId);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
EGLImageKHR eglimage = QEgl::eglCreateImageKHR(QEgl::display(), QEglContext::currentContext(QEgl::OpenGL)->context(),
EGL_GL_TEXTURE_2D_KHR,
(EGLClientBuffer) textureId,