WIP: Oups... N'aurais-je pas retiré qq. vertex de trop ?

This commit is contained in:
Jean Sirmai 2023-10-27 11:14:54 +02:00
parent a63b300686
commit 9bd385281b
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 18 additions and 1 deletions

View File

@ -903,7 +903,8 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
0,//rand() % space_Y, // y
0);//rand() % space_Z); // z
int address = 0;
int address = 3;
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 + 0] = buffer_lines_origin[(long) buffer_lines_size - 2];
buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 1] = buffer_lines_origin[(long) buffer_lines_size - 1];
@ -915,6 +916,22 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
else perror("In experience, can't re_allocate for arrow lines buffer.\n");
if (1) printf(">>> buffer_lines_size = %d\n", buffer_lines_size);
if (1) printf("buffer_vertex_0_arrow = %d address = %d buffer_vertex_size = %d >>>", buffer_vertex_0_arrow, address, buffer_vertex_size);
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 0] = buffer_vertex_origin[(long) buffer_vertex_size - 6];
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 1] = buffer_vertex_origin[(long) buffer_vertex_size - 5];
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 2] = buffer_vertex_origin[(long) buffer_vertex_size - 4];
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 3] = buffer_vertex_origin[(long) buffer_vertex_size - 3];
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 4] = buffer_vertex_origin[(long) buffer_vertex_size - 2];
buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 5] = buffer_vertex_origin[(long) buffer_vertex_size - 1];
buffer_vertex_size -= 6;
void *new_arrows_vertex_ptr = g_realloc(buffer_vertex_origin, buffer_vertex_size * sizeof(GLfloat));
if (new_arrows_vertex_ptr) buffer_vertex_origin = new_arrows_vertex_ptr;
else perror("In experience, can't re_allocate for arrow vertex buffer.\n");
if (1) printf(">>> buffer_vertex_size = %d\n", buffer_vertex_size);
/* arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, */