243 lines
10 KiB
XML
243 lines
10 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="_init_8c" xml:lang="en-US">
|
|
<title>src/graphics/init.c File Reference</title>
|
|
<indexterm><primary>src/graphics/init.c</primary></indexterm>
|
|
<para>
|
|
|
|
<para>graphics - initialization and graphic stack management </para>
|
|
|
|
</para>
|
|
<programlisting linenumbering="unnumbered">#include "../../include/graphics.h"<?linebreak?>#include "../../include/parse.h"<?linebreak?>#include "../../include/util.h"<?linebreak?></programlisting><simplesect>
|
|
<title>Macros </title>
|
|
<itemizedlist>
|
|
<listitem><para><anchor xml:id="_init_8c_1ab946e2e7f7679350627acfded8e2658b"/>#define <emphasis role="strong">TEST</emphasis>   0</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</simplesect>
|
|
<simplesect>
|
|
<title>Functions </title>
|
|
<itemizedlist>
|
|
<listitem><para>int <link linkend="_init_8c_1a5a4ed7438a755777b162fc37e84ba93a">graphics_init</link> (void *error_buffer)</para>
|
|
|
|
<para>Initializes graphical stack. </para>
|
|
</listitem>
|
|
<listitem><para>bool <link linkend="_init_8c_1aa4d80f7ee104aa414e7ed4b90e0eac88">graphics_shutdown</link> (const int id, void *error_buffer)</para>
|
|
|
|
<para>Shutdowns a gl_area. </para>
|
|
</listitem>
|
|
<listitem><para>void <link linkend="_init_8c_1a6b097df849779455e6f57d84a7037919">graphics_model_setup</link> (const int stack_id)</para>
|
|
|
|
<para>TODO #pragma omp parallel schedule(static, 12) void <emphasis role="bold">attribute</emphasis>((optimize("no-unroll-loops"))) main_test_graphics (void) {}. </para>
|
|
</listitem>
|
|
<listitem><para>void <link linkend="_init_8c_1a17560cb73e3b25c1e6fbeae088867d0f">graphics_init_buffers</link> (const int stack_id)</para>
|
|
|
|
<para>Initializes the buffer of a gl_area Calls according to the user preferences. </para>
|
|
</listitem>
|
|
<listitem><para>bool <link linkend="_init_8c_1a4ae8809ed73e91b6a20bcfdd94f4c23d">graphics_init_shaders</link> (const int stack_id)</para>
|
|
|
|
<para>Initializes the shaders of a gl_area and link them to a program. </para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</simplesect>
|
|
<simplesect>
|
|
<title>Variables </title>
|
|
<itemizedlist>
|
|
<listitem><para>struct <link linkend="_structgraphics__stack__t">graphics_stack_t</link> * <link linkend="_init_8c_1ad2cd7fe4849c259e9dedcc6e7e795aaf">graphics_stack</link> = NULL</para>
|
|
|
|
<para>phantom documentation used to test the functioning of doxygen </para>
|
|
</listitem>
|
|
<listitem><para><anchor xml:id="_init_8c_1a86ecb95bf1c1a30d42b02f6811b83e4c"/>size_t <emphasis role="strong">graphics_stack_size</emphasis> = 0</para>
|
|
</listitem>
|
|
<listitem><para><anchor xml:id="_init_8c_1a7e77f440f52c90c921a5bdc003c3b03b"/>int * <emphasis role="strong">free_stack_slot</emphasis> = NULL</para>
|
|
</listitem>
|
|
<listitem><para><anchor xml:id="_init_8c_1a29d09eb6569a8bfc0439eac245102077"/>size_t <emphasis role="strong">free_stack_slot_size</emphasis> = 0</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</simplesect>
|
|
<section>
|
|
<title>Detailed Description</title>
|
|
|
|
<para>graphics - initialization and graphic stack management </para>
|
|
|
|
<para>This file is part of Gem-graph. </para>
|
|
</section>
|
|
<section>
|
|
<title>Function Documentation</title>
|
|
<anchor xml:id="_init_8c_1a5a4ed7438a755777b162fc37e84ba93a"/><section>
|
|
<title>graphics_init()</title>
|
|
<indexterm><primary>graphics_init</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_init</secondary></indexterm>
|
|
<para><computeroutput>int graphics_init (void * error_buffer)</computeroutput></para><para>
|
|
|
|
<para>Initializes graphical stack. </para>
|
|
</para>
|
|
|
|
<para>Initializes a gl_area.</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>id if initialized </para>
|
|
</formalpara>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_init_8c_1a17560cb73e3b25c1e6fbeae088867d0f"/><section>
|
|
<title>graphics_init_buffers()</title>
|
|
<indexterm><primary>graphics_init_buffers</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_init_buffers</secondary></indexterm>
|
|
<para><computeroutput>void graphics_init_buffers (const int stack_id)</computeroutput></para><para>
|
|
|
|
<para>Initializes the buffer of a gl_area Calls according to the user preferences. </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="_init_8c_1a4ae8809ed73e91b6a20bcfdd94f4c23d"/><section>
|
|
<title>graphics_init_shaders()</title>
|
|
<indexterm><primary>graphics_init_shaders</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_init_shaders</secondary></indexterm>
|
|
<para><computeroutput>bool graphics_init_shaders (const int stack_id)</computeroutput></para><para>
|
|
|
|
<para>Initializes the shaders of a gl_area and link them to a program. </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>true if initialized </para>
|
|
</formalpara>
|
|
</para>
|
|
</section>
|
|
<anchor xml:id="_init_8c_1a6b097df849779455e6f57d84a7037919"/><section>
|
|
<title>graphics_model_setup()</title>
|
|
<indexterm><primary>graphics_model_setup</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_model_setup</secondary></indexterm>
|
|
<para><computeroutput>void graphics_model_setup (const int stack_id)</computeroutput></para><para>
|
|
|
|
<para>TODO #pragma omp parallel schedule(static, 12) void <emphasis role="bold">attribute</emphasis>((optimize("no-unroll-loops"))) main_test_graphics (void) {}. </para>
|
|
</para>
|
|
|
|
<para>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 !)</para>
|
|
|
|
<para>Init space and arrows (= initial state) and allows ulterior creations, suppressions or modifications of the arrows[] array</para>
|
|
|
|
<para>draws the space() triggers graphics_set_arrows() that modifies the list () and draws arrows</para>
|
|
|
|
<para>Initialisation du générateur pseudo-aléatoire Attention, les vertex centraux de chaque unité d'espace (cube) peuvent être redondants (max 6) </para>
|
|
</section>
|
|
<anchor xml:id="_init_8c_1aa4d80f7ee104aa414e7ed4b90e0eac88"/><section>
|
|
<title>graphics_shutdown()</title>
|
|
<indexterm><primary>graphics_shutdown</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_shutdown</secondary></indexterm>
|
|
<para><computeroutput>bool graphics_shutdown (const int id, void * error_buffer)</computeroutput></para><para>
|
|
|
|
<para>Shutdowns a gl_area. </para>
|
|
</para>
|
|
|
|
<para>Draws the current buffer to a gl_area.</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>true if success </para>
|
|
</formalpara>
|
|
</para>
|
|
</section>
|
|
</section>
|
|
<section>
|
|
<title>Variable Documentation</title>
|
|
<anchor xml:id="_init_8c_1ad2cd7fe4849c259e9dedcc6e7e795aaf"/><section>
|
|
<title>graphics_stack</title>
|
|
<indexterm><primary>graphics_stack</primary><secondary>init.c</secondary></indexterm>
|
|
<indexterm><primary>init.c</primary><secondary>graphics_stack</secondary></indexterm>
|
|
<para><computeroutput>struct <link linkend="_structgraphics__stack__t">graphics_stack_t</link>* graphics_stack = NULL</computeroutput></para><para>
|
|
|
|
<para>phantom documentation used to test the functioning of doxygen </para>
|
|
</para>
|
|
|
|
<para>Dynamic array of ptrs to dynamically allocated gl_area_entry. </para>
|
|
</section>
|
|
</section>
|
|
</section>
|