Skip to content

Commit 1e8de92

Browse files
committed
renamed some functions
1 parent f1ef9c6 commit 1e8de92

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

core/src/processing/opengl/PGL.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ protected Texture wrapBackTexture() {
957957
backTexAttach.minFilter, backTexAttach.magFilter,
958958
backTexAttach.wrapS, backTexAttach.wrapT);
959959
tex.invertedY(true);
960-
tex.setAsColorBuffer();
960+
tex.colorBuffer(true);
961961
pg.setCache(pg, tex);
962962
return tex;
963963
} else {
@@ -967,7 +967,7 @@ protected Texture wrapBackTexture() {
967967
fboWidth, fboHeight, NEAREST, NEAREST,
968968
CLAMP_TO_EDGE, CLAMP_TO_EDGE);
969969
tex.invertedY(true);
970-
tex.setAsColorBuffer();
970+
tex.colorBuffer(true);
971971
pg.setCache(pg, tex);
972972
return tex;
973973
}
@@ -983,7 +983,7 @@ protected Texture wrapFrontTexture() {
983983
frontTexAttach.minFilter, frontTexAttach.magFilter,
984984
frontTexAttach.wrapS, frontTexAttach.wrapT);
985985
tex.invertedY(true);
986-
tex.setAsColorBuffer();
986+
tex.colorBuffer(true);
987987
return tex;
988988
} else {
989989
Texture tex = new Texture();
@@ -992,7 +992,7 @@ protected Texture wrapFrontTexture() {
992992
fboWidth, fboHeight, NEAREST, NEAREST,
993993
CLAMP_TO_EDGE, CLAMP_TO_EDGE);
994994
tex.invertedY(true);
995-
tex.setAsColorBuffer();
995+
tex.colorBuffer(true);
996996
return tex;
997997
}
998998
}

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5302,13 +5302,13 @@ protected void loadTextureImpl(int sampling, boolean mipmap) {
53025302
sampling, mipmap);
53035303
texture = new Texture(width, height, params);
53045304
texture.invertedY(true);
5305-
texture.setAsColorBuffer();
5305+
texture.colorBuffer(true);
53065306
pgPrimary.setCache(this, texture);
53075307

53085308
if (!primarySurface) {
53095309
ptexture = new Texture(width, height, params);
53105310
ptexture.invertedY(true);
5311-
ptexture.setAsColorBuffer();
5311+
ptexture.colorBuffer(true);
53125312
}
53135313
}
53145314
}
@@ -5744,7 +5744,7 @@ protected Texture addTexture(PImage img, Texture.Parameters params) {
57445744

57455745

57465746
protected void checkTexture(Texture tex) {
5747-
if (!tex.isColorBuffer() &&
5747+
if (!tex.colorBuffer() &&
57485748
tex.usingMipmaps == hints[DISABLE_TEXTURE_MIPMAPS]) {
57495749
if (hints[DISABLE_TEXTURE_MIPMAPS]) {
57505750
tex.usingMipmaps(false, textureSampling);

core/src/processing/opengl/Texture.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class Texture implements PConstants {
8080

8181
protected PGL pgl; // The interface between Processing and OpenGL.
8282
protected int context; // The context that created this texture.
83-
protected boolean isColorBuffer; // true if it is the color attachment of
83+
protected boolean colorBuffer; // true if it is the color attachment of
8484
// FrameBuffer object.
8585

8686
protected boolean usingMipmaps;
@@ -114,7 +114,7 @@ public Texture() {
114114
pgl = PGraphicsOpenGL.pgl;
115115
context = pgl.createEmptyContext();
116116

117-
isColorBuffer = false;
117+
colorBuffer = false;
118118

119119
glName = 0;
120120
}
@@ -142,7 +142,7 @@ public Texture(int width, int height, Object params) {
142142
pgl = PGraphicsOpenGL.pgl;
143143
context = pgl.createEmptyContext();
144144

145-
isColorBuffer = false;
145+
colorBuffer = false;
146146

147147
glName = 0;
148148

@@ -1242,13 +1242,13 @@ protected boolean contextIsOutdated() {
12421242
}
12431243

12441244

1245-
protected void setAsColorBuffer() {
1246-
isColorBuffer = true;
1245+
public void colorBuffer(boolean value) {
1246+
colorBuffer = value;
12471247
}
12481248

12491249

1250-
protected boolean isColorBuffer() {
1251-
return isColorBuffer;
1250+
public boolean colorBuffer() {
1251+
return colorBuffer;
12521252
}
12531253

12541254

java/libraries/lwjgl/src/processing/lwjgl/PGL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ protected Texture wrapBackTexture() {
792792
fboWidth, fboHeight, NEAREST, NEAREST,
793793
CLAMP_TO_EDGE, CLAMP_TO_EDGE);
794794
tex.invertedY(true);
795-
tex.colorBufferOf(pg);
795+
tex.colorBuffer(true);
796796
pg.setCache(pg, tex);
797797
return tex;
798798
}
@@ -805,7 +805,7 @@ protected Texture wrapFrontTexture() {
805805
fboWidth, fboHeight, NEAREST, NEAREST,
806806
CLAMP_TO_EDGE, CLAMP_TO_EDGE);
807807
tex.invertedY(true);
808-
tex.colorBufferOf(pg);
808+
tex.colorBuffer(true);
809809
return tex;
810810
}
811811

0 commit comments

Comments
 (0)