Range of integers returned by glGenBuffers? I'm developing a general Mesh class with the help of LearnOpenGL. In the example he creates a class which assumes that you want to generate a VAO, VBO, and an EBO but I don't usually use EBOs so I only want to generate an EBO under certain circumstances. So if I decide not to generate an EBO then I want to set my EBO to a number which cannot be generated by glGenBuffers.

// Draw Mesh
glBindVertexArray(this-&gt;VAO);

if(EBO not in range generated by glGenBuffers)
    glDrawArrays(GL_TRIANGLES, 0, numVertices);
} else {
    glDrawElements(GL_TRIANGLES, numIndices, GL_UNSIGNED_INT, 0);
}

glBindVertexArray(0);


My question is what is the range that a buffer object's name can be in?
According to the OpenGL spec, any integer other than zero can be a potential name. Zero is the only value that's guaranteed not to be an object name.
Relevant quote from the spec:

2.6.1.1    Name Spaces, Name Generation, and Object Creation
Each object type has a corresponding name space.  Names of objects are represented by unsigned integers of type uint.  The name zero is reserved by the GL; for some object types, zero names a default object of that type, and in others zero will never correspond to an actual instance of that object type.
Names of most types of objects are created by generating unused names using commands starting with Gen followed by the object type.  For example, the command GenBuffers returns one or more previously unused buffer object names.