[osg-users] osgQt + OSG 3.6.2 Status
Robert Osfield
robert.osfield at gmail.com
Mon Jul 30 01:08:57 PDT 2018
Hi Wojtek,
On Mon, 30 Jul 2018 at 08:53, Wojciech Lewandowski
<w.p.lewandowski at gmail.com> wrote:
> I understand my setDrawBuffer / setReadBuffer observation was probably not the only problem. But I believe this one is genuine problem that should not be neglected. So I decide to write this small followup and elaborate a bit to make it clearer. In the meantime I did some more research on DrawBuffer/ReadBuffer calls made in OSG. [disclaimer]: We use OSG 3.4.0 and I did not check latest OSG versions. So if anyone uses later 3.6.x he/she may check if my observations are still valid. I did however, noticed that plain osgViewer window config setups call camera->setDrawBuffer / camera->setReadBuffer for main window cams. See osgViewer\config\SingleWindow.cpp for example (search for setDrawBuffer). And I did notice that the same is NOT done in osgQT window setup. At least in OSG 3.4.0 release we use, osgQT does not call setDrawBuffer / serReadBuffer for camera set in QT window. And I believe this is a bug. setDrawBuffer/setReadBuffer should be called for any top window camera. Because if not, and if you add some other camera which will explicitly or implicitly invoke glDrawBuffer call with other buffer than the one set by default in window creation, you are most likely going to see black screen.
Sigh.... So it's good you guys are getting somewhere. The sad thing
is that you are re-inventing the wheel w.r.t the issue.
A few months back I investigated a bug that some osgEarth/Qt users
were seeing and it was down to missing setRead/setDrawBuffers() a bug
that had lingered long in the code, bit only recently highlighted
because of fixes to the core OSG. I made the fix to osgQt and the
osgEarth team fixed their Qt example. I made a very clear public
announcement called for the attention of all Qt users that they should
add setDrawBuffer/setReadBuffer(). There isn't anything more I could
have done.
Please go back to my announcement thread. It's not an OSG bug in
3.6.2, it's a bug in your Qt code that was hidden from view due to an
old bug in the OSG that when fixed revealed the lack of proper setup
code in custom OSG/Qt integration. If you have custom integration
then there isn't anything that osgQt dev's or myself can do other than
ask you to pay attention when we announce fixes and ask you to fix you
code.
Robert.
More information about the osg-users
mailing list