   Display list not displaying.
  Hey all I'm making a level loader for my level files and I'm trying to load them into a display list for more efficient rendering.All I get is a black screen even if I disable lighting (by commenting it out).First here's what I do:1. Load all the vertices into a temporary array. I've verified that they are correctly loaded.2. Create a new display list and fill it with glBegin/glEnd.int vertOffset = 0;for(int i = 0; i < level->numMeshes; i++) //loop through the sub-meshes{   glNewList(level->lists, GL_COMPILE);   for(int v = vertOffset; v < vertOffset + level->numVerts; v++)   { glBegin(GL_TRIANGLES); glTexCoord2f(verts[v].u, verts[v].v); glVertex3f(verts[v].x, verts[v].y, verts[v].z); glEnd();   }   //Add num of verts from the sub-mesh to the offset   vertOffset += level->numVerts;   glEndList();}3. Display the list//GLSETUP StuffglEnable(GL_TEXTURE_2D);glShadeModel(GL_SMOOTH);glClearColor(0.0f, 0.0f, 0.0f, 0.5f);glClearDepth(1.0f);glEnable(GL_DEPTH_TEST);glDepthFunc(GL_LEQUAL);glEnable(GL_LIGHT0);glEnable(GL_LIGHTING);glEnable(GL_COLOR_MATERIAL);glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);//End GLSetup Stuff//Current Frame StuffglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glLoadIdentity();for(int i = 0; i < level.numMeshes; i++){   glTranslatef(0.0f,0.0f,-5.0f);   glColor3fv(whiteColor);   glBindTexture(GL_TEXTURE_2D, level.texPtr);   glCallList(level.lists);}Any help would be appreciated, because I'm not sure exactly what's going wrong. Like I said all I get is a black screen, when I think I should at least get something.Thanks. ^^   
  Inside your create list you're only adding one vertex inside the glBegin/End(GL_TRIANGLES).You'll need 3. Even then you'll be drawing one triangle at a time which is not optimal.Try moving the glBegin before the for loop - just after the list creation, and the glEnd after it.   ;  Also, where is your call to glGenLists?   ;  Thanks guys I appreciate the help I'll put in the three vertices and such also. ^_^About the genLists, good question it is here: earlier in the level loader.level->lists[0] = glGenLists(level->numMeshes);EDIT: Ok I changed my load the list up to this.int polyOffset = 0;for(int i = 0; i < rendList->numMeshes; i++){   glNewList(rendList->lists, GL_COMPILE);   for(int p = polyOffset; p < polyOffset + rendList->numPolys; p++)   {   glBegin(GL_TRIANGLES);   glTexCoord2f(verts[polys.index1].u, verts[polys.index1].v);   glVertex3f(verts[polys.index1].x, verts[polys.index1].y, verts[polys.index1].z);   glTexCoord2f(verts[polys.index2].u, verts[polys.index2].v);   glVertex3f(verts[polys.index2].x, verts[polys.index2].y, verts[polys.index2].z);   glTexCoord2f(verts[polys.index3].u, verts[polys.index3].v);   glVertex3f(verts[polys.index3].x, verts[polys.index2].y, verts[polys.index3].z);   glEnd();   }   polyOffset += rendList->numPolys;   glEndList();}I changed my loader to that now and I have something on screen, but it's not showing up textured so I gotta figure that out. >_>   ;  Are you sure you understand how glGenLists works? You store its first value inside level->lists[0], but that means the subsequent lists are accessed via level->lists[0] + 1, level->lists[0] + 2, etc. It doesn't fill up the array like your for-loop suggests.   ;Quote:Original post by TheBuzzSawAre you sure you understand how glGenLists works? You store its first value inside level->lists[0], but that means the subsequent lists are accessed via level->lists[0] + 1, level->lists[0] + 2, etc. It doesn't fill up the array like your for-loop suggests.Yeah I'll fix that.I have it working with one mesh, it's just untextured. ^_^ I appreciate the help guys.   