NVIDIA Forceware 75.90 => OpenGL 2.0.0 & fbo

Originally posted by Korval:
Are you sure the driver is complaining about it being FB complete, instead of just “unsupported” (which is implementation dependent and there’s nothing you can do about it)? The spec clearly states that you only need to have some attachment in place in the framebuffer, not a color attachment.
Yeap, it returns GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT.

Originally posted by KRONOS:
Yeap, it returns GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT.
According to issue 72 of the spec it should indeed be possible to attach only one depth-renderable image.

The FB object is incomplete if the color attachment referred to by readbuffer is not color-renderable. If I’m not mistaking the readbuffer is initialized to color attachment 0. Maybe you can set the Readbuffer to GL_NONE. According to revision history #103, this is allowed.

Nico

Originally posted by -NiCo-:
[quote]Originally posted by KRONOS:
Yeap, it returns GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT.
The FB object is incomplete if the color attachment referred to by readbuffer is not color-renderable. If I’m not mistaking the readbuffer is initialized to color attachment 0. Maybe you can set the Readbuffer to GL_NONE. According to revision history #103, this is allowed.
[/QUOTE]It didn’t work neither.
FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT is generated when: “The value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT must not be NONE for the color attachment point named by READ_BUFFER.”

Can someone please explain it in other words? :smiley:

IMHO it means that there has to be a color-renderable image attached to the attachment point, referred to by readbuffer.

Nico

[quote]Originally posted by Korval:
[b]

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

Now it works…

yooyo

Originally posted by -NiCo-:
IMHO it means that there has to be a color-renderable image attached to the attachment point, referred to by readbuffer.

But the spec says a color renderbuffer/texture is not needed. And I call glDrawBuffer(GL_NONE). I think this is probably a bug related with MTR (and I am working with a FX5700, so no MTR support).

Hi everyone,

Regarding “render-to-depth-texture” with EXT_fbo, this is what I see here:

  • To avoid FRAMEBUFFER_INCOMPLETE errors, I used glReadBuffer(GL_NONE) and glDrawBuffer(GL_NONE).

  • Unfortunately when there’s only a DEPTH_ATTACHMENT (whether it’s a renderbuffer or a depth texture), I always get a FRAMEBUFFER_UNSUPPORTED error. I’m certain this is a valid configuration, the spec states that clearly.

  • When I added another texture (with the same size) to COLOR_ATTACHMENT0, it works without an UNSUPPORTED error (with either a renderbuffer or a depth texture to DEPTH_ATTACHMENT). Rendering does not work properly though, all I get is random artifacts. Also, the depth texture remains empty. By removing the DEPTH_ATTACHMENT, I get what I would expect for a shadow map pass with no depth testing.

