include/graphics.h File Referenceinclude/graphics.hgraphics header #include "base.h"#include <epoxy/gl.h>#include <GL/glu.h>Classes struct graphics_stack_tStructure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas. Macros #define VERTEX_SHADER_FILE "src/shader.vert"phantom documentation #define FRAG_SHADER_FILE "src/shader.frag"phantom documentation #define GL_TARGET_MAJOR_VERSION 0phantom documentation #define GL_TARGET_MINOR_VERSION 4phantom documentation Functions bool graphics_render_stack (GtkWidget *container_widget)Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas. bool graphics_setup_glarea (int target_mode, GtkWidget *target_widget)phantom documentation int graphics_init (void *error_buffer)Initializes a gl_area. void graphics_draw (const int graphics_stack_id)Draws the current buffer to a gl_area. bool graphics_shutdown (const int graphics_stack_id, void *error_buffer)Shutdowns a gl_area. bool graphics_init_shaders (const int graphics_stack_id)Initializes the shaders of a gl_area and link them to a program. bool graphics_init_graphics_stack (void *container_widget, GError *error_buffer)phantom documentation bool graphics_shutdown_graphics_stack (void *container_widget, GError *error_buffer)phantom documentation bool graphics_update_axis_stack (GtkWidget *container_widget, int axis, int value)phantom documentation void graphics_init_buffers (const int graphics_stack_id)Initializes the buffer of a gl_area Calls according to the user preferences. void graphics_draw_vertex (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console. void graphics_draw_line (const int graphics_stack_id, GLuint a, GLuint b)Writes values to describe a line from a to b into the line buffer. void graphics_draw_plan (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. void graphics_draw_color (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. void graphics_model_setup (const int graphics_stack_id)graphics_model_setup int graphics_draw_one_arrow_vertex (const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console. int graphics_draw_one_arrow_line (const int graphics_stack_id, int offset_vertex)Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console. int graphics_draw_space_ridges_vertex (const int graphics_stack_id, long offset_vertex, long x, long y, long z)Writes grid ridges to vertex and color buffers. int graphics_draw_space_ridges_lines (const int graphics_stack_id)draw_space_ridges_lines long graphics_draw_grids_on_space_faces_vertex (const int graphics_stack_id, long x, long y, long z)Writes grid lines on space faces. long graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z)phantom documentation used to test the functioning of doxygen int graphics_set_arrow (int graphics_stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)set_arrow Variables struct graphics_stack_t * graphics_stackDynamic array of ptrs to dynamically allocated gl_area_entry. Detailed Descriptiongraphics header This file is part of Gem-graph. Function Documentationgraphics_draw()graphics_drawgraphics.hgraphics.hgraphics_drawvoid graphics_draw (const int stack_id)Draws the current buffer to a gl_area.
Parameters
graphics_stack_idstack_idgl_area, ptr to the gl_area widget
graphics_draw_color()graphics_draw_colorgraphics.hgraphics.hgraphics_draw_colorvoid graphics_draw_color (const int stack_id, GLfloat r, GLfloat g, GLfloat b)Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console.
Parameters
graphics_stack_idrgb
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console.
Parameters
stack_idrgb
graphics_draw_grids_on_space_faces_lines()graphics_draw_grids_on_space_faces_linesgraphics.hgraphics.hgraphics_draw_grids_on_space_faces_lineslong graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z)phantom documentation used to test the functioning of doxygen
Parameters
graphics_stack_idoffset_vertexxyz
Returnsl graphics_draw_grids_on_space_faces_vertex()graphics_draw_grids_on_space_faces_vertexgraphics.hgraphics.hgraphics_draw_grids_on_space_faces_vertexlong graphics_draw_grids_on_space_faces_vertex (const int stack_id, long x, long y, long z)Writes grid lines on space faces.
Parameters
graphics_stack_idxyz
Returnsl
Writes grid lines on space faces. graphics_draw_line()graphics_draw_linegraphics.hgraphics.hgraphics_draw_linevoid graphics_draw_line (const int stack_id, GLuint a, GLuint b)Writes values to describe a line from a to b into the line buffer. @use liste de fonctions GTK
Parameters
coordsGLuint (a,b)graphics_stack_idabstack_idab
graphics_draw_one_arrow_line()graphics_draw_one_arrow_linegraphics.hgraphics.hgraphics_draw_one_arrow_lineint graphics_draw_one_arrow_line (const int graphics_stack_id, int offset_vertex)Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console.
Parameters
graphics_stack_idoffset_vertex
Returnsi graphics_draw_one_arrow_vertex()graphics_draw_one_arrow_vertexgraphics.hgraphics.hgraphics_draw_one_arrow_vertexint graphics_draw_one_arrow_vertex (const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console.
Parameters
Returnsi graphics_draw_plan()graphics_draw_plangraphics.hgraphics.hgraphics_draw_planvoid graphics_draw_plan (const int stack_id, GLuint a, GLuint b, GLuint c)Writes values to describe an (a,b,c) plan (triangle) into the plan buffer.
Parameters
graphics_draw_space_ridges_lines()graphics_draw_space_ridges_linesgraphics.hgraphics.hgraphics_draw_space_ridges_linesint graphics_draw_space_ridges_lines (const int stack_id)draw_space_ridges_lines
Parameters
graphics_stack_id
Returnsi
draw_space_ridges_lines graphics_draw_space_ridges_vertex()graphics_draw_space_ridges_vertexgraphics.hgraphics.hgraphics_draw_space_ridges_vertexint graphics_draw_space_ridges_vertex (const int stack_id, long offset_vertex, long x, long y, long z)Writes grid ridges to vertex and color buffers.
Parameters
graphics_stack_idoffset_vertexxyz
Returnsi
Writes grid ridges to vertex and color buffers. graphics_draw_vertex()graphics_draw_vertexgraphics.hgraphics.hgraphics_draw_vertexvoid graphics_draw_vertex (const int stack_id, GLfloat x, GLfloat y, GLfloat z)Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console.
Parameters
GLfloatx, GLfloat y, GLfloat zgraphics_stack_idxyz
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console.
Parameters
stack_idxyz
graphics_init()graphics_initgraphics.hgraphics.hgraphics_initint graphics_init (void * error_buffer)Initializes a gl_area.
Parameters
*error_buffergl_area, ptr to the gl_area widget
Returnstrue if initialized
Parameters
*error_buffer
Returnstrue if initialized graphics_init_buffers()graphics_init_buffersgraphics.hgraphics.hgraphics_init_buffersvoid graphics_init_buffers (const int stack_id)Initializes the buffer of a gl_area Calls according to the user preferences.
Parameters
gl_area, ptrto the gl_area widgetgraphics_stack_idgl_area, ptr to the gl_area widgetstack_id
gl_area, ptr to the gl_area widget graphics_init_shaders()graphics_init_shadersgraphics.hgraphics.hgraphics_init_shadersbool graphics_init_shaders (const int stack_id)Initializes the shaders of a gl_area and link them to a program.
Parameters
graphics_stack_idgl_area, ptr to the gl_area widget
Returnstrue if initialized
Parameters
gl_area, ptrto the gl_area widget
Returnstrue if initialized
Parameters
stack_id
gl_area, ptr to the gl_area widgetReturnstrue if initialized graphics_model_setup()graphics_model_setupgraphics.hgraphics.hgraphics_model_setupvoid graphics_model_setup (const int graphics_stack_id)graphics_model_setup
Parameters
graphics_stack_id
graphics_set_arrow()graphics_set_arrowgraphics.hgraphics.hgraphics_set_arrowint graphics_set_arrow (int graphics_stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)set_arrow
Parameters
Returnsi graphics_shutdown()graphics_shutdowngraphics.hgraphics.hgraphics_shutdownbool graphics_shutdown (const int id, void * error_buffer)Shutdowns a gl_area.
Parameters
graphics_stack_id*error_buffer
Returnstrue if success
Parameters
gl_area, ptrto the gl_area widget
Returnstrue if success
Parameters
id*error_buffer
gl_area, ptr to the gl_area widgetReturnstrue if success Variable Documentationgraphics_stackgraphics_stackgraphics.hgraphics.hgraphics_stackstruct graphics_stack_t* graphics_stack[extern]Dynamic array of ptrs to dynamically allocated gl_area_entry. Dynamic array of ptrs to dynamically allocated gl_area_entry.