WIP: cleaning, simplifying, organizing #include graph_stack (parts of...)
This commit is contained in:
parent
f143664a5b
commit
6f8d3eecf2
|
@ -93,7 +93,7 @@ bool ui_init_graphic_stack(void *container_widget, GError *error_buffer)
|
|||
//g_printerr("[debug] ui_init_graphic_stack() : target would be %p\n",
|
||||
//stack_index[i].container_widget);
|
||||
if (stack_index[i].container_widget == (void *)container_widget) {
|
||||
////////////////////////// stack_index[i].stack_id = graphics_init(&error_buffer);
|
||||
////////////////////////// stack_index[i].stack_id = graphics_init(&error_buffer);
|
||||
//g_printerr("[debug] ui_init_graphic_stack() : stack_id is %d\n",
|
||||
//stack_index[i].stack_id);
|
||||
if (stack_index[i].stack_id >= 0)
|
||||
|
|
|
@ -146,12 +146,11 @@ int graphics_init(void *error_buffer)
|
|||
////////////////////////// glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
////////////////////////// glEnable(GL_MULTISAMPLE);
|
||||
|
||||
if (!graphics_init_shaders(cur_id))
|
||||
return -1;
|
||||
////////////////////////// if (!graphics_init_shaders(cur_id)) return -1;
|
||||
|
||||
//print_stack(cur_id);
|
||||
|
||||
graphics_init_buffers(cur_id);
|
||||
////////////////////////// graphics_init_buffers(cur_id);
|
||||
|
||||
////////////////////////// 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,
|
||||
space_X, space_Y, space_Z);
|
||||
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_lines (stack_id, stack->buffer_lines_size,
|
||||
space_X, space_Y, space_Z);
|
||||
////////////////////////// draw_space_ridges_vertex (stack_id, stack->buffer_vertex_size, space_X, space_Y, space_Z);
|
||||
////////////////////////// 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_lines (stack_id, stack->buffer_lines_size, space_X, space_Y, space_Z);
|
||||
|
||||
stack->buffer_vertex_0_arrow = stack->buffer_vertex_size;
|
||||
stack->buffer_colors_0_arrow = stack->buffer_colors_size;
|
|
@ -85,7 +85,7 @@ bool graphics_init_shaders(const int stack_id)
|
|||
char *vertex_shader;
|
||||
char *fragment_shader;
|
||||
int status;
|
||||
GLuint vertex, fragment;
|
||||
GLuint vertex = 0, fragment; // 2024-06-05 j'initialise vertex à 0 (au pif !)
|
||||
GLuint program = 0;
|
||||
GLuint m = 0;
|
||||
GLuint v = 0;
|
||||
|
@ -107,7 +107,7 @@ bool graphics_init_shaders(const int stack_id)
|
|||
fragment_shader = read_file(FRAG_SHADER_FILE);
|
||||
if (fragment_shader == NULL)
|
||||
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) {
|
||||
glDeleteShader(vertex);
|
||||
|
|
Loading…
Reference in New Issue