Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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! |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi
In the meantime, until we understand what's wrong, you can use the workaround mentioned in the documentation: http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawArraysIndirect.xml If stride is zero, null should be accepted.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi, and thanks for your answer.
You're right, I made a mistake. null is actually accepted and treated as a 0 offset in the bound buffer. However I would like to understand if and how it is possible to specify a different offset. Whatever value I pass in the "indirect" buffer argument it gives me GL_INVALID_OPERATION. Anyway, if I don't have any buffer bound to GL_DRAW_INDIRECT_BUFFER and I pass to the function a buffer argument which directly contains the drawing command structures, then it works fine. The problem appears only when a buffer is bound to GL_DRAW_INDIRECT_BUFFER, in which case the "indirect" argument should be interpreted as an offset in the bound buffer. |
Loading... |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
We are facing the same problem here.
Sound like there is a missing entry point: glMultiDrawArraysIndirect(int mode, int type, long indirect_offset, int drawcount, int stride) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
On 02/01/2014 12:10 AM, eban [via jogamp] wrote:
> We are facing the same problem here. > Sound like there is a missing entry point: > > glMultiDrawArraysIndirect(int mode, int type, long indirect_offset, int > drawcount, int stride) > > "If a buffer is bound to the GL_DRAW_INDIRECT_BUFFER binding at the time of a call to glMultiDrawArraysIndirect, indirect is interpreted as an offset, in basic machine units, into that buffer and the parameter" Yes, it is missing. And this might also be a requirement for core profiles, where CPU sourced buffers are not allowed ?! Please file a bug report and copy/paste the information - thank you! ~Sven |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by eban
On 02/06/2014 11:44 AM, Sven Gothel wrote:
> On 02/01/2014 12:10 AM, eban [via jogamp] wrote: >> We are facing the same problem here. >> Sound like there is a missing entry point: >> >> glMultiDrawArraysIndirect(int mode, int type, long indirect_offset, int >> drawcount, int stride) >> >> > "If a buffer is bound to the GL_DRAW_INDIRECT_BUFFER binding at the time > of a call to glMultiDrawArraysIndirect, indirect > is interpreted as an offset, in basic machine units, into that buffer and the > parameter" > > Yes, it is missing. And this might also be a requirement for core profiles, > where CPU sourced buffers are not allowed ?! > > Please file a bug report and copy/paste the information - thank you! > > ~Sven > > ... [show rest of quote] ... [show rest of quote] If anybody can provide a unit test - that would be great.
<https://jogamp.org/bugzilla/show_bug.cgi?id=974> ~Sven |
Loading... |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks, in which release will it be included ?
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
On 02/21/2014 05:16 PM, eban [via jogamp] wrote:
> Thanks, in which release will it be included ? > Next 2.1.5 .. ~Sven |
Free forum by Nabble | Edit this page |