glMultiDrawArraysIndirect usage
Posted by luca.moretto on Jan 15, 2014; 10:31am
URL: https://forum.jogamp.org/glMultiDrawArraysIndirect-usage-tp4031230.html
Hello everyone!
I'm having some problems using the glMultiDrawArraysIndirect draw function.
I have a buffer bound to GL_DRAW_INDIRECT_BUFFER containing the correct draw commands.
If i use the glDrawArraysIndirect function passing 0 or another buffer offset, it works.
However, when I try the Multi version of the function, I'm not able to make it work.
Instead of a long "indirect" offset argument, the Multi function takes a Buffer argument.
I tried different approaches, but without success:
- passing null as buffer (to have a 0 offset in the GL_DRAW_INDIRECT_BUFFER): the whole machine crashes
- passing a ByteBuffer with four bytes all initialized to 0 (also in this case to have a 0 offset): the function causes GL_INVALID_OPERATION
- passing an IntBuffer with one integer initialized to 0: the function causes GL_INVALID_OPERATION again.
In native OpenGL, passing NULL as the "indirect" pointer works fine. However, in JOGL I'm not able to achieve the same result.
Just some more information: I'm using the GL4 interface and my graphics card supports OpenGL 4.3.
Can anybody help me?
Thank you!