PDA

View Full Version : MultiDrawIndirect plus Primitive restart



Feature420
05-11-2015, 08:31 AM
Hello.
I have a 3d scene with thousands of drawcalls with a lot of textures, and about 100 primitive restart indices. I decided to use a MultiDrawIndirect. I solved almost all problems exept primitive restart. It doesn't work with MultiDrawIndirect.
I draw scene using single one draw call:

glMultiDrawElementsIndirect(GL_TRIANGLES, GL_UNSIGNED_INT, NULL, numObjects, 0);
What is the most efficient way to replace a primitive restart?

Thank you.

Alfonse Reinheart
05-11-2015, 09:06 AM
I solved almost all problems exept primitive restart. It doesn't work with MultiDrawIndirect.

Yes, it does. It may not work for you due to some problem, but there's nothing in the spec that says it won't work.

Feature420
05-11-2015, 10:32 AM
Yes, it does. It may not work for you due to some problem, but there's nothing in the spec that says it won't work.

Thank you for the tip.

Problem was with this line:
glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
it works with
glDrawElementsBaseVertex(.....)
but it doesn't work with MultiDrawIndirect
I change to glEnable(GL_PRIMITIVE_RESTART); and it works.

Alfonse Reinheart
05-11-2015, 12:24 PM
You should report that as a driver bug.