428 lines
9.7 KiB
Groff
428 lines
9.7 KiB
Groff
|
.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
|
||
|
.ti -1c
|
||
|
.RI "#define \fBFRAG_SHADER_FILE\fP 'src/shader\&.frag'"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.RI "#define \fBGL_TARGET_MAJOR_VERSION\fP 0"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.RI "#define \fBGL_TARGET_MINOR_VERSION\fP 4"
|
||
|
.br
|
||
|
.in -1c
|
||
|
.SS "Functions"
|
||
|
|
||
|
.in +1c
|
||
|
.ti -1c
|
||
|
.RI "bool \fBgraphics_render_stack\fP (GtkWidget *container_widget)"
|
||
|
.br
|
||
|
.RI "Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas\&. "
|
||
|
.ti -1c
|
||
|
.RI "bool \fBgraphics_setup_glarea\fP (int target_mode, GtkWidget *target_widget)"
|
||
|
.br
|
||
|
.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
|
||
|
.RI "bool \fBgraphics_shutdown\fP (const int graphics_stack_id, void *error_buffer)"
|
||
|
.br
|
||
|
.RI "Draws the current buffer to a gl_area\&. "
|
||
|
.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 "bool \fBgraphics_init_graphics_stack\fP (void *container_widget, GError *error_buffer)"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.RI "bool \fBgraphics_shutdown_graphics_stack\fP (void *container_widget, GError *error_buffer)"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.RI "bool \fBgraphics_update_axis_stack\fP (GtkWidget *container_widget, int axis, int value)"
|
||
|
.br
|
||
|
.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
|
||
|
.RI "Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
|
||
|
.ti -1c
|
||
|
.RI "void \fBgraphics_draw_line\fP (const int graphics_stack_id, GLuint a, GLuint 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_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
|
||
|
.RI "TODO #pragma omp parallel schedule(static, 12) void \fBattribute\fP((optimize('no-unroll-loops'))) main_test_graphics (void) {}\&. "
|
||
|
.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
|
||
|
.ti -1c
|
||
|
.RI "int \fBgraphics_draw_one_arrow_line\fP (const int graphics_stack_id, int offset_vertex)"
|
||
|
.br
|
||
|
.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
|
||
|
.RI "phantom documentation used to test the functioning of doxygen "
|
||
|
.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
|
||
|
.RI "phantom documentation used to test the functioning of doxygen "
|
||
|
.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
|
||
|
.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
|
||
|
.SS "void graphics_draw (const int stack_id)"
|
||
|
|
||
|
.PP
|
||
|
Draws the current buffer to a gl_area\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "void graphics_draw_color (const int stack_id, GLfloat r, GLfloat g, GLfloat b)"
|
||
|
|
||
|
.PP
|
||
|
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIGLfloat\fP r, GLfloat g, GLfloat b
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcolor\fP GLfloat(r,g,b)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "long graphics_draw_grids_on_space_faces_vertex (const int stack_id, long x, long y, long z)"
|
||
|
|
||
|
.PP
|
||
|
Writes grid lines on space faces\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP long (x,y,z)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
Writes grid lines on space faces\&.
|
||
|
.SS "void graphics_draw_line (const int stack_id, GLuint a, GLuint b)"
|
||
|
|
||
|
.PP
|
||
|
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&. Writes values to describe a line from a to b into the line buffer\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIGLfloat\fP r, GLfloat g, GLfloat b
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void Writes values to describe a line from a to b into the line buffer
|
||
|
.RE
|
||
|
.PP
|
||
|
@use liste de fonctions GTK
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP GLuint (a,b)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP GLuint (a,b)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP GLuint (a,b)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "void graphics_draw_plan (const int stack_id, GLuint a, GLuint b, GLuint c)"
|
||
|
|
||
|
.PP
|
||
|
Writes values to describe an (a,b,c) plan (triangle) into the plan buffer\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP GLuint (a,b,c)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "int graphics_draw_space_ridges_vertex (const int stack_id, long offset_vertex, long x, long y, long z)"
|
||
|
|
||
|
.PP
|
||
|
Writes grid ridges to vertex and color buffers\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP long (x,y,z), step_x, step_y, step_z
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
Writes grid ridges to vertex and color buffers\&.
|
||
|
.SS "void graphics_draw_vertex (const int stack_id, GLfloat x, GLfloat y, GLfloat z)"
|
||
|
|
||
|
.PP
|
||
|
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIGLfloat\fP x, GLfloat y, GLfloat z
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIcoords\fP GLfloat(x,y,z)
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "int graphics_init (void * error_buffer)"
|
||
|
|
||
|
.PP
|
||
|
Initializes a gl_area\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
true if initialized
|
||
|
.RE
|
||
|
.PP
|
||
|
Initializes a gl_area\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
id if initialized
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "void graphics_init_buffers (const int stack_id)"
|
||
|
|
||
|
.PP
|
||
|
Initializes the buffer of a gl_area Calls according to the user preferences\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "bool graphics_init_shaders (const int stack_id)"
|
||
|
|
||
|
.PP
|
||
|
Initializes the shaders of a gl_area and link them to a program\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
true if initialized
|
||
|
.RE
|
||
|
.PP
|
||
|
|
||
|
.SS "void graphics_model_setup (const int stack_id)"
|
||
|
|
||
|
.PP
|
||
|
TODO #pragma omp parallel schedule(static, 12) void \fBattribute\fP((optimize('no-unroll-loops'))) main_test_graphics (void) {}\&. assert : space dimensions (x,y,z) > 0 assert : arrows localization within space and sites assert : no more than one arrow per address notify : weights are replaced, NOT added (could be !)
|
||
|
.PP
|
||
|
Init space and arrows (= initial state) and allows ulterior creations, suppressions or modifications of the arrows[] array
|
||
|
.PP
|
||
|
draws the space() triggers graphics_set_arrows() that modifies the list () and draws arrows
|
||
|
.PP
|
||
|
Initialisation du générateur pseudo-aléatoire Attention, les vertex centraux de chaque unité d'espace (cube) peuvent être redondants (max 6)
|
||
|
.SS "bool graphics_shutdown (const int id, void * error_buffer)"
|
||
|
|
||
|
.PP
|
||
|
Draws the current buffer to a gl_area\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
void Shutdowns a gl_area
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
true if success
|
||
|
.RE
|
||
|
.PP
|
||
|
Draws the current buffer to a gl_area\&.
|
||
|
.PP
|
||
|
\fBParameters\fP
|
||
|
.RS 4
|
||
|
\fIgl_area,ptr\fP to the gl_area widget
|
||
|
.RE
|
||
|
.PP
|
||
|
\fBReturns\fP
|
||
|
.RS 4
|
||
|
true if success
|
||
|
.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\&.
|