Hello!

I want to implement a method for reducing the draw resolution when the fill
rate is very low, but without resizing the window. I am going to use this
while the camera is moving(most of the time, the viewpoint and view
direction are static). My first solution was
to add a new camera and after each update, set the scene data to a
node containing that camera and a quad with a texture that the
normal scene
has been previously rendered to at a lower resolution than the viewport.

The current main loop looks like this:

while( !viewer.done() )
{
   viewer.sync();
   viewer.setSceneData(loadedModel.get());
   viewer.updatedSceneData();
   viewer.update();

   viewer.setSceneData(rootNode.get());
   viewer.updatedSceneData();

   camera->setProjectionMatrix(viewerCamera->getProjectionMatrix());
   camera->setViewport(0, 0, texWidth, texHeight);
   camera->setViewMatrix(viewerCamera->getViewMatrix());

   viewer.frame();
}

rootNode contains the quad and the new camera.
viewerCamera is the first one from osgProducer::Viewer.

This thing works, but I am not sure I am doing the right thing. What do you
think about this and how should I actually implement what I want ?

Thanks
Ovidiu
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to