Am Mittwoch, 18. Juli 2007 14:17 schrieb H. Verbeet:
On 18/07/07, Stefan Dösinger stefandoesinger@gmx.at wrote:
Renderbuffers might be ok, but I'm not completely sure.
Apparently not :-(
I tried to get it working, but I didn't have any luck. Either I am missing something, or it just doesn't work. My attempt is attached
GL_EXTCALL(glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
GL_STENCIL_ATTACHMENT_EXT, GL_TEXTURE_2D, 0, 0)); You don't have to do that, attaching the renderbuffer removes the previous attachment. The has_stencil check is rather ugly, of course.
I added the glFramebufferTexture2DEXT to see if it changes anything. Sorry, forgot to document this.
Yeah, the way has_stencil is handled in my hack is ugly, agreed. It could be a property in the pixel format table(that one is getting rather huge :-/). For set_depth_stencil_fbo it could be some sort of flag in the surface.
So it looks like we just have to use GL_EXT_packed_depth_stencil. That makes the extension check obsolete too because we can't get anything better than a GL_FRAMEBUFFER_UNSUPPORTED_EXT.
Not really, you can still attach a regular depth format in that cause. Not all applications that use D24S8 actually use the stencil buffer.
Good point.
The check could be done when setting glDescription.glInternal. I can't find it right now, but I think it is linked to d3dfmt_get_conv where all the other formats are handled.