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 <[email protected]> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to