0

When using the DrawPixel function if I use more than about 60000-80000 calls over half of the pixels stop showing up. I saw some post a long time ago that said there's a limit for draw calls but I can't find anything anymore. Here's the main bit of code (rest is irrelevant).

const int particleCount = 60000;
...
...
...
InitWindow(WIDTH, HEIGHT, "Particles");

SetTargetFPS(80);

while (!WindowShouldClose())
{
    BeginDrawing();

        DrawFPS(5, 5);

        for (int i = 0; i < particleCount; i++) {
            DrawPixel((int)(xPositions[i]), (int)(yPositions[i]), {255, 255, 255, 180});
        }

        ClearBackground(Color{41, 41, 41, 255});

    EndDrawing();
}
genpfault
  • 51,148
  • 11
  • 85
  • 139
Irakli
  • 21
  • 5

0 Answers0