Hi,

I have some big scenes (just one ive file each one). After the viewer is 
initialized i load one of these scenes (imagine a long road with curves) and i 
make the camera go along a path. 
The problem is that i notice some frame drops (peaks, mainly in curves, when 
new geometry comes in view). When i make a second pass, this frame drops 
disappear. I also used a small app for testing graphics memory and i saw that 
in these peaks, graphics memory usagge grows, so i guess that the main problem 
are textures being loaded in graphics card.

Looking in the forum I found some interesting threads about using 
GLObjectVisitor, but this didnt solve the problem. I dont know if i did 
something wrong or just this was not the solution:

struct CompileCallback : public osg::Camera::DrawCallback 
{ 
        virtual void operator() (const osg::Camera& camera)
        { 
                osgUtil::GLObjectsVisitor gov; 
                const_cast<osg::Camera&>(camera).accept(gov); 
        }
}; 

view->getCamera()->setPreDrawCallback(new CompileCallback);


I also tried a solution given in this post:
http://forum.openscenegraph.org/viewtopic.php?t=3330

viewer->setIncrementalCompileOperation(new 
osgUtil::IncrementalCompileOperation());

After viewer initialization (and before loadint the scene). The results where 
just the same.

Is there any way to preload textures in graphics card? Any other sugestion?



Thank you!

Cheers,
Joseba

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19545#19545





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to