OpenGL Vertex buffer object, can I access the vertex data for other uses such as collision detection?
I'm currently using the GLTools classes that come along with the Superbible 5th edition. I'm looking in the GLTriangleBatch class and it has the following code: // Create the master vertex array object glGenVertexArrays(1, &vertexArrayBufferObject); glBindVertexArray(vertexArrayBufferObject); // Create the buffer objects glGenBuffers(4, bufferObjects); #define VERTEX_DATA 0 #define NORMAL_DATA 1 #define TEXTURE_DATA 2 #define INDEX_DATA 3 // Copy data to video memory // Vertex data glBindBuffer(GL_ARRAY_BUFFER, bufferObjects[VERTEX_DATA]); glEnableVertexAttribArray(GLT_ATTRIBUTE_VERTEX);