Show
Ignore:
Timestamp:
11/27/06 15:52:07 (8 years ago)
Author:
robert
Message:

Renamed osg::CameraNode? to osg::Camera, cleaned up osg::View.

Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer? and GraphicsWindowProxy? files.

Files:
1 modified

Legend:

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

    r5381 r5757  
    108108}; 
    109109 
    110 struct MyCameraPostDrawCallback : public osg::CameraNode::DrawCallback 
     110struct MyCameraPostDrawCallback : public osg::Camera::DrawCallback 
    111111{ 
    112112    MyCameraPostDrawCallback(osg::Image* image): 
     
    115115    } 
    116116 
    117     virtual void operator () (const osg::CameraNode& /*camera*/) const 
     117    virtual void operator () (const osg::Camera& /*camera*/) const 
    118118    { 
    119119        if (_image && _image->getPixelFormat()==GL_RGBA && _image->getDataType()==GL_UNSIGNED_BYTE) 
     
    178178 
    179179 
    180 osg::Node* createPreRenderSubGraph(osg::Node* subgraph, unsigned tex_width, unsigned tex_height, osg::CameraNode::RenderTargetImplementation renderImplementation, bool useImage, bool useTextureRectangle, bool useHDR) 
     180osg::Node* createPreRenderSubGraph(osg::Node* subgraph, unsigned tex_width, unsigned tex_height, osg::Camera::RenderTargetImplementation renderImplementation, bool useImage, bool useTextureRectangle, bool useHDR) 
    181181{ 
    182182    if (!subgraph) return 0; 
     
    289289    // then create the camera node to do the render to texture 
    290290    {     
    291         osg::CameraNode* camera = new osg::CameraNode; 
     291        osg::Camera* camera = new osg::Camera; 
    292292 
    293293        // set up the background color and clear mask. 
     
    322322 
    323323        // set the camera to render before the main camera. 
    324         camera->setRenderOrder(osg::CameraNode::PRE_RENDER); 
     324        camera->setRenderOrder(osg::Camera::PRE_RENDER); 
    325325 
    326326        // tell the camera to use OpenGL frame buffer object where supported. 
     
    335335 
    336336            // attach the image so its copied on each frame. 
    337             camera->attach(osg::CameraNode::COLOR_BUFFER, image); 
     337            camera->attach(osg::Camera::COLOR_BUFFER, image); 
    338338             
    339339            camera->setPostDrawCallback(new MyCameraPostDrawCallback(image)); 
     
    352352        { 
    353353            // attach the texture and use it as the color buffer. 
    354             camera->attach(osg::CameraNode::COLOR_BUFFER, texture); 
     354            camera->attach(osg::Camera::COLOR_BUFFER, texture); 
    355355        } 
    356356 
     
    405405    while (arguments.read("--height", tex_height)) {} 
    406406 
    407     osg::CameraNode::RenderTargetImplementation renderImplementation = osg::CameraNode::FRAME_BUFFER_OBJECT; 
    408      
    409     while (arguments.read("--fbo")) { renderImplementation = osg::CameraNode::FRAME_BUFFER_OBJECT; } 
    410     while (arguments.read("--pbuffer")) { renderImplementation = osg::CameraNode::PIXEL_BUFFER; } 
    411     while (arguments.read("--pbuffer-rtt")) { renderImplementation = osg::CameraNode::PIXEL_BUFFER_RTT; } 
    412     while (arguments.read("--fb")) { renderImplementation = osg::CameraNode::FRAME_BUFFER; } 
    413     while (arguments.read("--window")) { renderImplementation = osg::CameraNode::SEPERATE_WINDOW; } 
     407    osg::Camera::RenderTargetImplementation renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; 
     408     
     409    while (arguments.read("--fbo")) { renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; } 
     410    while (arguments.read("--pbuffer")) { renderImplementation = osg::Camera::PIXEL_BUFFER; } 
     411    while (arguments.read("--pbuffer-rtt")) { renderImplementation = osg::Camera::PIXEL_BUFFER_RTT; } 
     412    while (arguments.read("--fb")) { renderImplementation = osg::Camera::FRAME_BUFFER; } 
     413    while (arguments.read("--window")) { renderImplementation = osg::Camera::SEPERATE_WINDOW; } 
    414414 
    415415    bool useImage = false;