410 lines
8.1 KiB
Groff
410 lines
8.1 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
|
|
.RI "phantom documentation "
|
|
.ti -1c
|
|
.RI "#define \fBFRAG_SHADER_FILE\fP 'src/shader\&.frag'"
|
|
.br
|
|
.RI "phantom documentation "
|
|
.ti -1c
|
|
.RI "#define \fBGL_TARGET_MAJOR_VERSION\fP 0"
|
|
.br
|
|
.RI "phantom documentation "
|
|
.ti -1c
|
|
.RI "#define \fBGL_TARGET_MINOR_VERSION\fP 4"
|
|
.br
|
|
.RI "phantom documentation "
|
|
.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
|
|
.RI "bool \fBgraphics_shutdown\fP (const int id, void *error_buffer)"
|
|
.br
|
|
.RI "Shutdowns 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 "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 "Writes values to describe a vertex at (x,y,z) intoq the vertex buffer\&. "
|
|
.ti -1c
|
|
.RI "void \fBgraphics_draw_line\fP (const int graphics_stack_id, GLuint a, GLuint b)"
|
|
.br
|
|
.RI "Writes values to describe a line from a to b into the line buffer\&. "
|
|
.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 "graphics_model_setup "
|
|
.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
|
|
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
|
|
.ti -1c
|
|
.RI "int \fBgraphics_draw_one_arrow_line\fP (const int graphics_stack_id, int offset_vertex)"
|
|
.br
|
|
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
|
|
.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
|
|
.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 graphics_stack_id)"
|
|
|
|
.PP
|
|
Draws the current buffer to a gl_area\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP gl_area, ptr to the gl_area widget
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void graphics_draw_color (const int graphics_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
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIr\fP
|
|
.br
|
|
\fIg\fP
|
|
.br
|
|
\fIb\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "long graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
|
|
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIoffset_vertex\fP
|
|
.br
|
|
\fIx\fP
|
|
.br
|
|
\fIy\fP
|
|
.br
|
|
\fIz\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
l
|
|
.RE
|
|
.PP
|
|
|
|
.SS "long graphics_draw_grids_on_space_faces_vertex (const int graphics_stack_id, long x, long y, long z)"
|
|
|
|
.PP
|
|
Writes grid lines on space faces\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIx\fP
|
|
.br
|
|
\fIy\fP
|
|
.br
|
|
\fIz\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
l
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void graphics_draw_line (const int graphics_stack_id, GLuint a, GLuint b)"
|
|
|
|
.PP
|
|
Writes values to describe a line from a to b into the line buffer\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIa\fP
|
|
.br
|
|
\fIb\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "int graphics_draw_one_arrow_line (const int graphics_stack_id, int offset_vertex)"
|
|
|
|
.PP
|
|
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIoffset_vertex\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
i
|
|
.RE
|
|
.PP
|
|
|
|
.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)"
|
|
|
|
.PP
|
|
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIspace_X\fP
|
|
.br
|
|
\fIspace_Y\fP
|
|
.br
|
|
\fIspace_Z\fP
|
|
.br
|
|
\fIweight\fP
|
|
.br
|
|
\fIsite\fP
|
|
.br
|
|
\fIx\fP
|
|
.br
|
|
\fIy\fP
|
|
.br
|
|
\fIz\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
i
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void graphics_draw_plan (const int graphics_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
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIa\fP
|
|
.br
|
|
\fIb\fP
|
|
.br
|
|
\fIc\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "int graphics_draw_space_ridges_vertex (const int graphics_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
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIoffset_vertex\fP
|
|
.br
|
|
\fIx\fP
|
|
.br
|
|
\fIy\fP
|
|
.br
|
|
\fIz\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
i
|
|
.RE
|
|
.PP
|
|
Writes grid ridges to vertex and color buffers\&.
|
|
.SS "void graphics_draw_vertex (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)"
|
|
|
|
.PP
|
|
Writes values to describe a vertex at (x,y,z) intoq the vertex buffer\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.br
|
|
\fIx\fP
|
|
.br
|
|
\fIy\fP
|
|
.br
|
|
\fIz\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "int graphics_init (void * error_buffer)"
|
|
|
|
.PP
|
|
Initializes a gl_area\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI*error_buffer\fP gl_area, ptr to the gl_area widget
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
true if initialized
|
|
.RE
|
|
.PP
|
|
param *error_buffer < DO NOT DOCUMENT (it's 'void')
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
true if initialized
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void graphics_init_buffers (const int graphics_stack_id)"
|
|
|
|
.PP
|
|
Initializes the buffer of a gl_area Calls according to the user preferences\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.RE
|
|
.PP
|
|
gl_area, ptr to the gl_area widget
|
|
.SS "bool graphics_init_shaders (const int graphics_stack_id)"
|
|
|
|
.PP
|
|
Initializes the shaders of a gl_area and link them to a program\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
initialized
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void graphics_model_setup (const int graphics_stack_id)"
|
|
|
|
.PP
|
|
graphics_model_setup
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIgraphics_stack_id\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "bool graphics_shutdown (const int id, void * error_buffer)"
|
|
|
|
.PP
|
|
Shutdowns a gl_area\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIid\fP
|
|
.br
|
|
\fI*error_buffer\fP
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
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\&.
|