Re: [osg-users] Incremental GL compile
Good to know then - my tests so far show a correct and solid behavior. Thanks Robert, ricky On Tue, Jun 17, 2014 at 12:15 PM, Robert Osfield wrote: > HI Ricky, > > Your approach sounds correct. You are correct in that the user > doesn't need to explicitly for the release of GL objects as the OSG > will pass the GL objects across to the OSG's internal object cache to > be release by automatically by the draw thread. Reuse of GL objects > will also happen automatically for you. > > Robert. > > On 17 June 2014 11:07, Riccardo Corsi wrote: > > Hi all, > > > > for a project I'm loading a scene which fits into system memory but most > > likely not in video memory. > > I prefer to load the whole scene at startup to run some pre-processing on > > the scene elements. > > > > What I'm after is then to dynamically precompile/release GL objects at > > runtime for different elements of the scene - I want them precompiled > before > > merging into the visible scene to avoid frame drops. > > > > The way I'm doing it right now is: > > - when adding element, I push them into an > > osgUtil::IncrementalCompileOperation. When compiled I merge them into the > > visible scenegraph > > - when removing, I simply detach the nodes > > > > Is this a correct approach? > > > > In particular, is it correct NOT to release explicitly the GL objects > when > > removing the nodes? > > From what I've read in the archives, osg should do it automatically at an > > appropriate time... > > > > Other hints are welcome :) > > Thanks, > > ricky > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Incremental GL compile
HI Ricky, Your approach sounds correct. You are correct in that the user doesn't need to explicitly for the release of GL objects as the OSG will pass the GL objects across to the OSG's internal object cache to be release by automatically by the draw thread. Reuse of GL objects will also happen automatically for you. Robert. On 17 June 2014 11:07, Riccardo Corsi wrote: > Hi all, > > for a project I'm loading a scene which fits into system memory but most > likely not in video memory. > I prefer to load the whole scene at startup to run some pre-processing on > the scene elements. > > What I'm after is then to dynamically precompile/release GL objects at > runtime for different elements of the scene - I want them precompiled before > merging into the visible scene to avoid frame drops. > > The way I'm doing it right now is: > - when adding element, I push them into an > osgUtil::IncrementalCompileOperation. When compiled I merge them into the > visible scenegraph > - when removing, I simply detach the nodes > > Is this a correct approach? > > In particular, is it correct NOT to release explicitly the GL objects when > removing the nodes? > From what I've read in the archives, osg should do it automatically at an > appropriate time... > > Other hints are welcome :) > Thanks, > ricky > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Incremental GL compile
Hi all, for a project I'm loading a scene which fits into system memory but most likely not in video memory. I prefer to load the whole scene at startup to run some pre-processing on the scene elements. What I'm after is then to dynamically precompile/release GL objects at runtime for different elements of the scene - I want them precompiled before merging into the visible scene to avoid frame drops. The way I'm doing it right now is: - when adding element, I push them into an osgUtil::IncrementalCompileOperation. When compiled I merge them into the visible scenegraph - when removing, I simply detach the nodes Is this a correct approach? In particular, is it correct NOT to release explicitly the GL objects when removing the nodes? >From what I've read in the archives, osg should do it automatically at an appropriate time... Other hints are welcome :) Thanks, ricky ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org