   Memory savings : vertexarrays within displaylist
  Hi,I have a performance question regarding opengl and vertexarrays within display lists.I have 1000 verticies stored in a simple static float arrayGLfloat verts[] = {20,5,3...}I may use the glVertexPointer func to point to this data,but I do everything within a display listLet see an example<code/>glNewList(...,GL_COMPILE);   ...   glVertexPointer(3,GL_FLOAT,0,verts);   ...glEndList();</code>Simple. The point is that I have many display list like above which are pointing to the same verticies array (verts).If I create 50 of such display lists then I could saythat my 1000 verticies are copied to the video card memory 50 times.Am I right?Or I hope opengl somehow recognize that it is the same data for each display list and it does not multiply it in the videocard memory.Is the VBO is better in that case ?Thank you Guys   
  You can't store vertex arrays in a display list (have a look here - last paragraph of the first section).   ;  Hi Lord_EvilI have checked your links, it is very interesting :)I got the line which is saying that it is not allowed to inlcude glVertexpointer ...Actually I DO include VA's into display lists, and it works without any problem.This is not just me who uses this method, check for example the Gametutorials.com Octree3 tutorial. Exactly the same.How could it be :)So hope some third person will clarify this for us :)Right now I would say the doc is wrongAnyway regarding my post I am just curios how memory efficient is to have multiple DL which sharing the same float array for verticies.   ;  im pretty sure it will need to create 50 lists (each with their own memory)if the data's gonna be the samethen youre better just creating it once+ then call the following 50xglMultMatrix( x );glCallList( y );   ;Quote:Original post by kratActually I DO include VA's into display lists, and it works without any problem.This is not just me who uses this method, check for example the Gametutorials.com Octree3 tutorial. Exactly the same.How could it be :)The line saying that VAs cannot be included into display lists is from the OpenGL spec, which is quite ancient and at the time it probably made sense. Current OpenGL implementations can choose not to follow the spec. It's kind of dangerous to use these "hidden" features because you never know how an implementation is going to handle them.   ;  I've never got it that way...   ;  Actually, I was wrong about display lists and vertex arrays. I just double checked the OpenGL spec and it's clearly defined what happens when you call glDrawElements inside a display list. glEnableClientState, glVertexPointer and other such functions don't go into the display list, but they are used to construct it. When glDrawElements is called OpenGL copies the data from the current vertex pointers into the display list. I'm guessing it's done the same way as if glBegin/glEnd was used.The following two snippets are equivalent:glNewList(..., GL_COMPILE);glVertexPointer(...);glNormalPointer(...);glDrawElements();glEndList();glNewList(..., GL_COMPILE);for(int i=0; i<size; i++){   glBegin(...);   glVertex3f(...);   glNormal3f(...);   glEnd();}glEndList();So, if you create 50 display lists from the same data, the data will be duplicated 50 times.   ;  Rationale behind that: when display lists were introduced, indirect rendering to render farms via network was sort of widespread.The DL acted like a "filter" on server' side: it didn't record how the data where created but what data were flowing thuru the pipe when entering server's pipe.This worked surprisingly well even on direct rendering modes and still works sort-of-ok-ish now, but it's unnecessarily complicated since you can already store most stuff in server memory using specific procedures/resources.The old spec says that arrays are just the same as a Begin/End pair with a loop inside, but it does something more, it takes data from a memory region.The data about the memory region is "lost". The data values are recorded.   ;  I got it, so for me only one choice left:I will just simply use VA without DL.(and could not dealloacte the indicies and texcs arrays from the memory)What Zedz said could not be done, because, yes, the vertex pool is the same but the face incdicies are vary for each DL.Thank you very much for your posts!