diff options
author | Sven Gothel <[email protected]> | 2013-10-10 13:16:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-10 13:16:39 +0200 |
commit | 8363df5da5794faf10478789954992cef0c0d50f (patch) | |
tree | e313bd6254abfcd6af9252d644ee33ae7a44b84c /make | |
parent | 4e83a5df7a851cc33d85f76381f058256906ad4c (diff) |
Bug 852: Validate CPU sourced data API is allowed, throw exception if not. GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
Diffstat (limited to 'make')
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java | 15 | ||||
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-gles3.java | 12 | ||||
-rw-r--r-- | make/scripts/tests.sh | 4 |
3 files changed, 29 insertions, 2 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 diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 023d37d74..eb8a119a7 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -299,14 +299,14 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelsAWT $* -testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* +#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NewtCanvasAWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NEWT $* #testawtswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* -#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $* +testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $* #testswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $* #testswt com.jogamp.opengl.test.junit.jogl.demos.es2.swt.TestGearsES2SWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT $* |