diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 0546687..de00fdd 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -888,8 +888,8 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void) /* if (1) print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */ arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, - 0,//rand() % arbitrary + 1, // load / weight - 0,//rand() % 6, // site, + 1,//rand() % arbitrary + 1, // load / weight + 2,//rand() % 6, // site, 0,//rand() % space_X, // x 0,//rand() % space_Y, // y 0);//rand() % space_Z); // z @@ -897,18 +897,32 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void) /* print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */ arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, - rand() % arbitrary + 1, // load / weight - 2,//rand() % 6, // site, + 1,//rand() % arbitrary + 1, // load / weight + 3,//rand() % 6, // site, 0,//rand() % space_X, // x 0,//rand() % space_Y, // y 0);//rand() % space_Z); // z - arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, - 0,//rand() % arbitrary + 1, // load / weight - 1,//rand() % 6, // site, - 0,//rand() % space_X, // x - 0,//rand() % space_Y, // y - 0);//rand() % space_Z); // z + int address = 0; + if (1) printf("buffer_lines_0_arrow = %d address = %d buffer_lines_size = %d >>>", buffer_lines_0_arrow, address, buffer_lines_size); + buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 1] = buffer_lines_origin[(long) buffer_lines_size - 3]; + buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 2] = buffer_lines_origin[(long) buffer_lines_size - 2]; + + buffer_lines_size -= 2; + + void *new_arrows_lines_ptr = g_realloc(buffer_lines_origin, buffer_lines_size * sizeof(GLfloat)); + if (new_arrows_lines_ptr) buffer_lines_origin = new_arrows_lines_ptr; + else perror("In experience, can't re_allocate for arrow lines buffer.\n"); + if (1) printf(">>> buffer_lines_size = %d\n", buffer_lines_size); + + + + /* arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, */ + /* 0,//rand() % arbitrary + 1, // load / weight */ + /* 0,//rand() % 6, // site, */ + /* 0,//rand() % space_X, // x */ + /* 0,//rand() % space_Y, // y */ + /* 0);//rand() % space_Z); // z */ /* print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */