Removed C99 variable-length array to fix MSVC errors

This commit is contained in:
Stephan Soller 2021-04-18 21:59:50 +02:00
parent 09dcd224c8
commit 69ce5bea22

View File

@ -49,8 +49,8 @@ int main()
int colorLoc = GetShaderLocation(shader, "color"); int colorLoc = GetShaderLocation(shader, "color");
// Initialize the vertex buffer for the particles and assign each particle random values // Initialize the vertex buffer for the particles and assign each particle random values
const size_t particleCount = 10000; struct { float x, y, period; } particles[10000];
struct { float x, y, period; } particles[particleCount]; const size_t particleCount = sizeof(particles) / sizeof(particles[0]);
for (size_t i = 0; i < particleCount; i++) for (size_t i = 0; i < particleCount; i++)
{ {
particles[i].x = GetRandomValue(20, screenWidth - 20); particles[i].x = GetRandomValue(20, screenWidth - 20);