PDA

View Full Version : glFramebufferTexture2DEXT and texture id 0



V-man
03-07-2008, 11:48 AM
Looks like on my nVidia driver (156.xx), it spit out GL_INVALID_ENUM
when I want to dettach a texture like this.

//id is a previously generated and the framebuffer is perfectly fine
//and usable
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, id);

//I want to unbind the texture from the FBO
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, 0, 0, 0);

It doesn't like the textarget=0 or textureID=0?

Can someone verify? I don't think it should be generating an error according to the spec.

skynet
03-07-2008, 01:16 PM
AFAIK textarget=0 is causing the error. I had the same problem some time ago. And yes, specs say:


In all three routines, if <texture> is zero, then <textarget>,
<level>, and <zoffset> are ignored.

Nicolai de Haan Brøgger
03-08-2008, 07:12 AM
I can verify this behaviour with nvidia driver 169.21 and I am getting the same GL_INVALID_ENUM. The way I read the spec is the same as you two, it should not check texture target when texture id is zero. It could look like they forgot this check in the driver. Do you submit the bug V-man?

V-man
03-08-2008, 08:42 AM
I submitted a report.