Hi Kim,

osg::Camera and the rendering backend are currently implemented with
the assumption that once initialized they will just be used without
changes.  Tracking changes and rebuilding the FBO is possible, but
will complicate the code.

Robert.

On Tue, Feb 24, 2009 at 3:35 PM, Kim C Bale <[email protected]> wrote:
> Hello all,
>
>
>
> I’m trying to swap the color buffer of an FBO camera in an event handler.
>
>
>
> When I initialise the FBO camera like so:
>
>
>
> counter = 0;
>
> m_camera->attach( osg::Camera::COLOR_BUFFER, m_textureList.at( counter
> ).get() );
>
>
>
> It works, but then when I try to swap the color buffer using the following:
>
>
>
> ++counter;
>
> m_camera->detach( osg::Camera::COLOR_BUFFER );
>
> m_camera->attach( osg::Camera::COLOR_BUFFER, m_textureList.at( counter
> ).get() );
>
>
>
> It appears that the original texture is still attached and being updated.
>
>
>
> Am I misusing the FBO here? Is it not possible to swap buffers once the
> camera has been initialised?
>
>
>
> Obviously the same effect could be achieved using a switch and a series of
> FBO cameras but this solution seemed like a nice tidy one.
>
>
>
> Thanks in advance.
>
>
>
> Kim.
>
> *****************************************************************************************
> To view the terms under which this email is distributed, please go to
> http://www.hull.ac.uk/legal/email_disclaimer.html
> *****************************************************************************************
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to