Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 開始Index
startIndex = indices[1];
for (int i = 0; i < sideIndexLen; i++)
{
if (i % 6 == 0 || i % 6 == 3)
{
indices[cnt++] = startIndex;
}
else if (i % 6 == 1)
{
indices[cnt++] = startIndex + divideX;
}
else if (i % 6 == 2 || i % 6 == 4)
{
indices[cnt++] = startIndex + divideX + 1;
}
else if (i % 6 == 5)
{
indices[cnt++] = startIndex + 1;
// 四角形を作り終えたら開始Indexをインクリメントする
startIndex++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment