Good evening to everyone
I'm not very skilled using osg itself, so maybe everything I'm going to say 
below is wrong.

Anyway:
I have a problem displaying osg content with my plugin, since I updated to OSG 
3.
Inside my extension, I create a CGLContextObj, then I pass it to osgviewer.
>From the debugging messages (ativated at "defcon 5" - DEBUG :) ) appears that 
>the viewer is up and running, the model is loaded, but not displayed.
The problem apparently lies here (but maybe I'm wrong... anyway I'd like to fix 
this point)

...
_MainCamera(new osg::Camera),
...
...
...
osg::ref_ptr<osg::GraphicsContext> gc = (osg::GraphicsContext*) graficcontext;
_MainCamera->setGraphicsContext(gc.get());
...

The output that I got in the Console is:

...
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]   
CullVisitor::apply(Geode&) detected NaN,
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]       depth=nan, 
center=(11412 18917 300),
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]       matrix={
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]           nan nan 
nan nan 
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]           nan nan 
nan nan 
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]           nan nan 
nan nan 
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]           nan nan 
nan nan 
20.08.11 16:53:21       [0x0-0xf60f6].com.google.Chrome[7790]   }
...


Apparently, without this last line, before the update to v3.0.0, everything 
worked well on Mac OSX (was commented).
Now probably the lack of this line is the one that creates the problem ... it 
is the only big difference between osx and windows implementation (that works 
correctly!).
Am I right?

So I tried to set the line
_MainCamera->setGraphicsContext(gc.get());
but it crashes...
I tried also with
gc->osg::GraphicsContext::addCamera(_MainCamera);
gc->_cameras.push_back(_MainCamera);
but obviously the compiler complains about protections. ;)
Any suggestion?
Thanks in advance.
G.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to