   Vertex array woes
  I've decided to move my drawing routines from standard immediate mode routines to use vertex arrays (after I get this to work properly I'll move it to use vertex buffer objects). Basically, I have my structure for vertices, normals, and texture coordinates and I have the model loaded and stored in the varaious arrays for each type. When I enable GL_VERTEX_ARRAY and delcare the vertex pointer for the vertex data then attempt to draw the array with glDrawElements nothing is rendered. My question to you is, based on the structures I have what is the proper way to specify the data for glVertexPointer and glDrawElements? The follow is how I'm defining my structures and arrays:// defines a single vertex for the modelstruct sVertex3d {sVertex3d();float vertex[3];};struct sFace{sFace();vector<int> vertlist;// the vertices that make up this facevector<int> normlist;// the list of normals that make up this facevector<int> texcoordlist;// the list of texture coordinates that make up this facestring material;// which material does this face use};sVertex3d *pvertices;sFace *pfaces;This is the section of my draw routine that attempts to use the vertex arrays:glColor3f(1.0, 1.0, 1.0);if(!pfaces[n].vertlist.empty()){glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(3, GL_FLOAT, sizeof(sVertex3d), pvertices[0].vertex);for(i = 1; i <= pfaces[n].vertlist.size(); i++){if(pfaces[n].vertlist.size() == 3)glDrawElements(GL_TRIANGLES, pfaces[n].vertlist.size(), GL_INT, (void*)pfaces[n].vertlist[0]);else if(pfaces[n].vertlist.size() > 3)glDrawElements(GL_POLYGON, pfaces[n].vertlist.size(), GL_INT, &pfaces[n].vertlist[0]);//glVertex3f(pvertices[pfaces[n].vertlist[i-1]].x, pvertices[pfaces[n].vertlist[i-1]].y, pvertices[pfaces[n].vertlist[i-1]].z);}}
  It looks like you're using a glDrawElements call for each vertex? You need just one call for the entire primitive-list.The problem with your sFace struct is that there are separate indices for vertex/texcoord/normal which you can't have. You must arrange the data into a single index array. Until you get that working (which isn't very easy) I suggest you loop through at load time and put the vertices sequentially in a data array. Use glDrawArrays to draw.   