[Qt-interest] glClear behaving strangely with FBO

Samuel Rødal samuel.rodal at nokia.com
Mon Jul 4 17:16:46 CEST 2011


On 06/30/2011 07:06 PM, ext Adam Davis wrote:
> I am using a QGLFrameBufferObject to render off-screen, writing the
> buffer to a QImage and saving the image to disk.
>
> Calls to glClear in the QGLWidget from which the FBO's rendering context
> is obtained set the appropriate color in the widget's buffer. However,
> regardless of what I specify as the clear color for the FBO, it renders
> white. I realize this probably a situation where code is needed to
> diagnose, in which case I can try to strip out the non-essentials and
> post some. In the meantime, if this is a situation someone has
> encountered before for which there is a ready solution, I would be glad
> for suggestions. Thank you.
>
> Regards,
>
> Adam
>

Haven't heard of anything like it, glClear should work fine both when no 
FBO is bound (clearing the back buffer) and when an FBO is bound 
(clearing the FBO).

--
Samuel



More information about the Qt-interest-old mailing list