2024-10-19 16:05:49 +02:00
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns= "http://docbook.org/ns/docbook" version= "5.0" xmlns:xlink= "http://www.w3.org/1999/xlink" xml:id= "_draw_8c" xml:lang= "en-US" >
<title > src/graphics/draw.c File Reference</title>
<indexterm > <primary > src/graphics/draw.c</primary> </indexterm>
<para >
2024-10-24 09:12:19 +02:00
<para > general drawing functions </para>
2024-10-19 16:05:49 +02:00
</para>
<programlisting linenumbering= "unnumbered" > #include < cglm/cglm.h> <?linebreak?> #include " ../../include/base.h" <?linebreak?> #include " ../../include/graphics.h" <?linebreak?> </programlisting> <simplesect >
<title > Functions </title>
<itemizedlist >
2024-10-22 23:58:04 +02:00
<listitem > <para > void <link linkend= "_draw_8c_1aa2c4ec98f5bf9942092ff385e9fac72f" > graphics_draw_vertex</link> (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)</para>
2024-10-19 16:05:49 +02:00
<para > Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. </para>
</listitem>
2024-10-22 23:58:04 +02:00
<listitem > <para > void <link linkend= "_draw_8c_1a2be40f60f1a100f87730178ea20a5b6f" > graphics_draw_color</link> (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)</para>
2024-10-19 16:05:49 +02:00
2024-10-22 23:58:04 +02:00
<para > Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </para>
2024-10-19 16:05:49 +02:00
</listitem>
2024-10-22 23:58:04 +02:00
<listitem > <para > void <link linkend= "_draw_8c_1aad0766ae2eda7ded12984d0061f1da89" > graphics_draw_line</link> (const int graphics_stack_id, GLuint a, GLuint b)</para>
2024-10-19 16:05:49 +02:00
<para > Writes values to describe a line from a to b into the line buffer. </para>
</listitem>
2024-10-22 23:58:04 +02:00
<listitem > <para > void <link linkend= "_draw_8c_1afb83b572ba51cecca0db17db6d046546" > graphics_draw_plan</link> (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)</para>
2024-10-19 16:05:49 +02:00
<para > Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. </para>
</listitem>
2024-10-22 23:58:04 +02:00
<listitem > <para > void <link linkend= "_draw_8c_1a66c9c80dbf46ac2168827bf8a0dfb7ee" > graphics_draw</link> (const int graphics_stack_id)</para>
2024-10-19 16:05:49 +02:00
<para > Draws the current buffer to a gl_area. </para>
</listitem>
</itemizedlist>
</simplesect>
<section >
<title > Detailed Description</title>
2024-10-24 09:12:19 +02:00
<para > general drawing functions </para>
2024-10-19 16:05:49 +02:00
<para > This file is part of Gem-graph. </para>
</section>
<section >
<title > Function Documentation</title>
2024-10-22 23:58:04 +02:00
<anchor xml:id= "_draw_8c_1a66c9c80dbf46ac2168827bf8a0dfb7ee" /> <section >
2024-10-19 16:05:49 +02:00
<title > graphics_draw()</title>
<indexterm > <primary > graphics_draw</primary> <secondary > draw.c</secondary> </indexterm>
<indexterm > <primary > draw.c</primary> <secondary > graphics_draw</secondary> </indexterm>
2024-10-22 23:58:04 +02:00
<para > <computeroutput > void graphics_draw (const int graphics_stack_id)</computeroutput> </para> <para >
2024-10-19 16:05:49 +02:00
<para > Draws the current buffer to a gl_area. </para>
</para>
<para >
<formalpara >
<title >
Parameters</title>
<para >
<table frame= "all" >
<tgroup cols= "2" align= "left" colsep= "1" rowsep= "1" >
<colspec colwidth= "1*" />
<colspec colwidth= "4*" />
<tbody >
<row >
2024-10-22 23:58:04 +02:00
<entry > graphics_stack_id</entry> <entry >
2024-10-20 01:05:12 +02:00
<para > gl_area, ptr to the gl_area widget </para>
2024-10-19 16:05:49 +02:00
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
2024-10-20 01:05:12 +02:00
</para>
2024-10-19 16:05:49 +02:00
</section>
2024-10-22 23:58:04 +02:00
<anchor xml:id= "_draw_8c_1a2be40f60f1a100f87730178ea20a5b6f" /> <section >
2024-10-19 16:05:49 +02:00
<title > graphics_draw_color()</title>
<indexterm > <primary > graphics_draw_color</primary> <secondary > draw.c</secondary> </indexterm>
<indexterm > <primary > draw.c</primary> <secondary > graphics_draw_color</secondary> </indexterm>
2024-10-22 23:58:04 +02:00
<para > <computeroutput > void graphics_draw_color (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)</computeroutput> </para> <para >
2024-10-19 16:05:49 +02:00
2024-10-22 23:58:04 +02:00
<para > Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </para>
2024-10-19 16:05:49 +02:00
</para>
<para >
<formalpara >
<title >
Parameters</title>
<para >
<table frame= "all" >
<tgroup cols= "2" align= "left" colsep= "1" rowsep= "1" >
<colspec colwidth= "1*" />
<colspec colwidth= "4*" />
<tbody >
<row >
2024-10-22 23:58:04 +02:00
<entry > graphics_stack_id</entry> <entry >
2024-10-20 23:03:17 +02:00
<para > </para>
</entry>
</row>
<row >
<entry > r</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > g</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > b</entry> <entry >
<para > </para>
2024-10-19 16:05:49 +02:00
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
2024-10-20 01:05:12 +02:00
</para>
2024-10-19 16:05:49 +02:00
</section>
2024-10-22 23:58:04 +02:00
<anchor xml:id= "_draw_8c_1aad0766ae2eda7ded12984d0061f1da89" /> <section >
2024-10-19 16:05:49 +02:00
<title > graphics_draw_line()</title>
<indexterm > <primary > graphics_draw_line</primary> <secondary > draw.c</secondary> </indexterm>
<indexterm > <primary > draw.c</primary> <secondary > graphics_draw_line</secondary> </indexterm>
2024-10-22 23:58:04 +02:00
<para > <computeroutput > void graphics_draw_line (const int graphics_stack_id, GLuint a, GLuint b)</computeroutput> </para> <para >
2024-10-19 16:05:49 +02:00
<para > Writes values to describe a line from a to b into the line buffer. </para>
</para>
<para >
<formalpara >
<title >
Parameters</title>
<para >
<table frame= "all" >
<tgroup cols= "2" align= "left" colsep= "1" rowsep= "1" >
<colspec colwidth= "1*" />
<colspec colwidth= "4*" />
<tbody >
<row >
2024-10-22 23:58:04 +02:00
<entry > graphics_stack_id</entry> <entry >
2024-10-20 23:03:17 +02:00
<para > </para>
</entry>
</row>
<row >
<entry > a</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > b</entry> <entry >
<para > </para>
2024-10-19 16:05:49 +02:00
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
2024-10-20 01:05:12 +02:00
</para>
2024-10-19 16:05:49 +02:00
</section>
2024-10-22 23:58:04 +02:00
<anchor xml:id= "_draw_8c_1afb83b572ba51cecca0db17db6d046546" /> <section >
2024-10-19 16:05:49 +02:00
<title > graphics_draw_plan()</title>
<indexterm > <primary > graphics_draw_plan</primary> <secondary > draw.c</secondary> </indexterm>
<indexterm > <primary > draw.c</primary> <secondary > graphics_draw_plan</secondary> </indexterm>
2024-10-22 23:58:04 +02:00
<para > <computeroutput > void graphics_draw_plan (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)</computeroutput> </para> <para >
2024-10-19 16:05:49 +02:00
<para > Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. </para>
</para>
<para >
<formalpara >
<title >
Parameters</title>
<para >
<table frame= "all" >
<tgroup cols= "2" align= "left" colsep= "1" rowsep= "1" >
<colspec colwidth= "1*" />
<colspec colwidth= "4*" />
<tbody >
<row >
2024-10-22 23:58:04 +02:00
<entry > graphics_stack_id</entry> <entry >
2024-10-20 23:03:17 +02:00
<para > </para>
</entry>
</row>
<row >
<entry > a</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > b</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > c</entry> <entry >
<para > </para>
2024-10-19 16:05:49 +02:00
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
2024-10-20 01:05:12 +02:00
</para>
2024-10-19 16:05:49 +02:00
</section>
2024-10-22 23:58:04 +02:00
<anchor xml:id= "_draw_8c_1aa2c4ec98f5bf9942092ff385e9fac72f" /> <section >
2024-10-19 16:05:49 +02:00
<title > graphics_draw_vertex()</title>
<indexterm > <primary > graphics_draw_vertex</primary> <secondary > draw.c</secondary> </indexterm>
<indexterm > <primary > draw.c</primary> <secondary > graphics_draw_vertex</secondary> </indexterm>
2024-10-22 23:58:04 +02:00
<para > <computeroutput > void graphics_draw_vertex (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)</computeroutput> </para> <para >
2024-10-19 16:05:49 +02:00
<para > Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. </para>
</para>
<para >
<formalpara >
<title >
Parameters</title>
<para >
<table frame= "all" >
<tgroup cols= "2" align= "left" colsep= "1" rowsep= "1" >
<colspec colwidth= "1*" />
<colspec colwidth= "4*" />
<tbody >
<row >
2024-10-22 23:58:04 +02:00
<entry > graphics_stack_id</entry> <entry >
2024-10-20 23:03:17 +02:00
<para > </para>
</entry>
</row>
<row >
<entry > x</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > y</entry> <entry >
<para > </para>
</entry>
</row>
<row >
<entry > z</entry> <entry >
<para > </para>
2024-10-19 16:05:49 +02:00
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
2024-10-20 01:05:12 +02:00
</para>
2024-10-19 16:05:49 +02:00
</section>
</section>
</section>