Hi Serge,
The behaviour of the problem sounds a bit like contextID's aren't be
managed correctly. osgViewer/GraphicsContext should be managing the
contextID automatically for you. It would be worth double checking by
looking each windows ContextID i.e.
gc->getState()->getContextID();
You should 0 and 1 respectively for the two windows.
The other possibility might be that your own custom graphics code does
manage multiple graphics contexts properly so tries to reuse texture
objects or display lists from the wrong graphics context.
Robert.
On Fri, May 23, 2008 at 10:34 AM, Serge Lages <[EMAIL PROTECTED]> wrote:
> The patch suggested by Wojciech doesn't solve the issue for me... :/
>
> I've tested to disable display lists on my terrain and success, I don't have
> any visual artefacts, but... on the first window I don't have textures
> anymore (see attached image)...
>
> I'll try to make a little exemple application reproducing the bug to have it
> tested on diffrent setups.
>
> On Fri, May 23, 2008 at 11:05 AM, Serge Lages <[EMAIL PROTECTED]> wrote:
>>
>> My setup is :
>>
>> WinXP, DualCore CPU, NVidia 8600 GTS, osgViewer SingleThreaded mode, one
>> screen and two windows
>>
>> I'll try the patch suggested into this thread to see if it resolves my
>> problem.
>>
>> On Fri, May 23, 2008 at 10:58 AM, J.P. Delport <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hi,
>>>
>>> Have you tried forcing single threaded?
>>>
>>> maybe see this thread.
>>>
>>> "Complete garbage in OSG / XP / multi monitor / multi threaded /
>>> NVidia"
>>>
>>> Don't know your setup, so I'm guessing.
>>>
>>> jp
>>>
>>> Serge Lages wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I am currently using a osgViewer::viewer with slaves cameras (just like
>>>> the osgwindows example), and I am getting some visual artifacts on the
>>>> second window (see the attached image).
>>>>
>>>> Does it rings a bell to anyone ? Something not setted correctly ?
>>>>
>>>> Thanks in advance !
>>>>
>>>> PS : here is my viewer init :
>>>>
>>>> osgViewer::Viewer viewer;
>>>>
>>>> // upper window + upper slave camera
>>>> {
>>>> osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
>>>> osg::GraphicsContext::Traits;
>>>> traits->x = 300;
>>>> traits->y = 40;
>>>> traits->width = 600;
>>>> traits->height = 200;
>>>> traits->windowDecoration = true;
>>>> traits->doubleBuffer = true;
>>>> traits->sharedContext = 0;
>>>>
>>>> osg::ref_ptr<osg::GraphicsContext> gc =
>>>> osg::GraphicsContext::createGraphicsContext(traits.get());
>>>>
>>>> osg::ref_ptr<osg::Camera> camera = new osg::Camera;
>>>> camera->setGraphicsContext(gc.get());
>>>> camera->setViewport(new osg::Viewport(0,0, traits->width,
>>>> traits->height));
>>>> GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
>>>> camera->setDrawBuffer(buffer);
>>>> camera->setReadBuffer(buffer);
>>>>
>>>> // add this slave camera to the viewer
>>>> viewer.addSlave(camera.get());
>>>> }
>>>>
>>>> // lower window + lower slave camera
>>>> {
>>>> osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
>>>> osg::GraphicsContext::Traits;
>>>> traits->x = 300;
>>>> traits->y = 275;
>>>> traits->width = 600;
>>>> traits->height = 480;
>>>> traits->windowDecoration = true;
>>>> traits->doubleBuffer = true;
>>>> traits->sharedContext = 0;
>>>>
>>>> osg::ref_ptr<osg::GraphicsContext> gc =
>>>> osg::GraphicsContext::createGraphicsContext(traits.get());
>>>>
>>>> osg::ref_ptr<osg::Camera> camera = new osg::Camera;
>>>> camera->setGraphicsContext(gc.get());
>>>> camera->setViewport(new osg::Viewport(0,0, traits->width,
>>>> traits->height));
>>>> GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
>>>> camera->setDrawBuffer(buffer);
>>>> camera->setReadBuffer(buffer);
>>>>
>>>> // add this slave camera to the viewer, with a shift right of the
>>>> projection matrix
>>>> viewer.addSlave(camera.get());
>>>> }
>>>>
>>>> --
>>>> Serge Lages
>>>> http://www.tharsis-software.com
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> osg-users mailing list
>>>> [email protected]
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>> --
>>> This message is subject to the CSIR's copyright terms and conditions,
>>> e-mail legal notice, and implemented Open Document Format (ODF) standard.
>>> The full disclaimer details can be found at
>>> http://www.csir.co.za/disclaimer.html.
>>>
>>> This message has been scanned for viruses and dangerous content by
>>> MailScanner, and is believed to be clean. MailScanner thanks Transtec
>>> Computers for their support.
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>
>> --
>> Serge Lages
>> http://www.tharsis-software.com
>
>
> --
> Serge Lages
> http://www.tharsis-software.com
> _______________________________________________
> 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