diff --git a/examples/osgwindows/osgwindows.cpp b/examples/osgwindows/osgwindows.cpp index e05f0b909..7cd4d1f81 100644 --- a/examples/osgwindows/osgwindows.cpp +++ b/examples/osgwindows/osgwindows.cpp @@ -17,6 +17,7 @@ static Producer::CameraConfig *BuildConfig(void) { Producer::RenderSurface *rs1 = new Producer::RenderSurface; rs1->setScreenNum(0); + rs1->setWindowName("osgwindows"); //rs1->useBorder(false); rs1->setWindowRectangle(0,0,640,480); Producer::Camera *camera1 = new Producer::Camera; @@ -25,6 +26,7 @@ static Producer::CameraConfig *BuildConfig(void) Producer::RenderSurface *rs2 = new Producer::RenderSurface; rs2->setScreenNum(0); + rs2->setWindowName("osgwindows"); //rs2->useBorder(false); rs2->setWindowRectangle(640,0,640,480); Producer::Camera *camera2 = new Producer::Camera; diff --git a/src/osgProducer/OsgCameraGroup.cpp b/src/osgProducer/OsgCameraGroup.cpp index 99a9cf81d..4ead79ee9 100644 --- a/src/osgProducer/OsgCameraGroup.cpp +++ b/src/osgProducer/OsgCameraGroup.cpp @@ -110,6 +110,16 @@ OsgCameraGroup::OsgCameraGroup(osg::ArgumentParser& arguments): { _init(); _applicationUsage = arguments.getApplicationUsage(); + + for( unsigned int i = 0; i < _cfg->getNumberOfCameras(); i++ ) + { + Producer::Camera *cam = _cfg->getCamera(i); + Producer::RenderSurface *rs = cam->getRenderSurface(); + if (rs->getWindowName()==" *** RenderSurface *** ") + { + rs->setWindowName(arguments.getApplicationName()); + } + } } void OsgCameraGroup::_init()