Hi,
I am writing a scene-viewer for Maya and wanted to use display-list for rendering. What I am wondering: What actually do display-lists and what don´t they do? If I have my Mesh stored with independend arrays for Vertices, UVs and so on and do something like:
for(all the polygons in my Mesh)
{
glBegin(GL_POLYGON);
for(unsigned int i=0; i<poly.numVertices(); ++i)
{
glVertex3f(vertexList[poly[i]]);
}
glEnd();
}
will the display-List actually convert this to something like:
…
glBegin(GL_POLYGON);
glVertex3f(0.0f,0.0f,0.0f);
glVertex3f(1.0f,0.0f,0.0f);
glVertex3f(1.0f,1.0f,0.0f);
glVertex3f(0.0f,1.0f,0.0f);
glEnd();
glBegin(GL_POLYGON);
glVertex3f(0.0f,0.0f,1.0f);
glVertex3f(1.0f,0.0f,1.0f);
glVertex3f(2.0f,0.5f,1.0f);
glVertex3f(1.0f,1.0f,1.0f);
glVertex3f(0.0f,1.0f,1.0f);
glEnd();
…
Or will it even further optimize, so it will recognize whether I only draw a triangle, quad or n-shaped Polygon?
I am not looking for the absolute maximum in Performance, since I need to support n-sided Polygons anyway.
Also, will display-list give me any drawbacks when I don´t want to alter the vertex-Positions after I created the mesh (except for bone-animation which will be performed using a vertex-program)
Case