| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fcd98e0 commit fe0a73e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -836,7 +836,7 @@ protected void initTexture(int target, int format, int width, int height, | |||
| 836 | 836 | int initColor) { | |
| 837 | 837 | int[] glcolor = new int[16 * 16]; | |
| 838 | 838 | Arrays.fill(glcolor, javaToNativeARGB(initColor)); | |
| 839 | - IntBuffer texels = PGL.allocateDirectIntBuffer(16 * 16); | ||
| 839 | + IntBuffer texels = allocateDirectIntBuffer(16 * 16); | ||
| 840 | 840 | texels.put(glcolor); | |
| 841 | 841 | texels.rewind(); | |
| 842 | 842 | 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, | |||
| 987 | 987 | uniform1i(tex2DSamplerLoc, 0); | |
| 988 | 988 | ||
| 989 | 989 | 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); | ||
| 992 | 992 | ||
| 993 | 993 | vertexAttribPointer(tex2DVertLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 0); | |
| 994 | 994 | 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, | |||
| 1113 | 1113 | uniform1i(texRectSamplerLoc, 0); | |
| 1114 | 1114 | ||
| 1115 | 1115 | 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); | ||
| 1118 | 1118 | ||
| 1119 | 1119 | vertexAttribPointer(texRectVertLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 0); | |
| 1120 | 1120 | vertexAttribPointer(texRectTCoordLoc, 2, FLOAT, false, 4 * SIZEOF_FLOAT, 2 * SIZEOF_FLOAT); | |
@@ -1193,7 +1193,7 @@ protected static int nextPowerOfTwo(int val) { | |||
| 1193 | 1193 | * endian) to Java ARGB. | |
| 1194 | 1194 | */ | |
| 1195 | 1195 | protected static int nativeToJavaARGB(int color) { | |
| 1196 | - if (PGL.BIG_ENDIAN) { // RGBA to ARGB | ||
| 1196 | + if (BIG_ENDIAN) { // RGBA to ARGB | ||
| 1197 | 1197 | return (color >>> 8) | ((color << 24) & 0xFF000000); | |
| 1198 | 1198 | // equivalent to | |
| 1199 | 1199 | // ((color >> 8) & 0x00FFFFFF) | ((color << 24) & 0xFF000000) | |
@@ -1706,7 +1706,7 @@ protected static ByteBuffer allocateByteBuffer(int size) { | |||
| 1706 | 1706 | ||
| 1707 | 1707 | protected static ByteBuffer allocateByteBuffer(byte[] arr) { | |
| 1708 | 1708 | if (USE_DIRECT_BUFFERS) { | |
| 1709 | - return PGL.allocateDirectByteBuffer(arr.length); | ||
| 1709 | + return allocateDirectByteBuffer(arr.length); | ||
| 1710 | 1710 | } else { | |
| 1711 | 1711 | return ByteBuffer.wrap(arr); | |
| 1712 | 1712 | } | |
@@ -1717,7 +1717,7 @@ protected static ByteBuffer updateByteBuffer(ByteBuffer buf, byte[] arr, | |||
| 1717 | 1717 | boolean wrap) { | |
| 1718 | 1718 | if (USE_DIRECT_BUFFERS) { | |
| 1719 | 1719 | if (buf == null || buf.capacity() < arr.length) { | |
| 1720 | - buf = PGL.allocateDirectByteBuffer(arr.length); | ||
| 1720 | + buf = allocateDirectByteBuffer(arr.length); | ||
| 1721 | 1721 | } | |
| 1722 | 1722 | buf.position(0); | |
| 1723 | 1723 | buf.put(arr); | |
@@ -1795,7 +1795,7 @@ protected static ShortBuffer allocateShortBuffer(int size) { | |||
| 1795 | 1795 | ||
| 1796 | 1796 | protected static ShortBuffer allocateShortBuffer(short[] arr) { | |
| 1797 | 1797 | if (USE_DIRECT_BUFFERS) { | |
| 1798 | - return PGL.allocateDirectShortBuffer(arr.length); | ||
| 1798 | + return allocateDirectShortBuffer(arr.length); | ||
| 1799 | 1799 | } else { | |
| 1800 | 1800 | return ShortBuffer.wrap(arr); | |
| 1801 | 1801 | } | |
@@ -1806,7 +1806,7 @@ protected static ShortBuffer updateShortBuffer(ShortBuffer buf, short[] arr, | |||
| 1806 | 1806 | boolean wrap) { | |
| 1807 | 1807 | if (USE_DIRECT_BUFFERS) { | |
| 1808 | 1808 | if (buf == null || buf.capacity() < arr.length) { | |
| 1809 | - buf = PGL.allocateDirectShortBuffer(arr.length); | ||
| 1809 | + buf = allocateDirectShortBuffer(arr.length); | ||
| 1810 | 1810 | } | |
| 1811 | 1811 | buf.position(0); | |
| 1812 | 1812 | buf.put(arr); | |
@@ -1884,7 +1884,7 @@ protected static IntBuffer allocateIntBuffer(int size) { | |||
| 1884 | 1884 | ||
| 1885 | 1885 | protected static IntBuffer allocateIntBuffer(int[] arr) { | |
| 1886 | 1886 | if (USE_DIRECT_BUFFERS) { | |
| 1887 | - return PGL.allocateDirectIntBuffer(arr.length); | ||
| 1887 | + return allocateDirectIntBuffer(arr.length); | ||
| 1888 | 1888 | } else { | |
| 1889 | 1889 | return IntBuffer.wrap(arr); | |
| 1890 | 1890 | } | |
@@ -1895,7 +1895,7 @@ protected static IntBuffer updateIntBuffer(IntBuffer buf, int[] arr, | |||
| 1895 | 1895 | boolean wrap) { | |
| 1896 | 1896 | if (USE_DIRECT_BUFFERS) { | |
| 1897 | 1897 | if (buf == null || buf.capacity() < arr.length) { | |
| 1898 | - buf = PGL.allocateDirectIntBuffer(arr.length); | ||
| 1898 | + buf = allocateDirectIntBuffer(arr.length); | ||
| 1899 | 1899 | } | |
| 1900 | 1900 | buf.position(0); | |
| 1901 | 1901 | buf.put(arr); | |
@@ -1972,7 +1972,7 @@ protected static FloatBuffer allocateFloatBuffer(int size) { | |||
| 1972 | 1972 | ||
| 1973 | 1973 | protected static FloatBuffer allocateFloatBuffer(float[] arr) { | |
| 1974 | 1974 | if (USE_DIRECT_BUFFERS) { | |
| 1975 | - return PGL.allocateDirectFloatBuffer(arr.length); | ||
| 1975 | + return allocateDirectFloatBuffer(arr.length); | ||
| 1976 | 1976 | } else { | |
| 1977 | 1977 | return FloatBuffer.wrap(arr); | |
| 1978 | 1978 | } | |
@@ -1983,7 +1983,7 @@ protected static FloatBuffer updateFloatBuffer(FloatBuffer buf, float[] arr, | |||
| 1983 | 1983 | boolean wrap) { | |
| 1984 | 1984 | if (USE_DIRECT_BUFFERS) { | |
| 1985 | 1985 | if (buf == null || buf.capacity() < arr.length) { | |
| 1986 | - buf = PGL.allocateDirectFloatBuffer(arr.length); | ||
| 1986 | + buf = allocateDirectFloatBuffer(arr.length); | ||
| 1987 | 1987 | } | |
| 1988 | 1988 | buf.position(0); | |
| 1989 | 1989 | buf.put(arr); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments