Humus Water demo vs FBOs

H. Verbeet hverbeet at
Tue Jan 9 02:40:12 CST 2007

On 09/01/07, Ivan Gyurdiev <ivg231 at> wrote:
> Here's a demo that breaks FBOs:
> Also download:
> You'll notice all the glClear calls fail [ or at least a lot of them ].
> That's because the framebuffer is incomplete at that point -
> checkFBOstatus() should be called before glClear, as well as drawprim to
> I think the call that fails is the clear call in the drawFrame()
> function of the app - the others set a 0 depth stencil buffer
> immediately prior, while this one is probably using wined3d's initial
> depth fbo. I think the Framework sets EnableAutoDepthStencil, so that an
> fbo is created. It probably ends up being a different size from the
> color fbo, which breaks a framebuffer completeness requirement.
Yes, in D3D that's legal unfortunately. HL2 breaks because of this,
and some effects in BF2 are broken because of this as well. I've got
half of a fix somewhere in my tree. The idea is to create a render
buffer of the appropriate size when the depthstencil buffer dimensions
are larger than the color buffer(s). The basic idea works, but reading
back the buffer and sharing it between onscreen / offscreen needs some
work still.

More information about the wine-devel mailing list