include/graphics.h File Reference include/graphics.h graphics header #include "base.h"#include <epoxy/gl.h>#include <GL/glu.h>Include dependency graph for graphics.h: This graph shows which files directly or indirectly include this file: Classes struct graphics_stack_t Structure 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   0 phantom documentation #define GL_TARGET_MINOR_VERSION   4 phantom documentation Functions 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 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. 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) Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. 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) phantom documentation used to test the functioning of doxygen 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) 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) phantom documentation Variables struct graphics_stack_t * graphics_stack Dynamic array of ptrs to dynamically allocated gl_area_entry.
Detailed Description graphics header This file is part of Gem-graph.
Function Documentation
graphics_draw() graphics_drawgraphics.h graphics.hgraphics_draw void graphics_draw (const int graphics_stack_id) Draws the current buffer to a gl_area. Parameters graphics_stack_id gl_area, ptr to the gl_area widget
Here is the caller graph for this function:
graphics_draw_color() graphics_draw_colorgraphics.h graphics.hgraphics_draw_color 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. Parameters graphics_stack_id r g b
Here is the caller graph for this function:
graphics_draw_grids_on_space_faces_lines() graphics_draw_grids_on_space_faces_linesgraphics.h graphics.hgraphics_draw_grids_on_space_faces_lines long graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z) Parameters graphics_stack_id offset_vertex x y z
Returns l
Here is the call graph for this function: Here is the caller graph for this function:
graphics_draw_grids_on_space_faces_vertex() graphics_draw_grids_on_space_faces_vertexgraphics.h graphics.hgraphics_draw_grids_on_space_faces_vertex 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. Parameters graphics_stack_id x y z
Returns l
Here is the call graph for this function: Here is the caller graph for this function:
graphics_draw_line() graphics_draw_linegraphics.h graphics.hgraphics_draw_line 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. Parameters graphics_stack_id a b
Here is the caller graph for this function:
graphics_draw_one_arrow_line() graphics_draw_one_arrow_linegraphics.h graphics.hgraphics_draw_one_arrow_line 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. Parameters graphics_stack_id offset_vertex
Returns i
graphics_draw_one_arrow_vertex() graphics_draw_one_arrow_vertexgraphics.h graphics.hgraphics_draw_one_arrow_vertex 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. Parameters graphics_stack_id space_X space_Y space_Z weight site x y z
Returns i
graphics_draw_plan() graphics_draw_plangraphics.h graphics.hgraphics_draw_plan 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. Parameters graphics_stack_id a b c
graphics_draw_space_ridges_vertex() graphics_draw_space_ridges_vertexgraphics.h graphics.hgraphics_draw_space_ridges_vertex 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. Parameters graphics_stack_id offset_vertex x y z
Returns i Writes grid ridges to vertex and color buffers.
Here is the call graph for this function: Here is the caller graph for this function:
graphics_draw_vertex() graphics_draw_vertexgraphics.h graphics.hgraphics_draw_vertex void graphics_draw_vertex (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z) Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. Parameters graphics_stack_id x y z
Here is the caller graph for this function:
graphics_init() graphics_initgraphics.h graphics.hgraphics_init int graphics_init (void * error_buffer) Initializes a gl_area. Parameters *error_buffer gl_area, ptr to the gl_area widget
Returns true if initialized param *error_buffer < DO NOT DOCUMENT (it's 'void')
Returns true if initialized Here is the call graph for this function: Here is the caller graph for this function:
graphics_init_buffers() graphics_init_buffersgraphics.h graphics.hgraphics_init_buffers void graphics_init_buffers (const int graphics_stack_id) Initializes the buffer of a gl_area Calls according to the user preferences. Parameters graphics_stack_id
gl_area, ptr to the gl_area widget
Here is the call graph for this function: Here is the caller graph for this function:
graphics_init_shaders() graphics_init_shadersgraphics.h graphics.hgraphics_init_shaders bool graphics_init_shaders (const int graphics_stack_id) Initializes the shaders of a gl_area and link them to a program. Parameters graphics_stack_id
Returns initialized
Here is the call graph for this function: Here is the caller graph for this function:
graphics_model_setup() graphics_model_setupgraphics.h graphics.hgraphics_model_setup void graphics_model_setup (const int graphics_stack_id) graphics_model_setup Parameters graphics_stack_id
Here is the call graph for this function: Here is the caller graph for this function:
graphics_set_arrow() graphics_set_arrowgraphics.h graphics.hgraphics_set_arrow 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) phantom documentation Parameters graphics_stack_id arrows_nb space_X space_Y space_Z requested_weight site arrow_x arrow_y arrow_z
Here is the caller graph for this function:
graphics_shutdown() graphics_shutdowngraphics.h graphics.hgraphics_shutdown bool graphics_shutdown (const int id, void * error_buffer) Shutdowns a gl_area. Parameters id *error_buffer
Returns success
Here is the caller graph for this function:
Variable Documentation
graphics_stack graphics_stackgraphics.h graphics.hgraphics_stack struct 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.