Verdagon
02-04-2011, 09:07 PM
Hi all, I have an FBO with a depth buffer and four color buffers (two RGBA16F and two LUMINANCE32F). Google says that if I call glClear with GL_COLOR_BUFFER_BIT, it clears all four color buffers at once. This doesn't agree with my experiments though.
If I do this:
beginFBO();
GLenum drawBuffers[4] = {
GL_COLOR_ATTACHMENT0,
GL_COLOR_ATTACHMENT1,
GL_COLOR_ATTACHMENT2,
GL_COLOR_ATTACHMENT3
};
glDrawBuffers(4, drawBuffers);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Shouldn't it clear all four buffers? Or is it not working because I have odd types (RGBA16F and LUMINANCE32F)?
Thanks for your help!
If I do this:
beginFBO();
GLenum drawBuffers[4] = {
GL_COLOR_ATTACHMENT0,
GL_COLOR_ATTACHMENT1,
GL_COLOR_ATTACHMENT2,
GL_COLOR_ATTACHMENT3
};
glDrawBuffers(4, drawBuffers);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Shouldn't it clear all four buffers? Or is it not working because I have odd types (RGBA16F and LUMINANCE32F)?
Thanks for your help!