PDA

View Full Version : Clearing depth in named framebuffer.



CornyKorn21
11-12-2015, 07:56 AM
I'm having an issue with my call to glClearNamedFramebufferfi. I have a frame buffer with 2 color attachments and a depth stencil attachment.

When making my call to glClearNamedFramebufferfi I recieve the following error message: "GL_INVALID_VALUE error generated. Invalid draw buffer."
This doesn't make sense to me seeing as the function does not take a draw buffer.

If I go back to the binding method I am able to call glClearBufferfi without any issue on the depth stencil. Additionally if I make the call to glClearNamedFramebufferfi with a bound framebuffer then it seems to work as well.

Has anyone come across this issue?

Also, thinking about this some more. I'm going to have to bind the frame buffer for use anyway. So I'm not really saving myself from any binding calls by using the DSA version of clear.

Alfonse Reinheart
11-12-2015, 08:53 AM
This is a known problem (https://www.khronos.org/bugzilla/show_bug.cgi?id=1394). The OpenGL specification files were wrong about glClearNamedFramebufferfi's signature. They have since been corrected, but I imagine most loaders (https://www.opengl.org/wiki/OpenGL_Loading_Library) have not been updated with the fix.

My loader, glLoadGen, has been updated with the fix. As in, I did it 5 minutes ago ;)

CornyKorn21
11-12-2015, 09:06 AM
Aweome, thank you Alfonse!