From 1259693f21734b0ebe1b5c95688ad91956c2629c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 6 Oct 2013 15:56:44 +0200 Subject: Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check --- make/config/jogl/gl-common.cfg | 6 ++++++ make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'make') diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg index a1b09c5b4..b84115445 100644 --- a/make/config/jogl/gl-common.cfg +++ b/make/config/jogl/gl-common.cfg @@ -591,6 +591,9 @@ BufferObjectKind Element glDrawElementsInstancedBaseVertexBaseInstance BufferObjectKind Element glDrawRangeElements BufferObjectKind Element glDrawRangeElementsBaseVertex +BufferObjectKind Indirect glDrawArraysIndirect +BufferObjectKind Indirect glDrawElementsIndirect + # There are no PBOs in the embedded OpenGL variants right now BufferObjectKind UnpackPixel glBitmap BufferObjectKind UnpackPixel glColorTable @@ -651,6 +654,9 @@ RangeCheck glDrawElementsInstancedBaseVertexBaseInstance 3 {1} RangeCheck glDrawRangeElements 5 {3} RangeCheck glDrawRangeElementsBaseVertex 5 {3} +RangeCheck glDrawArraysIndirect 1 1 +RangeCheck glDrawElementsIndirect 2 1 + RangeCheck glEdgeFlagPointer 1 1 RangeCheck glElementPointerATI 1 1 RangeCheck glFogCoordPointer 2 1 diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java index d1a4ceda0..c769ddcfa 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java @@ -366,6 +366,22 @@ private final boolean checkElementVBOBound(boolean throwException) { "element vertex_buffer_object", throwException); } +private final boolean checkIndirectVBOUnbound(boolean throwException) { + return checkBufferObject(haveGL15 || haveARBVertexBufferObject, + haveARBVertexArrayObject, // allowVAO + false, // bound + GL4.GL_DRAW_INDIRECT_BUFFER, + "indirect vertex_buffer_object", throwException); +} + +private final boolean checkIndirectVBOBound(boolean throwException) { + return checkBufferObject(haveGL15 || haveARBVertexBufferObject, + haveARBVertexArrayObject, // allowVAO + true, // bound + GL4.GL_DRAW_INDIRECT_BUFFER, + "indirect vertex_buffer_object", throwException); +} + private final boolean checkUnpackPBOUnbound(boolean throwException) { return checkBufferObject(haveGL21 || haveARBPixelBufferObject || haveEXTPixelBufferObject, false, // allowVAO -- cgit v1.2.3