FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

removed some superfluous references to PGL · p-render/processing@fe0a73e · GitHub

Repository navigation

Commit fe0a73e

Browse files
committed
removed some superfluous references to PGL
1 parent fcd98e0 commit fe0a73e

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎core/src/processing/opengl/PGL.java‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ protected void initTexture(int target, int format, int width, int height,
836836
int initColor) {
837837
int[] glcolor = new int[16 * 16];
838838
Arrays.fill(glcolor, javaToNativeARGB(initColor));
839-
IntBuffer texels = PGL.allocateDirectIntBuffer(16 * 16);
839+
IntBuffer texels = allocateDirectIntBuffer(16 * 16);
840840
texels.put(glcolor);
841841
texels.rewind();
842842
for (int y = 0; y < height; y += 16) {
@@ -987,8 +987,8 @@ protected void drawTexture2D(int id, int texW, int texH, int scrW, int scrH,
987987
uniform1i(tex2DSamplerLoc, 0);
988988

989989
texData.position(0);
990-
bindBuffer(PGL.ARRAY_BUFFER, texGeoVBO);
991-
bufferData(PGL.ARRAY_BUFFER, 16 * SIZEOF_FLOAT, texData, PGL.STATIC_DRAW);
990+
bindBuffer(ARRAY_BUFFER, texGeoVBO);
991+
bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, texData, STATIC_DRAW);
992992

993993
vertexAttribPointer(tex2DVertLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 0);
994994
vertexAttribPointer(tex2DTCoordLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 2 * SIZEOF_FLOAT);
@@ -1113,8 +1113,8 @@ protected void drawTextureRect(int id, int texW, int texH, int scrW, int scrH,
11131113
uniform1i(texRectSamplerLoc, 0);
11141114

11151115
texData.position(0);
1116-
bindBuffer(PGL.ARRAY_BUFFER, texGeoVBO);
1117-
bufferData(PGL.ARRAY_BUFFER, 16 * SIZEOF_FLOAT, texData, PGL.STATIC_DRAW);
1116+
bindBuffer(ARRAY_BUFFER, texGeoVBO);
1117+
bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, texData, STATIC_DRAW);
11181118

11191119
vertexAttribPointer(texRectVertLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 0);
11201120
vertexAttribPointer(texRectTCoordLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 2 * SIZEOF_FLOAT);
@@ -1193,7 +1193,7 @@ protected static int nextPowerOfTwo(int val) {
11931193
* endian) to Java ARGB.
11941194
*/
11951195
protected static int nativeToJavaARGB(int color) {
1196-
if (PGL.BIG_ENDIAN) { // RGBA to ARGB
1196+
if (BIG_ENDIAN) { // RGBA to ARGB
11971197
return (color >>> 8) | ((color << 24) & 0xFF000000);
11981198
// equivalent to
11991199
// ((color >> 8) & 0x00FFFFFF) | ((color << 24) & 0xFF000000)
@@ -1706,7 +1706,7 @@ protected static ByteBuffer allocateByteBuffer(int size) {
17061706

17071707
protected static ByteBuffer allocateByteBuffer(byte[] arr) {
17081708
if (USE_DIRECT_BUFFERS) {
1709-
return PGL.allocateDirectByteBuffer(arr.length);
1709+
return allocateDirectByteBuffer(arr.length);
17101710
} else {
17111711
return ByteBuffer.wrap(arr);
17121712
}
@@ -1717,7 +1717,7 @@ protected static ByteBuffer updateByteBuffer(ByteBuffer buf, byte[] arr,
17171717
boolean wrap) {
17181718
if (USE_DIRECT_BUFFERS) {
17191719
if (buf == null || buf.capacity() < arr.length) {
1720-
buf = PGL.allocateDirectByteBuffer(arr.length);
1720+
buf = allocateDirectByteBuffer(arr.length);
17211721
}
17221722
buf.position(0);
17231723
buf.put(arr);
@@ -1795,7 +1795,7 @@ protected static ShortBuffer allocateShortBuffer(int size) {
17951795

17961796
protected static ShortBuffer allocateShortBuffer(short[] arr) {
17971797
if (USE_DIRECT_BUFFERS) {
1798-
return PGL.allocateDirectShortBuffer(arr.length);
1798+
return allocateDirectShortBuffer(arr.length);
17991799
} else {
18001800
return ShortBuffer.wrap(arr);
18011801
}
@@ -1806,7 +1806,7 @@ protected static ShortBuffer updateShortBuffer(ShortBuffer buf, short[] arr,
18061806
boolean wrap) {
18071807
if (USE_DIRECT_BUFFERS) {
18081808
if (buf == null || buf.capacity() < arr.length) {
1809-
buf = PGL.allocateDirectShortBuffer(arr.length);
1809+
buf = allocateDirectShortBuffer(arr.length);
18101810
}
18111811
buf.position(0);
18121812
buf.put(arr);
@@ -1884,7 +1884,7 @@ protected static IntBuffer allocateIntBuffer(int size) {
18841884

18851885
protected static IntBuffer allocateIntBuffer(int[] arr) {
18861886
if (USE_DIRECT_BUFFERS) {
1887-
return PGL.allocateDirectIntBuffer(arr.length);
1887+
return allocateDirectIntBuffer(arr.length);
18881888
} else {
18891889
return IntBuffer.wrap(arr);
18901890
}
@@ -1895,7 +1895,7 @@ protected static IntBuffer updateIntBuffer(IntBuffer buf, int[] arr,
18951895
boolean wrap) {
18961896
if (USE_DIRECT_BUFFERS) {
18971897
if (buf == null || buf.capacity() < arr.length) {
1898-
buf = PGL.allocateDirectIntBuffer(arr.length);
1898+
buf = allocateDirectIntBuffer(arr.length);
18991899
}
19001900
buf.position(0);
19011901
buf.put(arr);
@@ -1972,7 +1972,7 @@ protected static FloatBuffer allocateFloatBuffer(int size) {
19721972

19731973
protected static FloatBuffer allocateFloatBuffer(float[] arr) {
19741974
if (USE_DIRECT_BUFFERS) {
1975-
return PGL.allocateDirectFloatBuffer(arr.length);
1975+
return allocateDirectFloatBuffer(arr.length);
19761976
} else {
19771977
return FloatBuffer.wrap(arr);
19781978
}
@@ -1983,7 +1983,7 @@ protected static FloatBuffer updateFloatBuffer(FloatBuffer buf, float[] arr,
19831983
boolean wrap) {
19841984
if (USE_DIRECT_BUFFERS) {
19851985
if (buf == null || buf.capacity() < arr.length) {
1986-
buf = PGL.allocateDirectFloatBuffer(arr.length);
1986+
buf = allocateDirectFloatBuffer(arr.length);
19871987
}
19881988
buf.position(0);
19891989
buf.put(arr);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL