GL_VERTEX_ARRAY identifier undefined

So I’m making a game with OpenGL/GLFW, and I’m trying to simplify debugging by naming OpenGL objects with glObjectLabel. The issue is, when I look up the identifier for labeling VAO, I find I need to use GL_VERTEX_ARRAY, but when I try to use it in my code, it is undefined.

I’m using the GLAD loader (http://glad.dav1d.de/), OpenGL 4.3, Core profile, and all other options default.

GL_VERTEX_ARRAY represents the format state and buffer binding for the non-generic vertex array specified by glVertexPointer. That was removed from core in 3.2. So in core profile OpenGL, there is no GL_VERTEX_ARRAY enumerator. There’s no function that would take this enumerator, since the state behind it was removed.

You should be using generic vertex attributes for your vertex data.

GL_VERTEX_ARRAY ought to be available to you. This is likely due to the fact that GL_VERTEX_ARRAY was removed from core in 3.2, but resurrected with KHR_debug/4.3. GLAD may not be handling this case correctly, so check the header for that enumerator and file a GLAD bug report if it is not there.

Found this bug report:

Should I just use the GL_KHR_debug extension?

GL_VERTEX_ARRAY isn’t magic; it’s just a GLenum and is defined as follows:

#define GL_VERTEX_ARRAY 0x8074

You should, in theory, be able to just pop that definition into your own code and then use it. This was what we all had to do before extension loading libraries became available, and there’s no reason why it shouldn’t still be possible. (In an ideal world GLAD would be fixed, of course).