[osg-users] The importance of using Camera::setDrawBuffer()+setReadBuffer() in application setup

Robert Osfield robert.osfield at gmail.com
Sat Mar 10 04:16:46 PST 2018


Hi Julien.

On 10 March 2018 at 05:10, Julien Valentin <julienvalentin51 at gmail.com> wrote:
> I haven't followed recent developpement this last 15 days but after merging my fork with master todya, all my rtt stuff saved as osgb doesn't work anymore(freeze).
> You said using using osgviewer would be okay but it doesn't seams to work
> I had setted all my view and rtt cam Read/Draw buffer to GL_BACK but nothing help...
> Any idea why?

I did change RenderStage so that it used a new
osg::State::glDrawBuffers(..) + State::glReadBuffers(..) that does
lazy state updating for these GL state variables to avoid calling GL
when not necessary.  If there is any third party code that calls
glDrawBuffers/glReadBuffers but the OSG doesn't know about I guess
this could introduce problems.

During this dev work I did accidentally check-in a "cleaned up"
implementation of osg::State::glDrawBuffers(..) that called itself
rather than ::glDrawBuffers(), this caused a infinite loop.  I fixed
this yesterday so git master should be fine now.

W.r..t setting Read/Draw buffers to GL_BACK, this should only be
required for top level/viewer Camera's.

I can look into the issue if you reproduce the problem with an
existing OSG example let me know I'll try to reproduce the issue.  It
might also be worth you trying a clean check out of the OSG to see if
that changes what happens.

Robert.


More information about the osg-users mailing list