I have code which is something like this:
osgViewer::Viewer viewer;
viewer.setSceneData(scene);
viewer.setCameraManipulator( tracker.get() );
viewer.setUpViewInWindow(10,10,1024,768,0);
viewer.realize();
Now, this viewer object gives me a view of a scene which contains a vehicle model, terrain etc. I would like to get an RGB image out of this viewer, irrespective of how the data has been written into the scene.
Essentially, I want an RGB image from the viewer with no previous information as to what data is written into the scene. If the viewer shows something in a 1024*768 window, I want it as an RGB image.