Im currently learning OpenGL with GLFW, and I had this thought about allocation of the Vertex Data in the memory with the VBO.
GLuint vertex_buffer;
glGenBuffers(1, &vertex_buffer);
glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
I know that this code is going to generate the buffer and store the data of the vertices in it. My question is: Why in the glGenBuffers, in it's second argument, is getting the memory address of vertex_buffer? and does it store the vertices in this location of the memory where vertex_buffer is allocated, or does it allocate somewhere else? If it's allocating somewhere, why is it getting the memory address of vertex_buffer?