Show
Ignore:
Timestamp:
09/10/03 21:25:36 (11 years ago)
Author:
robert
Message:

Changed OsgCameraGroup? so that it shares osg::State between Producer::Camera's which
share the same Producer::RenderSurface?.

Added support for more colors in slideshow3D's constructor code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgwindows/osgwindows.cpp

    r1898 r2255  
    1616static Producer::CameraConfig *BuildConfig(void) 
    1717{ 
     18#define TWO_SEPERATE_WINDOWS 
     19 
     20#ifdef TWO_SEPERATE_WINDOWS 
    1821    Producer::RenderSurface *rs1 = new Producer::RenderSurface; 
    1922    rs1->setScreenNum(0); 
     
    4649    cfg->setInputArea(ia); 
    4750    return cfg; 
     51 
     52#else 
     53    // one window with four camera's. 
     54    Producer::Camera* pcam1 = new Producer::Camera (); 
     55    pcam1->setProjectionRectangle (0.0f, 0.5f, 0.5f, 1.0f); 
     56    
     57    Producer::Camera* pcam2 = new Producer::Camera (); 
     58    pcam2->setRenderSurface (pcam1->getRenderSurface ()); 
     59    pcam2->setProjectionRectangle (0.5f, 1.0f, 0.5f, 1.0f); 
     60 
     61    Producer::Camera* pcam3 = new Producer::Camera (); 
     62    pcam3->setRenderSurface (pcam1->getRenderSurface ()); 
     63    pcam3->setProjectionRectangle (0.0f, 0.5f, 0.0f, 0.5f); 
     64 
     65    Producer::Camera* pcam4 = new Producer::Camera (); 
     66    pcam4->setRenderSurface (pcam1->getRenderSurface ()); 
     67    pcam4->setProjectionRectangle (0.5f, 1.0f, 0.0f, 0.5f); 
     68 
     69    Producer::CameraConfig *cfg = new Producer::CameraConfig; 
     70    cfg->addCamera("Camera 1",pcam1); 
     71    cfg->addCamera("Camera 2",pcam2); 
     72    cfg->addCamera("Camera 3",pcam3); 
     73    cfg->addCamera("Camera 4",pcam4); 
     74     
     75    return cfg; 
     76#endif 
    4877} 
    4978