using texture wrap setting

This commit is contained in:
codeanticode
2012-05-27 02:48:27 +00:00
parent 415cb64449
commit 8ebc40e7b7
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -444,6 +444,7 @@ public interface PConstants {
public static final int BILINEAR = 3;
/** This constant identifies the linear/linear function to build mipmaps */
public static final int TRILINEAR = 4;
/** This constant identifies the clamp-to-edge wrapping mode */
public static final int CLAMP = 0;
/** This constant identifies the repeat wrapping mode */
@@ -5183,6 +5183,8 @@ public class PGraphicsOpenGL extends PGraphics {
PTexture.Parameters params = (PTexture.Parameters)img.getParams(pgPrimary);
if (params == null) {
params = PTexture.newParameters();
params.wrapU = textureWrap;
params.wrapV = textureWrap;
img.setParams(pgPrimary, params);
}
if (img.parent == null) {