-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Osfield wrote: > Hi Tim, > > On Nov 26, 2007 1:10 PM, Tim Moore <[EMAIL PROTECTED]> wrote: >> In revision 7017, which introduced the ability to compile OpenGL buffers >> using pbuffers, >> it looks like you make GL object compilation happen in the pager thread if >> the pbuffers >> aren't available, and you override the checks for available time and maximum >> objects with >> compileAllGLObjects(). It would seem that these two things would guarantee >> dropped frames >> when paging in scenes that have large individual requests. Am I missing >> something, or is >> it vastly preferred to do the object compilation in pbuffers? I've only >> played with that >> a little, but wouldn't seem to be very useful unless you have more than two >> processors. > > You must be misreading the code, compilation of OpenGL objects can > never happen from within the paging thread - it doesn't have a > graphics context to do such a thing, the compilation is either done by > any the threads running pbuffers that are available or the graphics > threads drawing the actual graphics windows themselves. If one > attempted to compile from within the paging thread then the app would > crash. That's what I thought, but starting on line 673 in DatabasePager.cpp, in the run function: if (gc) { osg::GraphicsThread* gt = gc->getGraphicsThread(); if (gt) { gt->add(new DatabasePager::CompileOperation(this)); } else { gc->makeCurrent();
compileAllGLObjects(*(gc->getState())); gc->releaseContext(); } } > > As for preference of pbuffers, we'll its not selected by default so > there isn't a preference for it in terms of the OSG. In your own app > you may find pbuffer and associated graphics threads are effective, > this will depend upon the hardware you have, the quality of the OpenGL > drives (and their ability to handle multi-threaded usage) and the > nature of your models. > > In general paged databases with lots of geometry and textures to load > per tile load will work better with a back ground compile context ( > pbuffer and associated thread) if you have the CPU resouces to support > it. > > Robert. > > Robert. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHSst1eDhWHdXrDRURAnzJAJ4vjiZ754/071XWhvXELDgEFJNqZgCfTmmC IBrZT31nexF890gdQR9XvL8= =Xs56 -----END PGP SIGNATURE----- _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org