lower opengl requirement to 2.1 when higher versions are unsupported #21
No files matched your search
+11
-11
@@ -34,42 +34,42 @@ public class APPLEVertexArrayObject {
|
|||||||
|
|
||||||
public static final boolean supported = bindVertexArray != 0;
|
public static final boolean supported = bindVertexArray != 0;
|
||||||
|
|
||||||
public static void glBindVertexArray(@NativeType("GLuint") int array) {
|
public static void glBindVertexArrayAPPLE(@NativeType("GLuint") int array) {
|
||||||
JNI.callV(array, bindVertexArray);
|
JNI.callV(array, bindVertexArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void nglDeleteVertexArrays(int n, long arrays) {
|
public static void nglDeleteVertexArraysAPPLE(int n, long arrays) {
|
||||||
JNI.callPV(n, arrays, deleteVertexArrays);
|
JNI.callPV(n, arrays, deleteVertexArrays);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glDeleteVertexArrays(@NativeType("GLuint const *") IntBuffer arrays) {
|
public static void glDeleteVertexArraysAPPLE(@NativeType("GLuint const *") IntBuffer arrays) {
|
||||||
nglDeleteVertexArrays(arrays.remaining(), memAddress(arrays));
|
nglDeleteVertexArraysAPPLE(arrays.remaining(), memAddress(arrays));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glDeleteVertexArrays(@NativeType("GLuint const *") int array) {
|
public static void glDeleteVertexArraysAPPLE(@NativeType("GLuint const *") int array) {
|
||||||
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
|
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
|
||||||
try {
|
try {
|
||||||
IntBuffer arrays = stack.callocInt(1);
|
IntBuffer arrays = stack.callocInt(1);
|
||||||
arrays.put(0, array);
|
arrays.put(0, array);
|
||||||
nglDeleteVertexArrays(1, memAddress(arrays));
|
nglDeleteVertexArraysAPPLE(1, memAddress(arrays));
|
||||||
} finally {
|
} finally {
|
||||||
stack.setPointer(stackPointer);
|
stack.setPointer(stackPointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void nglGenVertexArrays(int n, long arrays) {
|
public static void nglGenVertexArraysAPPLE(int n, long arrays) {
|
||||||
JNI.callPV(n, arrays, genVertexArrays);
|
JNI.callPV(n, arrays, genVertexArrays);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glGenVertexArrays(@NativeType("GLuint *") IntBuffer arrays) {
|
public static void glGenVertexArraysAPPLE(@NativeType("GLuint *") IntBuffer arrays) {
|
||||||
nglGenVertexArrays(arrays.remaining(), memAddress(arrays));
|
nglGenVertexArraysAPPLE(arrays.remaining(), memAddress(arrays));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int glGenVertexArrays() {
|
public static int glGenVertexArraysAPPLE() {
|
||||||
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
|
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
|
||||||
try {
|
try {
|
||||||
IntBuffer arrays = stack.callocInt(1);
|
IntBuffer arrays = stack.callocInt(1);
|
||||||
nglGenVertexArrays(1, memAddress(arrays));
|
nglGenVertexArraysAPPLE(1, memAddress(arrays));
|
||||||
return arrays.get(0);
|
return arrays.get(0);
|
||||||
} finally {
|
} finally {
|
||||||
stack.setPointer(stackPointer);
|
stack.setPointer(stackPointer);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.glBindVertexArray(array);
|
ARBVertexArrayObject.glBindVertexArray(array);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.glBindVertexArray(array);
|
APPLEVertexArrayObject.glBindVertexArrayAPPLE(array);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.nglDeleteVertexArrays(n, arrays);
|
ARBVertexArrayObject.nglDeleteVertexArrays(n, arrays);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.nglDeleteVertexArrays(n, arrays);
|
APPLEVertexArrayObject.nglDeleteVertexArraysAPPLE(n, arrays);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.glDeleteVertexArrays(arrays);
|
ARBVertexArrayObject.glDeleteVertexArrays(arrays);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.glDeleteVertexArrays(arrays);
|
APPLEVertexArrayObject.glDeleteVertexArraysAPPLE(arrays);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.glDeleteVertexArrays(array);
|
ARBVertexArrayObject.glDeleteVertexArrays(array);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.glDeleteVertexArrays(array);
|
APPLEVertexArrayObject.glDeleteVertexArraysAPPLE(array);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.nglGenVertexArrays(n, arrays);
|
ARBVertexArrayObject.nglGenVertexArrays(n, arrays);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.nglGenVertexArrays(n, arrays);
|
APPLEVertexArrayObject.nglGenVertexArraysAPPLE(n, arrays);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
ARBVertexArrayObject.glGenVertexArrays(arrays);
|
ARBVertexArrayObject.glGenVertexArrays(arrays);
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
APPLEVertexArrayObject.glGenVertexArrays(arrays);
|
APPLEVertexArrayObject.glGenVertexArraysAPPLE(arrays);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ public class VAOUtil {
|
|||||||
} else if (arbSupported) {
|
} else if (arbSupported) {
|
||||||
return ARBVertexArrayObject.glGenVertexArrays();
|
return ARBVertexArrayObject.glGenVertexArrays();
|
||||||
} else if (appleSupported) {
|
} else if (appleSupported) {
|
||||||
return APPLEVertexArrayObject.glGenVertexArrays();
|
return APPLEVertexArrayObject.glGenVertexArraysAPPLE();
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("VAO not supported");
|
throw new UnsupportedOperationException("VAO not supported");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user