[osg-users] Can a FrameBufferObject be shared by multiple cameras?

Robert Osfield robert.osfield at gmail.com
Thu May 10 07:37:30 PDT 2018

Hi Glenn,

If there is a way to share FBO's between osg::Camera I don't know of
it off the top of my head.  You'd need to look at the
src/osgUtil/RenderStage.cpp so see how it sets up the FBO's.  It's
able to ruse it's own FBO on subsequent frames so there may be a way
for forcing it to use an existing FBO.


On 10 May 2018 at 14:02, Glenn Waldron <gwaldron at gmail.com> wrote:
> Hi Robert,
> I have a scenario that uses multiple RTT cameras. (The approach is similar
> in concept to CSM - Cascading Shadow Maps - where you compose a texture
> using multiple frustums). Each RTT camera renders to a different layer of a
> Texture2DArray. This works great! However, it uses a lot more memory than I
> was expecting.
> I realized that each osg::Camera creates its own separate FBO, resulting in
> a lot of extra memory usage. Since the cameras render sequentially, it makes
> sense for all the RTT cameras to just re-use a single FBO. Is there any way
> to make that happen in OSG? Any other suggestions?
> Glenn Waldron / osgEarth
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list