Well, I'm starting with OpenGl, and by reading documentation about glBindBuffer, I'm a bit confused.
"glBindBuffer binds a buffer object to the specified buffer binding point. Calling glBindBuffer with target set to one of the accepted symbolic constants and buffer set to the name of a buffer object binds that buffer object name to the target. If no buffer object with name buffer exists, one is created with that name. When a buffer object is bound to a target, the previous binding for that target is automatically broken." Source: http://docs.gl/gl4/glBindBuffer
Does that mean if I don't create buffer object with "foo" name, but I call glBindBuffer, it will create one for me with that name ("foo")?
If so, following code should work fine:
GLuint bar = 70;
glBindBuffer(GL_ARRAY_BUFFER, bar);
-> Create buffer object, "connect" it with bar (70) and bind it to GL_ARRAY_BUFFER.