diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 121: Make GL_CLAMP_TO_EDGE the default texture wrap mode.

Message ID 20110811085913.22074.91102.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org Aug. 11, 2011, 8:59 a.m. UTC
------------------------------------------------------------
revno: 121
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
timestamp: Thu 2011-08-11 11:42:00 +0300
message:
  Make GL_CLAMP_TO_EDGE the default texture wrap mode.
  
  GLES2 drivers that don't support GL_OES_texture_npot only allow GL_CLAMP_TO_EDGE
  as a texture wrap mode.
modified:
  src/texture.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/texture.cpp'
--- src/texture.cpp	2011-08-10 13:52:40 +0000
+++ src/texture.cpp	2011-08-11 08:42:00 +0000
@@ -165,6 +165,8 @@ 
     glBindTexture(GL_TEXTURE_2D, *tex);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_filter);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, mag_filter);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
     glTexImage2D(GL_TEXTURE_2D, 0, format, image.width, image.height, 0,
                  format, GL_UNSIGNED_BYTE, image.pixels);