nkrisztian89 / interstellar-armada

A Javascript-WebGL 3D space combat game under development.

Home Page:http://nkrisztian89.github.io/interstellar-armada

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use Vertex Array Objects (VAOs)

nkrisztian89 opened this issue · comments

When the OES_vertex_array_object extension is available or WebGL2 is used, create a VAO for each shader and use it in bindVertexBuffers() instead of manually rebinding all the buffers.
Even better, multiple shaders can use the same VAO as well if the attribute locations are ensured to be the same by using bindAttribLocation()