[osg-submissions] Reuse of context IDs and cleanup of OpenGL resources.
Robert Osfield
robert.osfield at gmail.com
Wed Apr 16 12:52:51 PDT 2008
Hi Mark,
On Wed, Apr 16, 2008 at 7:53 PM, Mark Sciabica <msciabica at itracs.com> wrote:
> 1. If two contexts share a contextID, their states need to share resource
> management.
This is a good point, and in fact suggest that osg::State being per
context isn't perhaps the best place for it. Rather it suggests there
needs to be a container for the ID's that is shared between
osg::State, one per contextID.
> 2. If resource management is moved to the state object it will be more
> difficult for end users to add support for new OpenGL extensions that
> require resource allocation. With the current design they only need to
> create a single custom attribute that implements its own creation,
> application, and deletion of any new resource. Moving resource management to
> the state will require some hooks for user code either through callbacks or
> overridable virtual functions if you want to maintain the ability of end
> users to use new features requiring resource management without modifying
> core osg.
Only the Object ID's (i.e. uints) would be stored in the shared
container, the actual creation/apply/deletion of objects would be
deferred to the local implementations so we'd still have the present
level of extensibility.
Robert.
More information about the osg-submissions
mailing list