   Fast Vertex Arrays?
  hey, i''m kinda stuck on an idea that uses vertex arays. What i want to do is have a giant array with all needed vertice data in it. This is all fine except if the user wants to add some verticie data mid-game. This would require one of two ways. The first is that you create a new array for each newly added mid game verticie data. But this would be slow because you would have to see what list the verticie is in, in order to set it and render it. The second idea i had was to create a new array, the size of the original one plus the size of the new data. But i fear that using memcpy or memmve would be slow as the array could be thousands of elements big. Do any of you have an ideas on what is faster or have any better ideas. Thanks in advance 
Not quite sure what you want to do, but generally with large amounts of data an array is bad like you said for inserting/deleting.A tree or linked list to hold your vertice stucts would be good, not sure how it would work with vertex arrays though. ;quote:Original post by rpg_code_master  ...What i want to do is have a giant array with all needed vertice data in it....Bad idea. _Especially_ if you want to be able to change the vertex array.-Lev;  but surely it would be faster then having to change arrays and checking what array each vertex is in. What do you think about giving each array an index, and each verticie would have the index of the array it is in. That way there is no checking to what array the ceticie is in? ;  Tell us what you''re trying to do.-Lev ;  Why would you need to check which array a vertex is in?  Each mesh should simply know where its vertices are stored.  If you use VBO you could store the handle to the buffer with the mesh.  If you''re just using standard VAs, you could create a vertex array class or struct that contains the vertex data, the number of vertices in the array, and an index (sorta like a VBO handle).  The mesh would also store the appropriate index for the VA with its vertices.  This is what I do, actually, as it allows for a seamless fallback to VAs in case VBO isn''t supported. ;  You need to know what array the verticies are stored in so that you are able to set them, and what is VBO? ;  VBO is ARB_vertex_buffer_objects, an extension for storing vertex data in server-side memory -- in other words: video memory or AGP memory (depending on the hardware/driver implementation).http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txthttp://www.opengl.org/documentation/specs/version1.5/glspec15.pdfBack to keeping track of vertices. . .  If each mesh object keeps track of which array its vertices are in with a simple index or even a pointer to that array, it should be easy to decide which which array to use in the gl*Pointer functions. ;  rpg_code: I really suggest you to explain what you''re trying to do, because most things you said are crap ideas and indicate more crap ideas you already implemented/decided to implement. I''m sure we can help you if you tell us what you''re doing. And not things like "You need to know what array the verticies are stored in so that you are able to set them". It really makes little sense.-Lev ;  okie then, basicly, i want to create a vertex array manager that allows a fast method of adding verticies to an alredy existing array to save changing what array is set. 