lcnr/crow

Is `texture = 0` sound for glBindTexture?

lcnr opened this issue · 0 comments

lcnr commented

According to the official references 0 is reserved for the default texture of a given texture target, which is why I think that gl::BindTexture(gl::TEXTURE_2D, 0) should just load the default texture and not error.

However, in the error section there is the following line:

GL_INVALID_VALUE is generated if texture is not a name returned from a previous call to glGenTextures.

As 0 may not have been returned from glGenTextures when gl::BindTexture is called for the first time, this would mean that an error should be returned (which my OpenGL implementation does not do).