I’m using vertex arrays to handle a grid of WIDTH * HEIGHT faces made of triangles…
(a really big tic-tac-toe board)
Can any of you offer tips on generating texture coords for this map? All the vertex data is stored in a one dimensional array of size WIDTH * HEIGHT.
I’m looking for a simple generic loop that can store all the coords needed to map a single texture across the entire grid…I’m not even sure how many texture coords there will be.
I can do this if I store my vertex values in
a 2 dimensional array and draw the grid with Quads in one big loop. I’m trying to use a more efficient way of doing this but I can’t seem to visualize it in this manner…
I suspect this is simple. Any Ideas?