Skip to content

Instantly share code, notes, and snippets.

@sixman9
Created October 1, 2012 22:32
Show Gist options
  • Save sixman9/3814869 to your computer and use it in GitHub Desktop.
Save sixman9/3814869 to your computer and use it in GitHub Desktop.
3D Indice loop from Stackoverflow
Found @ http://stackoverflow.com/a/7723372/304330
//Indices loop
byte indices[6 * 6];
int n = 0;
for(int i = 0; i < 4 * 6; i += 4)
{
indices[n++] = i;
indices[n++] = i + 1;
indices[n++] = i + 2;
indices[n++] = i + 2;
indices[n++] = i + 1;
indices[n++] = i + 3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment