I put all indices in VBO. How tu use it with glMultiDrawElementsEXT? Im not sure about pointers. some of pointes should be VBO offsets, but which one? VBO spec are not clear about this.
How does MultiDrawElements work?
The language gets a little confusing, but I believe it is quite clearly specified in the end. The argument <indices> to MultiDrawElements, which is of type "const void **", is an honest-to-goodness pointer to regular old system memory, no matter whether a buffer is bound or not. That memory in turn consists of an array of <primcount> pointers. If no buffer is bound, each of those <primcount> pointers is a regular pointer. If a buffer is bound, each of those <primcount> pointers is a fake pointer that represents an offset in the buffer object.
If you wanted to put the array of <primcount> offsets in a buffer object, you'd have to define a new extension with a new target.
Without VBO (indices are in system memory) app work fine.
I really need this. I can’t debug my app because system crash when I send (wrong?) params to glMultiDrawElementsEXT.
void glMultiDrawElementsEXT( GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
When indices are in VBO, questions is:
- count pointer should be real pointer or VBO offset?
- indices pointer should be real pointer or VBO offset?
- indices[n] pointer should be real pointer or VBO offset?
yooyo