On 02/16/2012 08:46 AM, John Simpson wrote:
Hi,
For info: this can be achieved using...
osgViewer::ViewerBase::Windows windows;
viewer.getWindow(windows);
windows[0]->setWindowDecoration(false);
But this also prevents the window being moved - not ideal.
Hi, John,
There should be a better way to do that:
osg::GraphicsContext::Traits *traits = new osg::GraphicsContext::Traits;
traits->x = 100;
traits->y = 100;
traits->width = 640;
traits->height = 480;
traits->windowDecoration = true;
traits->supportsResize = false;
traits->sharedContext = 0;
osg::Camera *camera = new osg::Camera();
camera->setGraphicsContext(gc);
camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height));
viewer.setCamera(camera);
viewer.realize();
Haven't tested this code, but something like that should be enough to
get what you're looking for.
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org