Calculation of procedural mesh indices (C++)

MichaelWion
Wed, 19 Aug 2015 09:49:21 +0000
World Creation

Take a look at the figure below:

In this example, the plane mesh displays a total of 9 vertices and 8 triangles, composing a total of 4 quads.
So my question here is simply this:
How would you calculate the most optimal index buffer for this?
Keep in mind that the actual number of X and Y vertices may vary, but the overall mesh will still be a series of quads.

Bonus Question:

What is the default flag (triangle fan, triangle strip, etc) that UE4 uses while rendering, and what is the default vertex winding order?

3 posts - 1 participant