GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT

I have some FBO code that works fine on several machines but on my HP laptop I get the “GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT” error when I call glCheckFramebufferStatusEXT().

I am assume this is a driver/gfx card issue as the code does work on other machines. Can anyone confirm that is what this error means?

The driver claims to support OpenGL 2.1 and it claims to support Frame Buffer Objects (via glGet calls)?

p.s. The laptop has an ATI FireGl V5725 graphics card.

Something seems to be wrong in your color attachment. Could we see how you create your fbo and how you render to it then?

You may have messed up something in your color attachment points? Are all attached texture, renderbuffers correctly created and allocated in memory?

Trying to create an FBO with a Color buffer with texture and packed depth and stencil buffer with texture…


// Create the FBO
glGenFramebuffersEXT( 1, &m_fboID );
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_fboID );

// Create the Color Texture
glGenTextures( 1, &m_colorRB );
glBindTexture( target, m_colorRB );
glTexImage2D( target, 0, GL_RGBA8,
                         m_width, m_height,
                         0, GL_RGBA, GL_UNSIGNED_BYTE, 0 );
glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glGenerateMipmapEXT( target );

glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, target, m_colorRB, 0 );

// Now Depth texture
glGenTextures( 1, &m_depthStencilTextureRB );
glBindTexture( target, m_depthStencilTextureRB );

glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST );

glTexImage2D( target, 0,
                         GL_DEPTH24_STENCIL8_EXT,
                         m_width,
                         m_height,
                         0,
                         GL_DEPTH_STENCIL_EXT,
                         GL_UNSIGNED_INT_24_8_EXT,
                         0 );

glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT,
                                      GL_DEPTH_ATTACHMENT_EXT,
                                      target,
                                      m_depthStencilTextureRB,
                                      0 );


glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT,
                                      GL_STENCIL_ATTACHMENT_EXT,
                                      target,
                                      m_depthStencilTextureRB, 0 );

status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT );

Status returns GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT.

And like I said, this code works fine on my Nvidia workstation.

I have some FBO code that works fine on several machines but on my HP laptop I get the “GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT” error when I call glCheckFramebufferStatusEXT().

This is not possible. Except for GL_FRAMEBUFFER_UNSUPPORTED, all incomplete errors are the result of improper code.

This means that either the “several machines” that worked have buggy implementations, or your HP laptop does. How recent are your laptop drivers?

The specific error means that the draw buffer specified by glDrawBuffer (or glDrawBuffers if you’re doing MRT) does not have a image attached to it. It’s unlikely that you simply missed this, so I’m guessing your laptop drivers are the culprit.

I noticed that you allocate depth and stencil buffers storage in the same texture, using the alpha component for stencil. Do you need to fetch these two textures? If not, try to allocate two different renderbuffers for depth and stencil buffers.

Also you may try to allocate two textures for depth and stencil buffers. Maybe you can find a work around to this apparent driver bug or unsupported feature this way.

If not, try to allocate two different renderbuffers for depth and stencil buffers.

That never works. Don’t do this. You’re doing the right thing making a Depth/Stencil renderbuffer.

Never say never! :wink: I am not telling him that he is doing wrong. But drivers bugs may lead to not elegant workarounds sometimes.