glDrawArrays does not draw anything in GL_TRIANGLES mode
问题 My problem is the glDrawArray command stops working. I've written a few programs which I used that command. However now, I don't have any idea why it doesn't work. But I still can draw lines to the screen with GL_LINES instead of GL_TRIANGLES . Here is my code: #include "Mesh.h" #include <iostream> Mesh::Mesh() { glGenVertexArrays(1, &vao); glBindVertexArray(vao); glGenBuffers(1, &vbo); size = 0; } void Mesh::AddVertices(const Vertex vertices[], int length) { size = length; glBindBuffer(GL