[Solved] Why can I have an OpenGL shader class, but not a VAO class?
[ad_1] The problem has nothing to do with the VAO, but with the VBO. Since you pass a pointer to the constructor: void GSMesh::build(GLfloat *arrFVertex, GSShader *shader, int _intNumVertex) { glBufferData(GL_ARRAY_BUFFER, sizeof(arrFVertex), arrFVertex, GL_STATIC_DRAW); } sizeof(arrFVertex) = sizeof(GLfloat*) which is the size of the pointer, not the size of the array pointed to. The correct … Read more