Problem using EXT_multi_draw_arrays + ARB_vertex_buffer_object

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:

  1. count pointer should be real pointer or VBO offset?
  2. indices pointer should be real pointer or VBO offset?
  3. indices[n] pointer should be real pointer or VBO offset?

yooyo

  1. count is an array of sizei, number of indices to be used for that “primitive”.
  2. & 3. GLVoid** is an array of GLVoid* being in fact OFFSETS (and not pointers).

Thanx… I already do this… Problem is my fault… I put startindex in indices[n] instead of offset… (ie. startindex*sizeof(type)).

This bug cause unbelivable system crash… I have to plug-off power cord from my computer to restart machine :mad:

yooyo