Added setting of the RenderSurface name to the application name.

This commit is contained in:
Robert Osfield 2003-04-17 15:57:05 +00:00
parent 9329717aa0
commit ba575396a4
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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()