Sunday, December 03, 2006

Improving performance with display lists

Recently I have been working with shapefiles to add support for it in The Balloon Project. Thanks to the GeoTools I can read the format easyly and render it as line loops (GL_LINE_LOOP).
Initially I was using the brute force for rendering, that is, all points in the window are calculate every time they are going to be rendered. They work for polygons with few points and textures (tile images), but when a shapefile with a thousand of points appears in the scene the brute force is not a good solution.
For this, I change some code and now I am using display list in all my renderable object. The performance has increased surprising in my latpop even with a shapefile.