diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 5fb50e191..e05de8eed 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -957,7 +957,7 @@ public class PGL { backTexAttach.minFilter, backTexAttach.magFilter, backTexAttach.wrapS, backTexAttach.wrapT); tex.invertedY(true); - tex.setAsColorBuffer(); + tex.colorBuffer(true); pg.setCache(pg, tex); return tex; } else { @@ -967,7 +967,7 @@ public class PGL { fboWidth, fboHeight, NEAREST, NEAREST, CLAMP_TO_EDGE, CLAMP_TO_EDGE); tex.invertedY(true); - tex.setAsColorBuffer(); + tex.colorBuffer(true); pg.setCache(pg, tex); return tex; } @@ -983,7 +983,7 @@ public class PGL { frontTexAttach.minFilter, frontTexAttach.magFilter, frontTexAttach.wrapS, frontTexAttach.wrapT); tex.invertedY(true); - tex.setAsColorBuffer(); + tex.colorBuffer(true); return tex; } else { Texture tex = new Texture(); @@ -992,7 +992,7 @@ public class PGL { fboWidth, fboHeight, NEAREST, NEAREST, CLAMP_TO_EDGE, CLAMP_TO_EDGE); tex.invertedY(true); - tex.setAsColorBuffer(); + tex.colorBuffer(true); return tex; } } diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 90299951e..d2b8cc451 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -5302,13 +5302,13 @@ public class PGraphicsOpenGL extends PGraphics { sampling, mipmap); texture = new Texture(width, height, params); texture.invertedY(true); - texture.setAsColorBuffer(); + texture.colorBuffer(true); pgPrimary.setCache(this, texture); if (!primarySurface) { ptexture = new Texture(width, height, params); ptexture.invertedY(true); - ptexture.setAsColorBuffer(); + ptexture.colorBuffer(true); } } } @@ -5744,7 +5744,7 @@ public class PGraphicsOpenGL extends PGraphics { protected void checkTexture(Texture tex) { - if (!tex.isColorBuffer() && + if (!tex.colorBuffer() && tex.usingMipmaps == hints[DISABLE_TEXTURE_MIPMAPS]) { if (hints[DISABLE_TEXTURE_MIPMAPS]) { tex.usingMipmaps(false, textureSampling); diff --git a/core/src/processing/opengl/Texture.java b/core/src/processing/opengl/Texture.java index 2510d6fb6..ce5ba4618 100644 --- a/core/src/processing/opengl/Texture.java +++ b/core/src/processing/opengl/Texture.java @@ -80,7 +80,7 @@ public class Texture implements PConstants { protected PGL pgl; // The interface between Processing and OpenGL. protected int context; // The context that created this texture. - protected boolean isColorBuffer; // true if it is the color attachment of + protected boolean colorBuffer; // true if it is the color attachment of // FrameBuffer object. protected boolean usingMipmaps; @@ -114,7 +114,7 @@ public class Texture implements PConstants { pgl = PGraphicsOpenGL.pgl; context = pgl.createEmptyContext(); - isColorBuffer = false; + colorBuffer = false; glName = 0; } @@ -142,7 +142,7 @@ public class Texture implements PConstants { pgl = PGraphicsOpenGL.pgl; context = pgl.createEmptyContext(); - isColorBuffer = false; + colorBuffer = false; glName = 0; @@ -1242,13 +1242,13 @@ public class Texture implements PConstants { } - protected void setAsColorBuffer() { - isColorBuffer = true; + public void colorBuffer(boolean value) { + colorBuffer = value; } - protected boolean isColorBuffer() { - return isColorBuffer; + public boolean colorBuffer() { + return colorBuffer; } diff --git a/java/libraries/lwjgl/src/processing/lwjgl/PGL.java b/java/libraries/lwjgl/src/processing/lwjgl/PGL.java index d79e828ec..78dbac406 100644 --- a/java/libraries/lwjgl/src/processing/lwjgl/PGL.java +++ b/java/libraries/lwjgl/src/processing/lwjgl/PGL.java @@ -792,7 +792,7 @@ public class PGL extends processing.opengl.PGL { fboWidth, fboHeight, NEAREST, NEAREST, CLAMP_TO_EDGE, CLAMP_TO_EDGE); tex.invertedY(true); - tex.colorBufferOf(pg); + tex.colorBuffer(true); pg.setCache(pg, tex); return tex; } @@ -805,7 +805,7 @@ public class PGL extends processing.opengl.PGL { fboWidth, fboHeight, NEAREST, NEAREST, CLAMP_TO_EDGE, CLAMP_TO_EDGE); tex.invertedY(true); - tex.colorBufferOf(pg); + tex.colorBuffer(true); return tex; }