From 7b3e2b889ad3592d5c8cc512f03d2558faf6184f Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 19 Jul 2023 16:23:14 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20un=20premier=20r=C3=A9sultat=20encourage?= =?UTF-8?q?ant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/buffers.c | 48 ++++++++++++++++++++--------------------- src/graphics/graphics.c | 4 ++-- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/src/graphics/buffers.c b/src/graphics/buffers.c index 7070204..5a17ac6 100644 --- a/src/graphics/buffers.c +++ b/src/graphics/buffers.c @@ -344,34 +344,32 @@ static bool compute_space_3D (int space_size_x, } if (P) printf("\n"); }; - /* *(line_origin + lines_ndx) = 0; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 2; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 1; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 3; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 2; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 3; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 0; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 1; lines_ndx += 1; */ - - /* *(line_origin + lines_ndx) = 20; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 22; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 21; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 23; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 22; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 23; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 20; lines_ndx += 1; */ - /* *(line_origin + lines_ndx) = 21; lines_ndx += 1; */ for (int u = 0; u <= space_size_x * space_size_y * 2; u ++){ - //for (int v = 0; v <= space_size_y; v ++){ - *(line_origin + lines_ndx) = u * 2; - lines_ndx += 1; - *(line_origin + lines_ndx) = u * 2 + 1; - lines_ndx += 1; - // v ++; - //} - //u ++; + *(line_origin + lines_ndx) = u * 2; + lines_ndx += 1; + *(line_origin + lines_ndx) = u * 2 + 1; + lines_ndx += 1; } + + /* *(line_origin + lines_ndx) = 0; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 2; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 1; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 3; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 2; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 3; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 0; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 1; lines_ndx += 1; */ + + /* *(line_origin + lines_ndx) = 20; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 22; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 21; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 23; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 22; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 23; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 20; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 21; lines_ndx += 1; */ + /* *(line_origin + lines_ndx) = 0; lines_ndx += 1; */ /* *(line_origin + lines_ndx) = 20; lines_ndx += 1; */ diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index f49daa9..8da9827 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -539,8 +539,8 @@ GLubyte arrows[] = { static void get_model_data_and_user_preferences(){ - model_space_size_x = 3; // 0 < model_space_size_x - model_space_size_y = 2; // 0 < model_space_size_y + model_space_size_x = 4; // 0 < model_space_size_x + model_space_size_y = 3; // 0 < model_space_size_y model_space_size_z = 1; // 0 < model_space_size_z model_arrows_nb = 4; // assert : l'emplacement des flèches est contraint // par model_space_size_x, y, z et le nombre de sites