WIP: erreurs grilles à analyser (vertex + lignes) - certaines valeurs son bonnes
This commit is contained in:
parent
9a1023b0b2
commit
3f708e2afc
|
@ -117,7 +117,7 @@ static void graphics_debug_callback(GLenum source, GLenum type, GLuint id,
|
|||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Writes values to describe a vertex at (x,y,z) into the vertex buffer
|
||||
* Writes values to describe a vertex at (x,y,z) intoq the vertex buffer
|
||||
*
|
||||
* @param coords GLfloat(x,y,z)
|
||||
*
|
||||
|
@ -681,9 +681,9 @@ 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);
|
||||
|
||||
int arbitrary = 3;
|
||||
int space_X = 3,// + rand() % arbitrary,
|
||||
int space_X = 2,// + rand() % arbitrary,
|
||||
space_Y = 2,// + rand() % arbitrary,
|
||||
space_Z = 1;// + rand() % arbitrary;
|
||||
space_Z = 2;// + rand() % arbitrary;
|
||||
int density_max = space_X * space_Y * space_Z;
|
||||
int max = fmax(space_X, space_Y); max = fmax(max, space_Z);
|
||||
|
||||
|
@ -740,8 +740,8 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
|||
buffer_vertex_size += write_grids_on_space_faces_vertex (space_X, space_Y, space_Z);
|
||||
buffer_colors_size = buffer_vertex_size;
|
||||
|
||||
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 (1) printf("(space_X - 1) * 4 + (space_Y - 1) * 4 + (space_Z - 1) * 4 = %3d (x 3 = %4d)\n\n",\
|
||||
if (1) printf("buffer_vertex_size after writing_space_faces_vertex = %4d - 8 = %3d (x 3 = %4d)\n\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",\
|
||||
(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,7 +760,7 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
|||
buffer_colors_size = buffer_vertex_size;
|
||||
}
|
||||
|
||||
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);
|
||||
if (1) printf("buffer_vertex_size after writing_arrows_vertex : %d TODO (arrows_nb = %d)\n\n", buffer_vertex_size, arrows_nb);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------*/
|
||||
|
@ -772,8 +772,12 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
|
|||
/* S P A C E */
|
||||
|
||||
buffer_vertex_size += write_space_ridges_lines ();
|
||||
if (1) printf("buffer_vertex_size after writing_space_ridges_lines : %d (x 3 = %d)\n\n", buffer_vertex_size, buffer_vertex_size * 3);
|
||||
|
||||
buffer_vertex_size += write_grids_on_space_faces_lines (buffer_vertex_size, space_X, space_Y, space_Z);
|
||||
int offset_test = 14; // 10
|
||||
//
|
||||
buffer_vertex_size += write_grids_on_space_faces_lines (offset_test, space_X, space_Y, space_Z);
|
||||
if (1) printf("buffer_vertex_size after writing_space_faces_lines : %d (x 3 = %d)\n\n", buffer_vertex_size, buffer_vertex_size * 3);
|
||||
|
||||
/* A R R O W S */
|
||||
|
||||
|
|
Loading…
Reference in New Issue