Producer has support for pbuffer RenderSurfaces, but not support for FBO.
FBO support is provide via osg::CameraNode, and you can't create an FBO without a graphis context, so you do at least need to create a RenderSurface first, then within its graphics context run the OSG with the camera node.
The easist option is to just create a number viewer, and add a FBO CameraNode to it.
I'm not really sure what you are after though, could you explain what you are trying to do from a higher level?
Robert.
On 9/20/06, Goran Tusek <[EMAIL PROTECTED]> wrote:
Hi osg-users,
It would be great if someone could give me a hint what to do about the
following:
I have code with
Producer::Camera (, Producer::CameraConfig, osgProducer::Viewer
viewer(myCameraConfig)...)
and need the Producer::Camera's to render to Image,
like in the osgprerender.cpp exsample:
osg::CameraNode* camera = new osg::CameraNode;
...
// tell the camera to use OpenGL frame buffer object where supported.
camera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT);
osg::Image* image = new osg::Image;
//image->allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_UNSIGNED_BYTE);
image->allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_FLOAT);
// attach the image so its copied on each frame.
camera->attach(osg::CameraNode::COLOR_BUFFER, image);
....
Any suggestions? Thx,
Goran
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
