[osg-users] Crash in nVidia driver : particles + dynamically adding/removing views

Nathan Monteleone nathan.monteleone at lmco.com
Wed Nov 4 07:31:16 PST 2009

J.P. Delport wrote:
> to be honest I'm not sure either. I've always thought that sharing might 
> prevent duplication of objects on the GPU. Hopefully someone can 
> enlighten us...
> jp

Yes, using a shared context prevents duplication of objects.  Unless the context is shared you cannot access the same textures, vbo's, display lists, etc., so each context has to have its own copy.  OSG does this for you -- it keeps a per-context record of whether or not something has been applied.  So using a shared context does avoid duplication on the GPU assuming the scenes actually use the same data.

As for the multithreading tradeoffs, I'm not sure.  You CAN render to the two shared contexts at the same time (they have separate ogl state, just shared ogl objects) but you'd need to do some kind of locking between the two rendering threads any time you messed with the shared objects.  I don't know if OSG does all that.


Read this topic online here:

More information about the osg-users mailing list