Quote:Original post by alexgeek
I see your logic in an m+1*n+1 sized array but that causes the stack to corrupt.
My array is sized 2*m*n.
Look.
You write two CUSTOMVERTEX instances per vertex, right?
1) Why is that?
2) No matter how many CUSTOMVERTEX instances you write per vertex, you still need (m+1)*(n+1) vertices to describe an m*n grid of squares.
Here. Let me give you a slightly tedious assignment.
Let's say we want to make a 2x2 grid.
Tell me
exactly how many CUSTOMVERTEX instances you think are needed, and
exactly what the value is of
each member of
each instance. And to prove it, show the code where you use the CUSTOMVERTEX array to draw stuff.