DKa schrieb:
> What I want to do is provide a method with the ability
> to change the window title.
>
> Viewer->getCamera()->getGraphicsContext()->getTraits()->windowName
> = "New Name";
>
> This doesn't work because the traits are constant. Do
> I have to create a GraphicsContext from scratch,
> copying all but the fields I want to change in the
> traits in order to do this? Is there a quicker way?
try this instead:

osg::GraphicsWindow* win = 
dynamic_cast<osg::GraphicsWindow*>(Viewer->getCamera()->getGraphicsContext());
if (win) win->setWindowName("new Name");


cheers,
Stephan

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to