Hi Alexander,
I have now had a chance to look at the Text3D/new context bug and
established that it's a combination of two problems.
First is that the scene graph isn't automatically told about the new
context by the standard resizeGLBufferObjects(uint) method unless you
use the CompositeViewer::addView(), View(er)::setSceneGraph(Node*) or
startThreading() methods. For instance if you used addSlave() and an
assign a GraphicsContext to this slave then the resize call wouldn't
be made unless you explicitly called it. It's easy to add to you
application, the following is sufficient to do once you've realized
and assigned your new context:
viewer->getSceneData()->resizeGLObjectBuffers(osg::DisplaySettings::instance()->getMaxNumberOfGraphicsContexts());
--
The second issue is osgText::Text3D specific, it's
resizeGLObjectBuffers(uint) method which is supposed to handled
changes in the number of active graphics contexts wasn't updating the
positions as it should have done. I've add a call to
TextBase::computePositions() to the Text3D::resizeGLObjectBuffers()
and in combination with the above resizeGLObjectBuffers() call the
problem is resolved.
--
An svn update will get the Text3D fix, but to complete the solution
you'll either need to use the standard osgViewer methods that
automatically call the resizeGLObjectBuffers() on the scene graph or
call it manually yourself.
Cheers,
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org