WIP: cleaning, simplifying, organizing #include graph_stack (parts of...)

This commit is contained in:
Jean Sirmai 2024-06-06 09:16:38 +02:00
parent f143664a5b
commit 6f8d3eecf2
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 9 additions and 12 deletions

View File

@ -146,12 +146,11 @@ int graphics_init(void *error_buffer)
////////////////////////// glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); ////////////////////////// glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
////////////////////////// glEnable(GL_MULTISAMPLE); ////////////////////////// glEnable(GL_MULTISAMPLE);
if (!graphics_init_shaders(cur_id)) ////////////////////////// if (!graphics_init_shaders(cur_id)) return -1;
return -1;
//print_stack(cur_id); //print_stack(cur_id);
graphics_init_buffers(cur_id); ////////////////////////// graphics_init_buffers(cur_id);
////////////////////////// glDebugMessageCallback(graphics_debug_callback, NULL); ////////////////////////// glDebugMessageCallback(graphics_debug_callback, NULL);
@ -287,12 +286,10 @@ dimension = 1; // AD HOC (2024-06-04)
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
draw_space_ridges_vertex (stack_id, stack->buffer_vertex_size, ////////////////////////// draw_space_ridges_vertex (stack_id, stack->buffer_vertex_size, space_X, space_Y, space_Z);
space_X, space_Y, space_Z); ////////////////////////// draw_space_ridges_lines (stack_id);
draw_space_ridges_lines (stack_id); ////////////////////////// draw_grids_on_space_faces_vertex (stack_id, space_X, space_Y, space_Z);
draw_grids_on_space_faces_vertex (stack_id, space_X, space_Y, space_Z); ////////////////////////// draw_grids_on_space_faces_lines (stack_id, stack->buffer_lines_size, space_X, space_Y, space_Z);
draw_grids_on_space_faces_lines (stack_id, stack->buffer_lines_size,
space_X, space_Y, space_Z);
stack->buffer_vertex_0_arrow = stack->buffer_vertex_size; stack->buffer_vertex_0_arrow = stack->buffer_vertex_size;
stack->buffer_colors_0_arrow = stack->buffer_colors_size; stack->buffer_colors_0_arrow = stack->buffer_colors_size;

View File

@ -85,7 +85,7 @@ bool graphics_init_shaders(const int stack_id)
char *vertex_shader; char *vertex_shader;
char *fragment_shader; char *fragment_shader;
int status; int status;
GLuint vertex, fragment; GLuint vertex = 0, fragment; // 2024-06-05 j'initialise vertex à 0 (au pif !)
GLuint program = 0; GLuint program = 0;
GLuint m = 0; GLuint m = 0;
GLuint v = 0; GLuint v = 0;
@ -107,7 +107,7 @@ bool graphics_init_shaders(const int stack_id)
fragment_shader = read_file(FRAG_SHADER_FILE); fragment_shader = read_file(FRAG_SHADER_FILE);
if (fragment_shader == NULL) if (fragment_shader == NULL)
return false; return false;
fragment = create_shader(stack_id, GL_FRAGMENT_SHADER, fragment_shader); ////////////////////////// fragment = create_shader(stack_id, GL_FRAGMENT_SHADER, fragment_shader);
if(fragment == 0) { if(fragment == 0) {
glDeleteShader(vertex); glDeleteShader(vertex);