summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Blin <olivier.blin@softathome.com>2015-02-17 20:21:56 +0100
committerOlivier Blin <qt@blino.org>2015-03-29 11:20:24 +0000
commitd34c9a609c1bb9a0d1225a250e90bc43ba277c9b (patch)
tree7bb68d33f71d72378463bb543f8dee2281ca89c6
parenta110f0bbf732db1019d19a276a2145db4269523b (diff)
downloadqtwayland-d34c9a609c1bb9a0d1225a250e90bc43ba277c9b.tar.gz
qtwayland-d34c9a609c1bb9a0d1225a250e90bc43ba277c9b.tar.bz2
qtwayland-d34c9a609c1bb9a0d1225a250e90bc43ba277c9b.zip
qwindow-compositor: fix rendering shm NPOT textures with OpenGL ES2
Always use GL_CLAMP_TO_EDGE instead of GL_REPEAT, since OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT by default, and repeat is not needed anyway. See also qtbase commits: 8dfeb1c374972f06759a92b4edc5d6a18b96ccec 8ab1323842433fb6b45e7d6f381b4b9710a81da9 72558e810d9b3493dabfc936fa6c8bf3c3f3b49c Change-Id: I01770fe3352da05baf6898d63c091bfae95e7a98 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
-rw-r--r--examples/wayland/qwindow-compositor/qwindowcompositor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
index c933152d..ab6722a0 100644
--- a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
+++ b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
@@ -88,6 +88,7 @@ public:
if (bufferRef) {
if (bufferRef.isShm()) {
shmTex = new QOpenGLTexture(bufferRef.image(), QOpenGLTexture::DontGenerateMipMaps);
+ shmTex->setWrapMode(QOpenGLTexture::ClampToEdge);
texture = shmTex->textureId();
} else {
texture = bufferRef.createTexture();