Hi Goran,

Producer::Camera->getRenderSurface()->setDrawableType( Producer::RenderSurface::DrawableType_Pbuffer );

-don

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/

Reply via email to