PDA

View Full Version : Dispalylist



jsmith
04-30-2009, 12:32 AM
Hi,
i have rendered complex polygons using teselation. But here performance is poor for zoom/pan. now i would like to use display list. here i have written one function for rendering

void Render(int Numof points, Double *pointer)
{
gluTessBeginPolygon(tobj, NULL);
gluTessBeginContour(tobj);
for(int u=0;u<vertex-1;u++)
gluTessVertex(tobj, point[u],point[u]);
gluTessEndContour(tobj);
gluTessEndPolygon(tobj);

}

here i pass num of points and that points dynamically.

now how can i use displaylists for this function

thanks in advance

ZbuffeR
04-30-2009, 12:52 AM
Not possible, unless creating a new display list each time you change parameters (and deleting the previous one).

You have to understand the glu* functions are helpers, and are not performance-oriented.
First, try to reduce the level of detail of the tesselation.
If really you need more performance, you will have to separately compute the geometry and store it to a vertex array or VBO.