Have a Go: Rendering Using drawArrays

Our square was defined using drawElements via vertices and indices. Go ahead and render the same square using drawArrays.

Hint

Given that you don't use indices with drawArrays, you won't need an IBO. So, you will need to duplicate vertices to construct this geometry.
Hint

For reference, you can find the source code for this exercise in ch02_02_square-arrays.html.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.227.69