WIP: offset_vertex était bien un doublon de buffer_vertex_size : premières images (ridges) OK
This commit is contained in:
parent
1b6601005c
commit
9a1023b0b2
|
@ -134,7 +134,8 @@ void graphics_write_vertex (GLfloat x, GLfloat y, GLfloat z)
|
||||||
buffer_vertex_origin[buffer_vertex_size + 1] = y;
|
buffer_vertex_origin[buffer_vertex_size + 1] = y;
|
||||||
buffer_vertex_origin[buffer_vertex_size + 2] = z;
|
buffer_vertex_origin[buffer_vertex_size + 2] = z;
|
||||||
|
|
||||||
if (0) printf("buffer_vertex_size = %d (%6.3f,%6.3f,%6.3f)\n", buffer_vertex_size, x, y, z);
|
if (1) printf("In graphics_write_vertex() buffer_vertex_size = %d > %d (%6.3f,%6.3f,%6.3f)\n",\
|
||||||
|
buffer_vertex_size, buffer_vertex_size + 3, x, y, z);
|
||||||
|
|
||||||
buffer_vertex_size += 3;
|
buffer_vertex_size += 3;
|
||||||
}
|
}
|
||||||
|
@ -680,8 +681,8 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
||||||
void srand(unsigned int seed); // printf ("Valeur max : %d\n", RAND_MAX); min + rand() % (max+1 - min);
|
void srand(unsigned int seed); // printf ("Valeur max : %d\n", RAND_MAX); min + rand() % (max+1 - min);
|
||||||
|
|
||||||
int arbitrary = 3;
|
int arbitrary = 3;
|
||||||
int space_X = 1,// + rand() % arbitrary,
|
int space_X = 3,// + rand() % arbitrary,
|
||||||
space_Y = 1,// + rand() % arbitrary,
|
space_Y = 2,// + rand() % arbitrary,
|
||||||
space_Z = 1;// + rand() % arbitrary;
|
space_Z = 1;// + rand() % arbitrary;
|
||||||
int density_max = space_X * space_Y * space_Z;
|
int density_max = space_X * space_Y * space_Z;
|
||||||
int max = fmax(space_X, space_Y); max = fmax(max, space_Z);
|
int max = fmax(space_X, space_Y); max = fmax(max, space_Z);
|
||||||
|
@ -731,17 +732,16 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
||||||
|
|
||||||
/* S P A C E */
|
/* S P A C E */
|
||||||
|
|
||||||
// float max = fmax(x, y); max = fmax(max, z);
|
|
||||||
buffer_vertex_size += write_space_ridges_vertex (buffer_vertex_size, space_X, space_Y, space_Z);
|
buffer_vertex_size += write_space_ridges_vertex (buffer_vertex_size, space_X, space_Y, space_Z);
|
||||||
buffer_colors_size = buffer_vertex_size;
|
buffer_colors_size = buffer_vertex_size;
|
||||||
|
|
||||||
if (0) printf("buffer_vertex_size after writing_space_ridges_vertex : %d (x 3 = %d)\n\n", buffer_vertex_size, buffer_vertex_size * 3);
|
if (1) printf("buffer_vertex_size after writing_space_ridges_vertex : %d (x 3 = %d)\n\n", buffer_vertex_size, buffer_vertex_size * 3);
|
||||||
|
|
||||||
buffer_vertex_size += write_grids_on_space_faces_vertex (space_X, space_Y, space_Z);
|
buffer_vertex_size += write_grids_on_space_faces_vertex (space_X, space_Y, space_Z);
|
||||||
buffer_colors_size = buffer_vertex_size;
|
buffer_colors_size = buffer_vertex_size;
|
||||||
|
|
||||||
if (0) printf("buffer_vertex_size after writing_space_faces_vertex = %4d - 8 = %3d (x 3 = %4d)\n", buffer_vertex_size, buffer_vertex_size - 8, (buffer_vertex_size - 8) * 3);
|
if (1) printf("buffer_vertex_size after writing_space_faces_vertex = %4d - 8 = %3d (x 3 = %4d)\n", buffer_vertex_size, buffer_vertex_size - 8, (buffer_vertex_size - 8) * 3);
|
||||||
if (0) printf("(space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4 = %3d (x 3 = %4d)\n\n",\
|
if (1) printf("(space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4 = %3d (x 3 = %4d)\n\n",\
|
||||||
(space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4, ((space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4) * 3);
|
(space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4, ((space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4) * 3);
|
||||||
|
|
||||||
|
|
||||||
|
@ -760,14 +760,14 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
||||||
buffer_colors_size = buffer_vertex_size;
|
buffer_colors_size = buffer_vertex_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0) printf("buffer_vertex_size after writing_arrows_vertex : %d (x 3 = %d) (arrows_nb = %d)\n", buffer_vertex_size, buffer_vertex_size * 3, arrows_nb);
|
if (1) printf("buffer_vertex_size after writing_arrows_vertex : %d (x 3 = %d) (arrows_nb = %d)\n", buffer_vertex_size, buffer_vertex_size * 3, arrows_nb);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------*/
|
/*---------------------------------------------------------------*/
|
||||||
|
|
||||||
/* L I N E S S E C O N D */
|
/* L I N E S S E C O N D */
|
||||||
|
|
||||||
buffer_vertex_size = 0; buffer_colors_size = 0; buffer_lines_size = 0;
|
// buffer_vertex_size = 0; buffer_colors_size = 0; buffer_lines_size = 0;
|
||||||
|
|
||||||
/* S P A C E */
|
/* S P A C E */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue