mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Fix infinite loop error w/ unsigned ints used on decrementing for counters.
This commit is contained in:
@@ -289,7 +289,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
@@ -300,7 +300,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
@@ -405,7 +405,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
@@ -445,7 +445,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
@@ -543,7 +543,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
@@ -643,7 +643,7 @@ void renderSphere()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int x = X_SEGMENTS; x >= 0; --x)
|
||||
for (int x = X_SEGMENTS; x >= 0; --x)
|
||||
{
|
||||
indices.push_back((y + 1) * (X_SEGMENTS + 1) + x);
|
||||
indices.push_back(y * (X_SEGMENTS + 1) + x);
|
||||
|
||||
Reference in New Issue
Block a user