gem-graph-client/doc/docbook/d6/d09/draw_8c.xml

227 lines
8.6 KiB
XML

<?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>
<para>graphics - general drawing functions </para>
</para>
<programlisting linenumbering="unnumbered">#include &lt;cglm/cglm.h&gt;<?linebreak?>#include &quot;../../include/base.h&quot;<?linebreak?>#include &quot;../../include/graphics.h&quot;<?linebreak?></programlisting><simplesect>
<title>Functions </title>
<itemizedlist>
<listitem><para>void <link linkend="_draw_8c_1aa0df09cf556373a65c4e0d9c52ea646b">graphics_draw_vertex</link> (const int stack_id, GLfloat x, GLfloat y, GLfloat z)</para>
<para>Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. </para>
</listitem>
<listitem><para>void <link linkend="_draw_8c_1a3956486509d8f170b54c8d6831bb85af">graphics_draw_color</link> (const int stack_id, GLfloat r, GLfloat g, GLfloat b)</para>
<para>Writes values to describe a color (r,g,b) into the color buffer. </para>
</listitem>
<listitem><para>void <link linkend="_draw_8c_1a658c61849cb025f4482be722c62d66e4">graphics_draw_line</link> (const int stack_id, GLuint a, GLuint b)</para>
<para>Writes values to describe a line from a to b into the line buffer. </para>
</listitem>
<listitem><para>void <link linkend="_draw_8c_1a90e33f30b6c203c51f38279e42f74606">graphics_draw_plan</link> (const int stack_id, GLuint a, GLuint b, GLuint c)</para>
<para>Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. </para>
</listitem>
<listitem><para>void <link linkend="_draw_8c_1a7077e01357e203c1997c806abaee658a">graphics_draw</link> (const int stack_id)</para>
<para>Draws the current buffer to a gl_area. </para>
</listitem>
</itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>
<para>graphics - general drawing functions </para>
<para>This file is part of Gem-graph. </para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_draw_8c_1a7077e01357e203c1997c806abaee658a"/><section>
<title>graphics_draw()</title>
<indexterm><primary>graphics_draw</primary><secondary>draw.c</secondary></indexterm>
<indexterm><primary>draw.c</primary><secondary>graphics_draw</secondary></indexterm>
<para><computeroutput>void graphics_draw (const int stack_id)</computeroutput></para><para>
<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>
<entry>gl_area, ptr</entry><entry>
<para>to the gl_area widget</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>void </para>
</formalpara>
</para>
</section>
<anchor xml:id="_draw_8c_1a3956486509d8f170b54c8d6831bb85af"/><section>
<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>
<para><computeroutput>void graphics_draw_color (const int stack_id, GLfloat r, GLfloat g, GLfloat b)</computeroutput></para><para>
<para>Writes values to describe a color (r,g,b) into the color buffer. </para>
</para>
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console.</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>
<entry>color</entry><entry>
<para>GLfloat(r,g,b)</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>void </para>
</formalpara>
</para>
</section>
<anchor xml:id="_draw_8c_1a658c61849cb025f4482be722c62d66e4"/><section>
<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>
<para><computeroutput>void graphics_draw_line (const int stack_id, GLuint a, GLuint b)</computeroutput></para><para>
<para>Writes values to describe a line from a to b into the line buffer. </para>
</para>
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console.</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>
<entry>coords</entry><entry>
<para>GLuint (a,b)</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>void </para>
</formalpara>
</para>
</section>
<anchor xml:id="_draw_8c_1a90e33f30b6c203c51f38279e42f74606"/><section>
<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>
<para><computeroutput>void graphics_draw_plan (const int stack_id, GLuint a, GLuint b, GLuint c)</computeroutput></para><para>
<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>
<entry>coords</entry><entry>
<para>GLuint (a,b,c)</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>void </para>
</formalpara>
</para>
</section>
<anchor xml:id="_draw_8c_1aa0df09cf556373a65c4e0d9c52ea646b"/><section>
<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>
<para><computeroutput>void graphics_draw_vertex (const int stack_id, GLfloat x, GLfloat y, GLfloat z)</computeroutput></para><para>
<para>Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. </para>
</para>
<para>Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console.</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>
<entry>coords</entry><entry>
<para>GLfloat(x,y,z)</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>void </para>
</formalpara>
</para>
</section>
</section>
</section>