From 41200d1afe816d91f70e5706574d68538c5231b7 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 11 Aug 2023 19:03:55 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20Fonction=20'erase=5Farrow'=20premi=C3=A8?= =?UTF-8?q?re=20=C3=A9bauche.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/graphics.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 50aee4f..2dbc729 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -642,7 +642,7 @@ static void compute_buffers_sizes(int model_space_size_x, // buffer_lines_size += 16 + 20; // draw a small cube with diagonals -// buffer_lines_size -= 2; TEST ! + buffer_lines_size -= 2; if (1) printf("allocated buffers sizes :%4d/3 = %3d vertices, %4d/3 = %3d colors,\ %4d/2 = %3d lines, %4d/3 = %3d plans.\n", @@ -689,11 +689,11 @@ static bool erase_arrow (GLuint *arrows, int arrows_nb, long address, *(arrows + address + 3) = *(arrows + (arrows_nb - 1) * 5 + 3); *(arrows + address + 4) = *(arrows + (arrows_nb - 1) * 5 + 4); - *(arrows + (arrows_nb - 1) * 5 + 0) = 0; // est-ce bien utile ? - *(arrows + (arrows_nb - 1) * 5 + 1) = 0; - *(arrows + (arrows_nb - 1) * 5 + 2) = 0; - *(arrows + (arrows_nb - 1) * 5 + 3) = 0; - *(arrows + (arrows_nb - 1) * 5 + 4) = 0; + /* *(arrows + (arrows_nb - 1) * 5 + 0) = 0; // est-ce bien utile ? */ + /* *(arrows + (arrows_nb - 1) * 5 + 1) = 0; */ + /* *(arrows + (arrows_nb - 1) * 5 + 2) = 0; */ + /* *(arrows + (arrows_nb - 1) * 5 + 3) = 0; */ + /* *(arrows + (arrows_nb - 1) * 5 + 4) = 0; */ arrows_nb --; buffer_lines_size -= 14; @@ -815,6 +815,10 @@ void graphics_init_buffers(const void *gl_area) set_arrow(arrows, arrows_nb, 0, 4, 3, 0, 0); set_arrow(arrows, arrows_nb, 0, 5, 3, 0, 1); + set_arrow(arrows, arrows_nb, 0, 5, 2, 1, 1); + set_arrow(arrows, arrows_nb, 0, 4, 2, 1, 0); + set_arrow(arrows, arrows_nb, 0, 2, 2, 1, 1); + set_arrow(arrows, arrows_nb, 0, 3, 2, 2, 1); draw_some_arrows (buffer_lines_origin, s, model_space_size_z * model_space_size_y, model_space_size_z,