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

Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
This commit is contained in:
Robert Osfield
2006-11-27 14:52:07 +00:00
parent b82e521444
commit fd2ffeb310
110 changed files with 2257 additions and 1466 deletions

View File

@@ -387,11 +387,11 @@ ImpostorSprite* Impostor::createImpostorSprite(osgUtil::CullVisitor* cv)
Vec3 center_world = bs.center()*matrix;
osg::CameraNode* camera = impostorSprite->getCameraNode();
osg::Camera* camera = impostorSprite->getCamera();
if (!camera)
{
camera = new osg::CameraNode;
impostorSprite->setCameraNode(camera);
camera = new osg::Camera;
impostorSprite->setCamera(camera);
}
camera->setCullCallback(new ImpostorTraverseNodeCallback(this));
@@ -456,13 +456,13 @@ ImpostorSprite* Impostor::createImpostorSprite(osgUtil::CullVisitor* cv)
camera->setViewport(0,0,new_s,new_t);
// tell the camera to use OpenGL frame buffer object where supported.
camera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT, osg::CameraNode::FRAME_BUFFER);
camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT, osg::Camera::FRAME_BUFFER);
// set the camera to render before the main camera.
camera->setRenderOrder(osg::CameraNode::PRE_RENDER);
camera->setRenderOrder(osg::Camera::PRE_RENDER);
// attach the texture and use it as the color buffer.
camera->attach(osg::CameraNode::COLOR_BUFFER, texture);
camera->attach(osg::Camera::COLOR_BUFFER, texture);
// do the cull traversal on the subgraph
camera->accept(*cv);

View File

@@ -68,7 +68,7 @@ void OverlayNode::init()
if (!_camera)
{
// create the camera
_camera = new osg::CameraNode;
_camera = new osg::Camera;
_camera->setClearColor(osg::Vec4(0.0f,0.0f,0.0f,0.0f));
@@ -76,13 +76,13 @@ void OverlayNode::init()
_camera->setViewport(0,0,tex_width,tex_height);
// set the camera to render before the main camera.
_camera->setRenderOrder(osg::CameraNode::PRE_RENDER);
_camera->setRenderOrder(osg::Camera::PRE_RENDER);
// tell the camera to use OpenGL frame buffer object where supported.
_camera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT);
_camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
// attach the texture and use it as the color buffer.
_camera->attach(osg::CameraNode::COLOR_BUFFER, _texture.get());
_camera->attach(osg::Camera::COLOR_BUFFER, _texture.get());
}
if (!_texgenNode) _texgenNode = new osg::TexGenNode;
@@ -122,7 +122,7 @@ void OverlayNode::traverse(osg::NodeVisitor& nv)
csn = dynamic_cast<osg::CoordinateSystemNode*>(*itr);
}
_camera->setReferenceFrame(osg::CameraNode::ABSOLUTE_RF);
_camera->setReferenceFrame(osg::Camera::ABSOLUTE_RF);
if (csn)
{