[osg-users] DatabasePager - Display list compilation
lionel.lagarde at oktal.fr
Tue Oct 2 02:08:23 PDT 2007
When the database pager is requested to compile the paged drawables, (in
the DatabasePager::compileGLObjects method) it calls the
compileGLObjects method of the drawable contained in the DataToCompile map.
This method delete the display list of the drawable if it already exists.
In the case of multi instance paged drawables (trees for example), the
database pager compile and recompile and rerecompile the same drawable
for each request.
It takes time and eats the _maximumNumOfObjectsToCompilePerFrame counter.
Maybe the FindCompileableGLObjectsVisitor can check if the drawable has
already been compiled.
The same thing can be made for texture compilation. They are not
re-uploaded in the video memory if the image hasn't been modified by the
DatabasePager try to compile them and
eat the _maximumNumOfObjectsToCompilePerFrame counter.
I don't see in the code where the VBO geometries are compiled. The VBO
creation is integrated in the Geometry::drawImplementation method. The
compilation is delayed in the rendering traversal. For big VBOs, it
causes frame drops because the everything that is in the render
graph is compiled.
It would be great if the VBO compilation can be decorrelated of the draw
More information about the osg-users