I’m not talking about the color index array, but rather a compilable (locking) array of indexed vertices. Basically, is there an OpenGL equivalent to Direct3D Index Buffers that store indices on the graphics hardware memory? I glanced over the spec doc and extentions listing, but I didn’t see it.
A Google search on “opengl compiled vertex arrays” turned up this as the first result:
Hope that helps.
OK, my fault for not mentioning this. I’ve been using locked vertex arrays for some time. That is:
GL_VERTEX_ARRAY, GL_NORMAL_ARRAY, etc…
I nearly always use glDrawElements() to render primitives from this array, which means I make arrays of indices to vertex array elements to pass in as the last argument for this function. So I was wondering if there was some sort of array locking functionality for these index arrays that would store them locally on the video hardware for faster processing.
Ah, sorry, I misunderstood what you were asking.
I’m afraid I’m not sure the answer to this question. I’m guessing NVidia’s VAR or Ati’s VAO might possess the functionality you’re looking for, but I don’t have experience there. Those would be the first places I would look, though.
Sorry can’t be more helpful.
There’s no vendor independent way to do this in OpenGL. Do look into the ATI_element_array extension though. I’m not sure if nvidias NV_vertex_array_range2 allows indices in agp/vid mem, but I don’t think it does.
NV_vertex_array_range2 defines only a token on top of the existing VAR extension; this token allows the app to not flush when enabling/disabling VAR.
Also, I think I read somewhere (probably on this board) that for ATI cards, indices stored onboard where actually slower than indices stored in system memory. Try a search on this forum.