Hi Don and Elk,

I have done some investigative work, as far as I can tell osgProducer is managing the contextID's correctly, and it is only generating one texture id.  To test I added code into osgProducer::OsgCameraGroup to report the contextID's being assigned to the SceneViews, and also to osg::Texture to report when the textures id as generated.

Running osgwindows cow.osg, with and without sharing I get:

> export OSG_SHARE_GRAPHICS_CONTEXTS=OFF
> osgwindows cow.osg
New contextID=0
Assiging contextID=0
New contextID=1
Assiging contextID=1
generateTextureObject 1
generateTextureObject 1

> export OSG_SHARE_GRAPHICS_CONTEXTS=ON
> osgwindows cow.osg
New contextID=0
Assiging contextID=0
Reusing contextID=0
Assiging contextID=0
generateTextureObject 1

This *is* the expected behavior, everything is working as far as I can tell.

So the question is how are you trying to enable sharing of contexts?  It has to be enabled before the realize() call.

It is also worth noting that on my dual core/GPU system and I run:

  export OSG_SHARE_GRAPHICS_CONTEXTS=ON
  osgviewer cow.osg

I get a crash:

Time to load = 0.16674
New contextID=0
Assiging contextID=0
Reusing contextID=0
Assiging contextID=0
generateTextureObject 1
RenderSurface:realize() - Can't create GLX Context.
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  144 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Serial number of failed request:  19
  Current serial number in output stream:  23

So sharing between two cards is a no-no on Nvidia's Linux driver at least.

Robert.


Robert.



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to