Originally posted by KRONOS:
[But the spec says a color renderbuffer/texture is not needed. And I call glDrawBuffer(GL_NONE). I think this is probably a bug related with MTR (and I am working with a FX5700, so no MTR support).
Looks like you misread my other post where I suggested to set readbuffer to NONE, whereas you’re setting drawbuffer to NONE. From the post above (spasi) this seems to resolve the FRAMEBUFFER_INCOMPLETE error.

Nico

Originally posted by -NiCo-:
Looks like you misread my other post where I suggested to set readbuffer to NONE, whereas you’re setting drawbuffer to NONE. From the post above (spasi) this seems to resolve the FRAMEBUFFER_INCOMPLETE error.
:smiley: I forgot to say I call glReadBuffer(GL_NONE) too, very much like spasi said. And like spasi, I still get the unsupported error and so I attached a texture to the framebuffer and it works (without artifacts, either the depth and color textures). However, not being able to create a colorless framebuffer seems like a driver bug (they are beta drivers) rather than a hardware limitation that I previously mentioned…

Anyway, it felt so good erasing the PBuffer class… :smiley:

Originally posted by KRONOS:
However, not being able to create a colorless framebuffer seems like a driver bug (they are beta drivers) rather than a hardware limitation that I previously mentioned…
I did not test it myself yet, but it sure looks like a bug.

Originally posted by KRONOS:
Anyway, it felt so good erasing the PBuffer class… :smiley:
Amen to that :slight_smile:

Nico

Has anyone used glew successfully to load fbo? GLEW_EXT_framebuffer_object is false although GL_EXT_framebuffer_object is included in the extension string…

(and glew is initialized correctly - at least other extensions like GLEW_ARB_multitexture are true).

However, not being able to create a colorless framebuffer seems like a driver bug (they are beta drivers) rather than a hardware limitation that I previously mentioned…
After thinking about it a while, the driver is doing legal behavior. The spec says that the framebuffer can be complete with nothing bound to the color buffer, as long as the read buffer is NONE. However, this says nothing about whether or not it is supported. Drivers can declare any combinations of framebuffer bindings as unsupported for any reason. Of course, there must be some binding that is supported, but it doesn’t have to be depth-only.

Perhaps the hardware needs a color buffer bound, for whatever reason.

Has anyone been able to render to a slice of a 3D texture?

I get a GL_FRAMEBUFFER_UNSUPPORTED_EXT. According to the spec this happens if the combination of internal formats is not supported. But when rendering to a 2D texture with the same internal format, I do not get the error.
Am I doing something wrong or is the GL_FRAMEBUFFER_UNSUPPORTED_EXT error also dependent on the texture target (2D/3D)?

Nico

The impatience of you guys. Tearing your hair out over half implementations in alpha drivers. Just wait till you get beta drivers through the nvidia developer program.

Originally posted by knackered:
The impatience of you guys. Tearing your hair out over half implementations in alpha drivers.
:slight_smile: Totally agree, i suppose NV will release a beta driver soon, so well, playing with drivers is ok, but not for doing anything more serious than preparing interfaces for RTT.

After all, all that bugs, issues and thinggie you’re detecting here are probably well known by nv people and i expect they will be fixed (or not :slight_smile: )

It’s not nVidia or ATI who got a renderer with a GL_VERSION string >= 2.0

Look at this:

http://delphi3d.net/hardware/viewreport.php?report=317

This video card has OpenGL string to 2.03, back to 2002.

:smiley:

Running on a Geforce 6800GT the FrameBuffer seams to work. When reading back information with glReadPixels the image shows up alright. But when trying to bind the colorbuffer as a texture for rendering it wont show up?

I’m using the code from the examples in the extensionspecification. Have anyone got it working and can spot some errors in my code?

I also found out that when having LINEAR_MIPMAP_LINEAR set the framebuffer object wont’t get complete until all mipmaplevels have been bound.
/Martin

RenderTarget::RenderTarget(void)
{
		glGenFramebuffersEXT(1, &fb);
        glGenTextures(1, &color_tex);
        glGenRenderbuffersEXT(1, &depth_rb);
        
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb);

        // initialize color texture
        glBindTexture(GL_TEXTURE_2D, color_tex);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

		glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0,
                     GL_RGBA, GL_INT, 0);
        glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
                                  GL_COLOR_ATTACHMENT0_EXT,
                                  GL_TEXTURE_2D, color_tex, 0);
		
        // initialize depth renderbuffer
        glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depth_rb);
        glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,
                                 GL_DEPTH_COMPONENT24, 512, 512);
        glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
                                     GL_DEPTH_ATTACHMENT_EXT,
                                     GL_RENDERBUFFER_EXT, depth_rb);

        CHECK_FRAMEBUFFER_STATUS();
		
		glBindTexture(GL_TEXTURE_2D, 0);
		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}

RenderTarget::~RenderTarget(void)
{

}
RenderTarget::BindAsRenderTarget()
{
     glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb);
}
RenderTarget::UnBindAsRenderTarget()
{
	 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
RenderTarget::BindAsTexture()
{
	glActiveTexture(GL_TEXTURE0);
    glBindTexture(GL_TEXTURE_2D, color_tex);
}
RenderTarget::UnBindAsTexture()
{
	glActiveTexture(GL_TEXTURE0);
	glBindTexture(GL_TEXTURE_2D, 0);
}  

I write this and it works…

  
  glGenTextures(1, &color_tex);
  glBindTexture(GL_TEXTURE_2D, color_tex));
  glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE );
  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, TEXX, TEXY, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture_data);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
  glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, color_tex, 0);

yooyo

hi all, I tried this extension today, but i got strange results. When I create framebuffer without zbuffer all is ok, but when I add zbuffer i gen UNSUPPORTED error.

I have GF FX 5900.

Could anyone help?

Most likely, the bit depths of your color buffer and depth buffer are not allowed. Typically, mixing 16-bit buffers with 32-bit ones is not allowed by the hardware.

Either that, or as people have pointed out, it is due to incomplete/buggy drivers.