Hi Paul,

The proper way to solve issues like this is to create a singleton in
the core osg library that various classes for constructing and
deleting OpenGL objects are registered, then methods like the
GraphicsContext::close() would go to this singleton and do the
appropriate flushes.  I have had such a design in mind for a long
time, but alas not the breathing space to go and implement it.

Also associated with such a singleton would be implementing extension
support in a similar scheme, such that when a graphics context gets
created the extensions are all setup automatically for it.

Along the same lines OpenGL object id's could be moved into osg::State
rather than being cached in local vectors.

Robert.

On Dec 3, 2007 6:39 PM, Paul Martz <[EMAIL PROTECTED]> wrote:
>
>
> Hi Robert -- I'm adding code to osgOQ to clean up query IDs, and ran into a
> small snag.
>
> GraphicsContext::close() has hardcoded several static function calls to
> delete OpenGL objects, such as Drawable::flushAllDeletedDisplayLists.
> Doesn't this design somewhat prohibit NodeKits from deleting OpenGL objects
> that aren't supported in core OSG -- such as query IDs? The "correct" way
> for me to add clean up code to my osgOQ NodeKit would be to add a dependency
> from osg::GraphicsContext onto osgOQ, which is not allowed, of course.
>
> Not sure how to proceed. Perhaps I'll just add the correct code to my
> NodeKit, and note that it won't get properly executed until osgOQ is
> integrated into core OSG. Let me know if you have other ideas, I appreciate
> your advice.
>
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> 303 859 9466
>
> _______________________________________________
> 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