Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: FBO missing attachment issue

  1. #1
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435

    Unhappy FBO missing attachment issue

    Hello folks,

    I'm getting a weird GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status on an FBO that contains only a depth attachment. This didn't happen on my OSX station, so I suspect Linux drivers to be at fault. Here is what apitrace thinks is going on.
    Texture & FBO creation:
    Code :
    529 glBindTexture(target = GL_TEXTURE_2D, texture = 37)
    530 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_DEPTH_COMPONENT, width = 512, height = 512, border = 0, format = GL_DEPTH_COMPONENT, type = GL_UNSIGNED_BYTE, pixels = NULL)
    531 glGenFramebuffers(n = 1, framebuffers = &4)
    Framebuffer binding:
    Code :
    1134 glBindFramebuffer(target = GL_DRAW_FRAMEBUFFER, framebuffer = 4)
    1135 glFramebufferTexture(target = GL_DRAW_FRAMEBUFFER, attachment = GL_DEPTH_ATTACHMENT, texture = 37, level = 0)
    1136 glDrawBuffer(mode = GL_ZERO)
    1137 glCheckFramebufferStatus(target = GL_DRAW_FRAMEBUFFER) = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
    The description for this FBO status is "No images are attached to the framebuffer". In my case, there is clearly an image (depth texture) attached to it, so the status is at least misleading.

    System Info:
    Linux mezon 3.8.10-1-ARCH #1 SMP PREEMPT Sat Apr 27 12:36:59 CEST 2013 x86_64 GNU/Linux
    OpenGL vendor string: X.Org
    OpenGL renderer string: Gallium 0.4 on AMD RV730
    OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.1.1

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,129
    Any GL errors during resource creation or when trying to attach the depth buffer?

  3. #3
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435
    Quote Originally Posted by thokra View Post
    Any GL errors during resource creation or when trying to attach the depth buffer?
    Good suggestion, thanks! There is indeed an InvalidOperation caused by line 1135 (glFramebufferTexture). I got so used to OSX's GL profiler thhat breaks on errors that I skipped the glGetError calls mostly during development...

    The doc says InvalidOperation is issued when the texture is not compatible with the slot I'm binding it to. It's not the case for my code though.

    For an experiment, I replaced glFramebufferTexture by glFramebufferTexture2D, and it went just right. This returns us to the point of a suspected bug in the driver withing support for glFramebufferTexture.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •