RodenLuo / cpp_questions

0 stars 0 forks source link

how to allow two VAOs use the same VBO? #5

Closed RodenLuo closed 3 years ago

RodenLuo commented 3 years ago

apart from bind the VBO buffer, one also needs to call the following two:

glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0);