Using OpenGL 4.3 with a debug context, I am able to label programs, shaders, vertex arrays and vertex buffers.
However, I am not able to label textures and get the following error in my callback:
Source: DebugSourceApi
Type: DebugTypeError
Id: 1011
Severity: DebugSeverityHigh
Message: glObjectLabel failed because (depending on the operation) a referenced binding point is empty; a referenced name is not the name of an object; or the given name is otherwise not valid to this operation (GL_INVALID_VALUE)
If that's of any importance, I do use OpenTK library.
This is the code block where the error happens:
GL.GenTextures(1, out Texture);
const string labelTEX = "ImGui Texture";
GL.ObjectLabel(ObjectLabelIdentifier.Texture, Texture, labelTEX.Length, labelTEX);
Question:
Why does glObjectLabel
work for everything but GL_TEXTURE
?