How is it possible this code gives me a n incomplete fbo?
GLuint fb, rtt, depth_rb, depth_stencil_rb;
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
throw sandra::error::RenderToTexture("Framebuffer object mode unssupported!");
default: /* programming error; will fail on all hardware */
It runs as expected on nvidia harware.
I’m not sure about this, but I think some Radeons don’t support depth-only FBO’s, so you need a color attachment.
I have an NVIDIA so I cannot confirm this.
Besides, your code does not check for GL_FRAMEBUFFER_INCOMPLETE_EXT - you have default option in your case block, but you should actually add separate option.
There3 are also some limitations on NVIDIA - if you need stencil then you should use packed_depth_stencil if available.
With old ATI driver, you must declare depth buffer as a render buffer and not a texture… I don’t know if it works now…
On nVidia, it works with render buffer and texture.
I have installed the latest ATI drivers but it didn’t resolv my problem. Thus, if you are right and ATI drivers doesn’t allow to attach a depth buffer as a texture… how the hell do I perform an optimal shadowmapping algorithm using FBO?
Ok. But I can’t understand how ATI drivers lack this feature being so important shdowmapping in these days.