glFramebufferTexture2DEXT and texture id 0

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.

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.

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?

I submitted a report.