crow icon indicating copy to clipboard operation
crow copied to clipboard

Is `texture = 0` sound for glBindTexture?

Open lcnr opened this issue 4 years ago • 0 comments

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).

lcnr avatar Mar 09 '20 18:03 lcnr