2024-10-19 16:05:49 +02:00
.TH "include/graphics.h" 3 "Version 0.1.0" "Gem-graph" \" -*- nroff -*-
.ad l
.nh
.SH NAME
include/graphics.h \- graphics header
.SH SYNOPSIS
.br
.PP
\fC #include 'base\& .h'\fP
.br
\fC #include <epoxy/gl\& .h>\fP
.br
\fC #include <GL/glu\& .h>\fP
.br
.SS "Classes"
.in +1c
.ti -1c
.RI "struct \fBgraphics_stack_t\fP"
.br
.RI "Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas\&. "
.in -1c
.SS "Macros"
.in +1c
.ti -1c
.RI "#define \fBVERTEX_SHADER_FILE\fP 'src/shader\&.vert'"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBFRAG_SHADER_FILE\fP 'src/shader\&.frag'"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBGL_TARGET_MAJOR_VERSION\fP 0"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBGL_TARGET_MINOR_VERSION\fP 4"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "int \fBgraphics_init\fP (void *error_buffer)"
.br
.RI "Initializes a gl_area\&. "
.ti -1c
.RI "void \fBgraphics_draw\fP (const int graphics_stack_id)"
.br
.RI "Draws the current buffer to a gl_area\&. "
.ti -1c
2024-10-22 23:58:04 +02:00
.RI "bool \fBgraphics_shutdown\fP (const int id, void *error_buffer)"
2024-10-19 16:05:49 +02:00
.br
2024-10-20 01:05:12 +02:00
.RI "Shutdowns a gl_area\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "bool \fBgraphics_init_shaders\fP (const int graphics_stack_id)"
.br
.RI "Initializes the shaders of a gl_area and link them to a program\&. "
.ti -1c
.RI "void \fBgraphics_init_buffers\fP (const int graphics_stack_id)"
.br
.RI "Initializes the buffer of a gl_area Calls according to the user preferences\&. "
.ti -1c
.RI "void \fBgraphics_draw_vertex\fP (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)"
.br
2024-10-22 23:58:04 +02:00
.RI "Writes values to describe a vertex at (x,y,z) intoq the vertex buffer\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "void \fBgraphics_draw_line\fP (const int graphics_stack_id, GLuint a, GLuint b)"
.br
2024-10-20 01:05:12 +02:00
.RI "Writes values to describe a line from a to b into the line buffer\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "void \fBgraphics_draw_plan\fP (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)"
.br
.RI "Writes values to describe an (a,b,c) plan (triangle) into the plan buffer\&. "
.ti -1c
.RI "void \fBgraphics_draw_color\fP (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)"
.br
.RI "Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&. "
.ti -1c
.RI "void \fBgraphics_model_setup\fP (const int graphics_stack_id)"
.br
2024-10-20 01:05:12 +02:00
.RI "graphics_model_setup "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_one_arrow_vertex\fP (const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)"
.br
2024-10-20 01:05:12 +02:00
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_one_arrow_line\fP (const int graphics_stack_id, int offset_vertex)"
.br
2024-10-20 01:05:12 +02:00
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_space_ridges_vertex\fP (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
.br
.RI "Writes grid ridges to vertex and color buffers\&. "
.ti -1c
.RI "int \fBgraphics_draw_space_ridges_lines\fP (const int graphics_stack_id)"
.br
2024-10-22 23:58:04 +02:00
.RI "phantom documentation used to test the functioning of doxygen "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "long \fBgraphics_draw_grids_on_space_faces_vertex\fP (const int graphics_stack_id, long x, long y, long z)"
.br
.RI "Writes grid lines on space faces\&. "
.ti -1c
.RI "long \fBgraphics_draw_grids_on_space_faces_lines\fP (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
.br
2024-10-23 00:06:21 +02:00
.ti -1c
.RI "int \fBgraphics_set_arrow\fP (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)"
.br
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "struct \fBgraphics_stack_t\fP * \fBgraphics_stack\fP"
.br
.RI "Dynamic array of ptrs to dynamically allocated gl_area_entry\&. "
.in -1c
.SH "Detailed Description"
.PP
graphics header
This file is part of Gem-graph\& .
.SH "Function Documentation"
.PP
2024-10-22 23:58:04 +02:00
.SS "void graphics_draw (const int graphics_stack_id)"
2024-10-19 16:05:49 +02:00
.PP
Draws the current buffer to a gl_area\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-22 23:58:04 +02:00
\fI graphics_stack_id\fP gl_area, ptr to the gl_area widget
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "void graphics_draw_color (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)"
2024-10-19 16:05:49 +02:00
.PP
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI r\fP
.br
\fI g\fP
.br
\fI b\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "long graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
l
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "long graphics_draw_grids_on_space_faces_vertex (const int graphics_stack_id, long x, long y, long z)"
2024-10-19 16:05:49 +02:00
.PP
Writes grid lines on space faces\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-22 23:58:04 +02:00
l
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "void graphics_draw_line (const int graphics_stack_id, GLuint a, GLuint b)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-22 23:58:04 +02:00
Writes values to describe a line from a to b into the line buffer\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "int graphics_draw_one_arrow_line (const int graphics_stack_id, int offset_vertex)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "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)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI space_X\fP
.br
\fI space_Y\fP
.br
\fI space_Z\fP
.br
\fI weight\fP
.br
\fI site\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "void graphics_draw_plan (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)"
2024-10-19 16:05:49 +02:00
.PP
Writes values to describe an (a,b,c) plan (triangle) into the plan buffer\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
.br
\fI c\fP
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "int graphics_draw_space_ridges_vertex (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
2024-10-19 16:05:49 +02:00
.PP
Writes grid ridges to vertex and color buffers\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
Writes grid ridges to vertex and color buffers\& .
2024-10-22 23:58:04 +02:00
.SS "void graphics_draw_vertex (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-22 23:58:04 +02:00
Writes values to describe a vertex at (x,y,z) intoq the vertex buffer\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "int graphics_init (void * error_buffer)"
.PP
Initializes a gl_area\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI *error_buffer\fP gl_area, ptr to the gl_area widget
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
true if initialized
.RE
.PP
2024-10-22 23:58:04 +02:00
param *error_buffer < DO NOT DOCUMENT (it's 'void')
2024-10-19 16:05:49 +02:00
.PP
\fB Returns\fP
.RS 4
2024-10-20 23:03:17 +02:00
true if initialized
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-22 23:58:04 +02:00
.SS "void graphics_init_buffers (const int graphics_stack_id)"
2024-10-19 16:05:49 +02:00
.PP
Initializes the buffer of a gl_area Calls according to the user preferences\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-22 23:58:04 +02:00
\fI graphics_stack_id\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 23:03:17 +02:00
gl_area, ptr to the gl_area widget
2024-10-22 23:58:04 +02:00
.SS "bool graphics_init_shaders (const int graphics_stack_id)"
2024-10-19 16:05:49 +02:00
.PP
Initializes the shaders of a gl_area and link them to a program\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-22 23:58:04 +02:00
\fI graphics_stack_id\fP
2024-10-20 23:03:17 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-22 23:58:04 +02:00
initialized
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "void graphics_model_setup (const int graphics_stack_id)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
graphics_model_setup
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
\fB Parameters\fP
.RS 4
\fI graphics_stack_id\fP
.RE
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
2024-10-23 00:06:21 +02:00
.SS "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)"
.PP
phantom documentation
.PP
\fB Parameters\fP
.RS 4
\fI graphics_stack_id\fP
.br
\fI arrows_nb\fP
.br
\fI space_X\fP
.br
\fI space_Y\fP
.br
\fI space_Z\fP
.br
\fI requested_weight\fP
.br
\fI site\fP
.br
\fI arrow_x\fP
.br
\fI arrow_y\fP
.br
\fI arrow_z\fP
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "bool graphics_shutdown (const int id, void * error_buffer)"
.PP
Shutdowns a gl_area\& .
.PP
2024-10-19 16:05:49 +02:00
\fB Parameters\fP
.RS 4
2024-10-20 23:03:17 +02:00
\fI id\fP
.br
\fI *error_buffer\fP
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-22 23:58:04 +02:00
success
2024-10-19 16:05:49 +02:00
.RE
.PP
.SH "Variable Documentation"
.PP
.SS "struct \fBgraphics_stack_t\fP* graphics_stack\fC [extern]\fP"
.PP
Dynamic array of ptrs to dynamically allocated gl_area_entry\& . Dynamic array of ptrs to dynamically allocated gl_area_entry\& .
.SH "Author"
.PP
Generated automatically by Doxygen for Gem-graph from the source code\& .