LWJGL Forum

Programming => OpenGL => Topic started by: sasmaster on July 20, 2012, 15:37:13

Title: Getting incomplete FBO when setting GL_RGBA16F texture format
Post by: sasmaster on July 20, 2012, 15:37:13
I am using Java wrapper for OpenGL (LWJGL)I am getting

    GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
status if I set FBO texture attachment format to be GL_RGBA16F.In fact Anything but GL_RGBA causes this error.
Here is my FBO texture setup:


   glBindTexture(GL_TEXTURE_2D, tex);

   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, _width, _height, 0, GL_RGBA, GL_FLOAT, (ByteBuffer) null);

   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

   glBindFramebuffer(GL_FRAMEBUFFER, _frameBuffer);
   glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texId, 0);
   glDrawBuffers(GL_COLOR_ATTACHMENT0);

And here is the Depth attachment:

   _depthBuffer = glGenRenderbuffers();
   glBindRenderbuffer(GL_RENDERBUFFER, _depthBuffer);
   glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, _width, _height);
   glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _depthBuffer);

may be the problem on LWJGL side , with  PixelFormat setup ?
Title: Re: Getting incomplete FBO when setting GL_RGBA16F texture format
Post by: sasmaster on July 23, 2012, 08:03:15
Hello ! Is there anybody here ????
Title: Re: Getting incomplete FBO when setting GL_RGBA16F texture format
Post by: moci on July 29, 2012, 22:00:18
Could you supply a complete code example that I can "run" to test this out. I can just confirm the error if that's good enough for you.