301 lines
11 KiB
XML
301 lines
11 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>general drawing functions </para>
|
|
|
|
</para>
|
|
<programlisting linenumbering="unnumbered">#include <cglm/cglm.h><?linebreak?>#include "../../include/base.h"<?linebreak?>#include "../../include/graphics.h"<?linebreak?></programlisting>Include dependency graph for draw.c:<para>
|
|
<informalfigure>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d4/d02/draw_8c__incl.svg"></imagedata>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</informalfigure>
|
|
</para>
|
|
<simplesect>
|
|
<title>Functions </title>
|
|
<itemizedlist>
|
|
<listitem><para>void <link linkend="_draw_8c_1aa2c4ec98f5bf9942092ff385e9fac72f">graphics_draw_vertex</link> (const int graphics_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_1a2be40f60f1a100f87730178ea20a5b6f">graphics_draw_color</link> (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)</para>
|
|
|
|
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </para>
|
|
</listitem>
|
|
<listitem><para>void <link linkend="_draw_8c_1aad0766ae2eda7ded12984d0061f1da89">graphics_draw_line</link> (const int graphics_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_1afb83b572ba51cecca0db17db6d046546">graphics_draw_plan</link> (const int graphics_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_1a66c9c80dbf46ac2168827bf8a0dfb7ee">graphics_draw</link> (const int graphics_stack_id)</para>
|
|
|
|
<para>Draws the current buffer to a gl_area. </para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</simplesect>
|
|
<section>
|
|
<title>Detailed Description</title>
|
|
|
|
<para>general drawing functions </para>
|
|
|
|
<para>This file is part of Gem-graph. </para>
|
|
</section>
|
|
<section>
|
|
<title>Function Documentation</title>
|
|
<anchor xml:id="_draw_8c_1a66c9c80dbf46ac2168827bf8a0dfb7ee"/><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 graphics_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>graphics_stack_id</entry><entry>
|
|
<para>gl_area, ptr to the gl_area widget </para>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</formalpara>
|
|
</para>
|
|
Here is the caller graph for this function:<para>
|
|
<informalfigure>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d6/d09/draw_8c_a66c9c80dbf46ac2168827bf8a0dfb7ee_icgraph.svg"></imagedata>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</informalfigure>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_draw_8c_1a2be40f60f1a100f87730178ea20a5b6f"/><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 graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)</computeroutput></para><para>
|
|
|
|
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </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>graphics_stack_id</entry><entry>
|
|
<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>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</formalpara>
|
|
</para>
|
|
Here is the caller graph for this function:<para>
|
|
<informalfigure>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d6/d09/draw_8c_a2be40f60f1a100f87730178ea20a5b6f_icgraph.svg"></imagedata>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</informalfigure>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_draw_8c_1aad0766ae2eda7ded12984d0061f1da89"/><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 graphics_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>
|
|
<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>graphics_stack_id</entry><entry>
|
|
<para></para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>a</entry><entry>
|
|
<para></para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>b</entry><entry>
|
|
<para></para>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</formalpara>
|
|
</para>
|
|
Here is the caller graph for this function:<para>
|
|
<informalfigure>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d6/d09/draw_8c_aad0766ae2eda7ded12984d0061f1da89_icgraph.svg"></imagedata>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</informalfigure>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_draw_8c_1afb83b572ba51cecca0db17db6d046546"/><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 graphics_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>graphics_stack_id</entry><entry>
|
|
<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>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</formalpara>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_draw_8c_1aa2c4ec98f5bf9942092ff385e9fac72f"/><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 graphics_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>
|
|
<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>graphics_stack_id</entry><entry>
|
|
<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>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</formalpara>
|
|
</para>
|
|
Here is the caller graph for this function:<para>
|
|
<informalfigure>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d6/d09/draw_8c_aa2c4ec98f5bf9942092ff385e9fac72f_icgraph.svg"></imagedata>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</informalfigure>
|
|
</para>
|
|
</section>
|
|
</section>
|
|
</section>
|