PDA

View Full Version : linux, fbo, nvdia: RGBA32F unsupported?



marco_dup1
07-20-2005, 08:08 AM
Hi

I use the nvidia driver 7667 under linux on a nv40. I want a RGBA32F texture as a rendertarget but the driver tells me always its not supported. It's the same with RGBA8. Its should be supported with pbuffers but I haven't tested. Is this the driver or is this my fault.

texture class:
glGenTextures(1, &_id);
glBindTexture(GL_TEXTURE_2D, _id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, width, height, 0, GL_RGBA, GL_FLOAT, 0);

framebuffer class:
int current_buffer;
glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &current_buffer);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _id);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex->get_id(), 0);
//_depthbuffer = new renderbuffer(GL_DEPTH_COMPONENT24, tex->get_width(), tex->get_height());
//glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, _depthbuffer->get_id());
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, current_buffer);

regards
marco

-NiCo-
07-20-2005, 08:19 PM
Looks like you're binding your texture (_id) as a framebuffer when calling glBindFramebuffer. You need to generate a framebuffer id using glGenFramebuffers and use that id when calling glBindFramebuffer instead of the texture id.

Nico

marco_dup1
07-20-2005, 11:15 PM
Originally posted by -NiCo-:
Looks like you're binding your texture (_id) as a framebuffer when calling glBindFramebuffer. You need to generate a framebuffer id using glGenFramebuffers and use that id when calling glBindFramebuffer instead of the texture id.

NicoSorry, _id is a instance variable. this a two different methodes.

marco_dup1
07-21-2005, 01:22 AM
Its working with renderbuffers. Is this a linux driver problem or have the windows parts the same problems.

regards
marco

spasi
07-21-2005, 02:37 AM
Originally posted by marco:
Is this a linux driver problem or have the windows parts the same problems.No, fp textures work fine with EXT_fbo on Windows.

Overmind
07-21-2005, 10:08 AM
You have to disable mipmapping, otherwise it won't work. That is, set the filters of the texture to GL_NEAREST. Mipmapping is enabled by default.

I don't know what this has got to do with rendering to a texture, IMHO it should not matter what filtering mode is set... Seems like this is a problem with the current implementation...

marco_dup1
07-21-2005, 10:27 AM
Originally posted by Overmind:
You have to disable mipmapping, otherwise it won't work. That is, set the filters of the texture to GL_NEAREST. Mipmapping is enabled by default.

I don't know what this has got to do with rendering to a texture, IMHO it should not matter what filtering mode is set... Seems like this is a problem with the current implementation...Thank you very much. Thats the solution. Nvidia should maybe change its docu to mention this. Better would be a wiki.

regards
marco