From 386b3ebd425e302232d90f6ad52ee8716f30f972 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 27 Sep 2023 20:38:36 +0200 Subject: [PATCH] OK Tout marche... (mais pourquoi ?) --- src/graphics/graphics.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index c243871..2b17583 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -577,6 +577,8 @@ static int create_arrow (GLuint *arrows, int arrows_nb, int weight, int site, in { buffer_lines_origin = g_realloc(buffer_lines_origin, buffer_lines_size * sizeof(GLuint)); + assert (buffer_lines_origin); assert (buffer_lines_size); + *(arrows + arrows_nb * 5 + 0) = weight; *(arrows + arrows_nb * 5 + 1) = site; *(arrows + arrows_nb * 5 + 2) = x; @@ -666,7 +668,7 @@ void main_test_graphics (void) // assert : no more than one arrow per address TODO NOT checked before init // notify : weights are replaced, NOT added (could be !) TODO - int space_X = 4, space_Y = 1, space_Z = 1; + int space_X = 7, space_Y = 1, space_Z = 1; int pref_show_grids = 0; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc // xyz, 0, x, y, z, xy, xz, yz, xyz GLuint arrows[] = { @@ -693,11 +695,16 @@ void main_test_graphics (void) arrows_write_terminations (space_X, space_Y, space_Z); arrows_nb = set_arrow (arrows, arrows_nb, 0, 0, 0, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 0, 0, 2, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 0, 1, 1, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 0, 1, 3, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 1, 0, 1, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 1, 1, 2, 0, 0); arrows_nb = set_arrow (arrows, arrows_nb, 8, 1, 3, 0, 0); arrows_nb = set_arrow (arrows, arrows_nb, 8, 1, 3, 0, 0); -// arrows_nb = set_arrow (arrows, arrows_nb, 0, 1, 1, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 0, 1, 1, 0, 0); + arrows_nb = set_arrow (arrows, arrows_nb, 1, 2, 0, 0, 0); arrows_nb = set_arrow (arrows, arrows_nb, 1, 2, 0, 0, 0); - arrows_nb = set_arrow (arrows, arrows_nb, 1, 3, 0, 0, 0); int weight = 0, site = 0, stx = space_Z * space_Y, sty = space_Z, stz = 1, arrow_offset = 0;