aboutsummaryrefslogtreecommitdiffstats
path: root/make/config
diff options
context:
space:
mode:
Diffstat (limited to 'make/config')
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java15
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gles3.java12
2 files changed, 27 insertions, 0 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
index c769ddcfa..30047278b 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -334,7 +334,16 @@ private final boolean checkBufferObject(boolean extensionAvail,
}
}
+private final void validateCPUSourcedAvail() {
+ if(!_context.isCPUDataSourcingAvail()) {
+ throw new GLException("CPU data sourcing n/a w/ "+_context);
+ }
+}
+
private final boolean checkArrayVBOUnbound(boolean throwException) {
+ if(throwException) {
+ validateCPUSourcedAvail();
+ }
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
false, // bound
@@ -351,6 +360,9 @@ private final boolean checkArrayVBOBound(boolean throwException) {
}
private final boolean checkElementVBOUnbound(boolean throwException) {
+ if(throwException) {
+ validateCPUSourcedAvail();
+ }
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
false, // bound
@@ -367,6 +379,9 @@ private final boolean checkElementVBOBound(boolean throwException) {
}
private final boolean checkIndirectVBOUnbound(boolean throwException) {
+ if(throwException) {
+ validateCPUSourcedAvail();
+ }
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
false, // bound
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java
index 38deb3399..83bdd7691 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java
@@ -255,7 +255,16 @@ private final boolean checkBufferObject(boolean extensionAvail,
}
}
+private final void validateCPUSourcedAvail() {
+ if(!_context.isCPUDataSourcingAvail()) {
+ throw new GLException("CPU data sourcing n/a w/ "+_context);
+ }
+}
+
private final boolean checkArrayVBOUnbound(boolean throwException) {
+ if(throwException) {
+ validateCPUSourcedAvail();
+ }
return checkBufferObject(true,
_isES3, // allowVAO
false, // bound
@@ -272,6 +281,9 @@ private final boolean checkArrayVBOBound(boolean throwException) {
}
private final boolean checkElementVBOUnbound(boolean throwException) {
+ if(throwException) {
+ validateCPUSourcedAvail();
+ }
return checkBufferObject(true,
_isES3, // allowVAO
false, // bound