Be nice to implementations in wayland_egl backend.
authorSamuel Rødal <samuel.rodal@nokia.com>
Thu, 6 Oct 2011 09:46:23 +0000 (11:46 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Fri, 7 Oct 2011 19:29:27 +0000 (21:29 +0200)
Set the texture filtering modes so the implementation doesn't have to.

Change-Id: I5515d61b7a04a9b242039012fc66d26dce7737ec
Reviewed-on: http://codereview.qt-project.org/6223
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>

src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp

index 497c7eb..83f75be 100644 (file)
@@ -122,6 +122,11 @@ GLuint WaylandEglIntegration::createTextureFromBuffer(wl_buffer *buffer)
 
     glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);
 
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
     eglDestroyImageKHR(d->egl_display, image);
 
     return textureId;