Show
Ignore:
Timestamp:
07/19/05 18:30:55 (9 years ago)
Author:
robert
Message:

Ported all the render to texture examples across to using the new osg::CameraNode?.
Added support for texture cube maps in FBO + CameraNode?.

Files:
1 modified

Legend:

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

    r4386 r4395  
    214214    // set view 
    215215    camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); 
    216     camera->setViewMatrixAsLookAt(bs.center()+osg::Vec3(0.0f,2.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); 
     216    camera->setViewMatrixAsLookAt(bs.center()-osg::Vec3(0.0f,2.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); 
    217217 
    218218    // set viewport 
    219219    camera->setViewport(0,0,tex_width,tex_height); 
    220      
    221     camera->getOrCreateStateSet()->setAttribute(camera->getViewport()); 
    222220     
    223221    // set the camera to render before the main camera.