2

I set up a VAO, binding vertex-buffers to it for vertex attributes, but also set index-buffer (With glVertexArrayElementBuffer). Does that restrict it so it only works with glDrawElements type of commands, or will it work with glDrawArrays too? (Using OpenGL4.5)

Newline
  • 769
  • 3
  • 12

1 Answers1

2

Does that restrict it so it only works with glDrawElements type of commands?

No.

You can still use non-indexed draw calls like glDrawArrays. The question is whether your vertex topology suits that. glDrawArrays is essentially equal to an indexed draw call with indices [0, 1, 2, 3, 4, 5, ...].

httpdigest
  • 5,411
  • 2
  • 14
  • 28