diff --git a/src/graphics/buffers.c b/src/graphics/buffers.c index bf7a250..42f57d8 100644 --- a/src/graphics/buffers.c +++ b/src/graphics/buffers.c @@ -365,9 +365,9 @@ static bool compute_space_3D (long x, } } - for (int u = 0; u < y; u ++){ - for (int w = 0; w < z; w ++){ - calcul = step_z * w + step_y * u; + for (int u = 0; u < z; u ++){ + for (int w = 0; w < y; w ++){ + calcul = step_y * w + step_z * u; *(lines_origin + lines_buffer_size) = calcul; lines_buffer_size += 1; *(lines_origin + lines_buffer_size) = calcul + step_x * (x - 1); lines_buffer_size += 1; }