0

In a program I am creating, I have a class which in its constructor creates and binds a vao, a vbo and then sets the vertex attributes. Objects of that class have a std::vector of vertices, that can be cleared or added to (no opengl calls). Then they have a draw method, which binds the vao, sets the vbo data with glBufferData, and calls glDrawArrays.

When I have a single one of these objects, it works as I expected it to(all vertices are drawn). But when I have 2, only the last one to call its constructor is drawn. I think this has something to do with having multiple vbo's, but I'm not sure.

Any help on how to solve this?

schroeder
  • 123,438
  • 55
  • 284
  • 319
GabiS
  • 1

0 Answers0