summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/gluegen/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-06 15:56:44 +0200
committerSven Gothel <[email protected]>2013-10-06 15:56:44 +0200
commit1259693f21734b0ebe1b5c95688ad91956c2629c (patch)
tree292b63912a7c9d67a9cf37ac054b8e344b282aac /src/jogl/classes/com/jogamp/gluegen/opengl
parentff86d8398ce66abddff4cbada8eabd1314a11d7b (diff)
Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check
Diffstat (limited to 'src/jogl/classes/com/jogamp/gluegen/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java6
-rw-r--r--src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
index 7fdb93e9b..861957c23 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
@@ -127,10 +127,12 @@ public class GLConfiguration extends ProcAddressConfiguration {
kind = GLEmitter.BufferObjectKind.ARRAY;
} else if (kindString.equalsIgnoreCase("Element")) {
kind = GLEmitter.BufferObjectKind.ELEMENT;
+ } else if (kindString.equalsIgnoreCase("Indirect")) {
+ kind = GLEmitter.BufferObjectKind.INDIRECT;
} else {
throw new RuntimeException("Error parsing \"BufferObjectKind\" command at line " + lineNo
+ " in file \"" + filename + "\": illegal BufferObjectKind \""
- + kindString + "\", expected one of UnpackPixel, PackPixel, Array, or Element");
+ + kindString + "\", expected one of UnpackPixel, PackPixel, Array, Element or Indirect");
}
bufferObjectKinds.put(target, kind);
@@ -171,6 +173,8 @@ public class GLConfiguration extends ProcAddressConfiguration {
prologue = prologue + "ArrayVBO";
} else if (kind == GLEmitter.BufferObjectKind.ELEMENT) {
prologue = prologue + "ElementVBO";
+ } else if (kind == GLEmitter.BufferObjectKind.INDIRECT) {
+ prologue = prologue + "IndirectVBO";
} else {
throw new RuntimeException("Unknown BufferObjectKind " + kind);
}
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
index 075c8bfd8..fec90d047 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
@@ -74,7 +74,7 @@ public class GLEmitter extends ProcAddressEmitter {
// Buffer Object variants. Used as a Set rather than a Map.
private Map<MethodBinding, MethodBinding> bufferObjectMethodBindings = new IdentityHashMap<MethodBinding, MethodBinding>();
- enum BufferObjectKind { UNPACK_PIXEL, PACK_PIXEL, ARRAY, ELEMENT}
+ enum BufferObjectKind { UNPACK_PIXEL, PACK_PIXEL, ARRAY, ELEMENT, INDIRECT}
@Override
public void beginEmission(GlueEmitterControls controls) throws IOException {