Hi all

I'm gonna add my 5 cents on this topic. I was having similar problems in app 
which recreates viewer in runtime (there are preview window and viewer created 
when widget shows up), using osg version 3.0(?). In my case problem was not 
only with textures - i was getting corrupted vertex arrays after viewer 
re-creation. I tried some voodoo magic with osgDB::Registry and caching 
settings, tried to clear gl objects with osg::deleteAllGLObjects() 
osg::flushAllDeletedGLObjects() etc, but without any luck. I've had different 
graphics context ids after viewer recreation. In my case problem was solved 
when using vertex buffer objects instead of display lists, i didnt dig any 
further after that. IIRC problem was showing itself only on windows, but i cant 
say for sure now.

Cheers

14.01.2012, 14:58, "Robert Osfield" <robert.osfi...@gmail.com>:
> Hi Chris,
>
> On 14 January 2012 09:30, Chris Denham <c.m.den...@gmail.com> wrote:
>
>>  Hi Robert,
>>  To answer your question about how I manage the graphics contexts.
>>  I just create a new one for the window handle provided by each instance of 
>> my browser plugin e.g
>>
>>  Code:
>>  traits->inheritedWindowData = new WindowData(hWnd);
>>  gc = osg::GraphicsContext::createGraphicsContext(traits);
>
> After gc is assigned check the value of gc->getState()->getContextID()
> for each of the contexts created.  In theory for multiple contexts
> they should read 0,1,2,etc.
>
> Robert.
> _______________________________________________
> 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

Reply via email to