HI Alexandre, You can't presently mix multi-threading of graphics context that share GL objects as the two threads will not synchronize the creation, uploading of and deletion of the GL objects. If you want to share GL objects you need to run single threaded, if you want to run multi-threaded you can't share GL objects.
The only way to avoid this would be to subclass all the classes in the OSG that create GL objects and mutex lock them, something which is technically possible but would be hugely expensive in performance. Robert. On Wed, Jul 22, 2009 at 10:46 AM, Alexandre Amalric<alex.pix...@gmail.com> wrote: > Hi, > > Sorry for posting again but I found the solution to my first problem, I had > to switch threading model to "SingleThreaded" when sharing graphic context > otherwise it crashes. > > Can someone tell me if it's normal ? > > But unfortunately I have a second issue when loading models with > multi-texturing. > Adding 2 views to composite viewer : > > 1) loading a multi-texture model and NOT sharing context produces attached > "multi_not_shared.jpg". > 2) loading simple textured model and NOT sharing context produces attached > "simple_not_shared.jpg". > 3) loading a multi-textured model and DO sharing context produces attached > "multi-shared.jpg" > Is there a way to get a correct geometry in case 1) and 2) ?? > > I can attach models if needed, please let me know. > > Kind regards > > 2009/7/22 Alexandre Amalric <alex.pix...@gmail.com> >> >> Hi osg-users, >> >> I have some trouble with my application using composite viewer so I made a >> simple test file. >> >> This sample create a composite viewer, add 2 views sharing graphic context >> and crash on : >> >> static bool s_separateSpecularSupported = strncmp((const >> char*)glGetString(GL_VERSION),"1.2",3)>=0; >> >> In output there is a lot of warning about OpenGL errors. >> >> Can someone tell me what am I doing wrong in this simple test ? >> I'm using Windows Vista with latest NVidia 190.38 on GT280 + OSG SVN >> -- >> Alexandre AMALRIC Ingénieur R&D >> =================================== >> PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille >> http://www.pixxim.fr > > > > -- > Alexandre AMALRIC Ingénieur R&D > =================================== > PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille > http://www.pixxim.fr > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org