Commits

Jason McKesson committed 7fd1e64 Merge

Had to do some funky merging.

Comments (0)

Files changed (510)

Documents/Basics/Tutorial 00.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <?oxygen RNGSchema="http://docbook.org/xml/5.0/rng/docbookxi.rng" type="xml"?>
 <?oxygen SCHSchema="http://docbook.org/xml/5.0/rng/docbookxi.rng"?>
-<chapter xml:id="tut_00" xmlns="http://docbook.org/ns/docbook"
+<article xml:id="tut_00" xmlns="http://docbook.org/ns/docbook"
     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink"
     version="5.0">
     <?dbhtml filename="Introduction.html" ?>
                 </mediaobject>
             </figure>
             <para>To make it easier to use this, OpenGL also offers the guarantee that if you pass
-                the same input vertex data through the vertex processing stage, you will get
-                identical output; this is called the <glossterm>invariance guarantee</glossterm>. So
-                the onus is on the user to use the same input vertices if you want to ensure
-                gap-less scan conversion.</para>
+                the same input vertex data through same vertex processor, you will get identical
+                output; this is called the <glossterm>invariance guarantee</glossterm>. So the onus
+                is on the user to use the same input vertices if you want to ensure gap-less scan
+                conversion.</para>
             <para>Scan conversion is an inherently 2D operation. This process only uses the X and Y
                 position of the triangle in window coordinates to determine which fragments to
                 generate. The Z value is not forgotten, but it is directly part of the actual
             </glossentry>
         </glosslist>
     </section>
-</chapter>
+</article>

Documents/Outline.xml

                     <para>Optimization.</para>
                 </glossdef>
             </glossentry>
+            <glossentry>
+                <glossterm>Invariance</glossterm>
+                <glossdef>
+                    <para>Using the <quote>invariant</quote> qualifier to ensure invariance across
+                        shader programs.</para>
+                </glossdef>
+            </glossentry>
         </glosslist>
     </section>
 </article>

Documents/Positioning/Tutorial 03.xml

     <section>
         <title>Moving the Vertices</title>
         <para>The simplest way one might think to move a triangle or other object around is to
-            simply modify the vertex position data directly. From the previous tutorial, we learned
+            simply modify the vertex position data directly. From previous tutorials, we learned
             that the vertex data is stored in a buffer object. So the task is to modify the vertex
             data in the buffer object. This is what <filename>cpuPositionOffset.cpp</filename>
             does.</para>
         <?dbhtml filename="Tut03 A Better Way.html" ?>
         <title>A Better Way</title>
         <para>This is fine for a 3-vertex example. But imagine a scene involving millions of
-            vertices (and no, that's not an exaggeration for high-end games). Moving objects this
-            way means having to copy millions of vertices from the original vertex data, add an
+            vertices (and no, that's not an exaggeration for high-end applications). Moving objects
+            this way means having to copy millions of vertices from the original vertex data, add an
             offset to each of them, and then upload that data to an OpenGL buffer object. And all of
             that is <emphasis>before</emphasis> rendering. Clearly there must be a better way; games
             can't possibly do this every frame and still hold decent framerates.</para>
             floating-point math. The question is this: what is the cost of doing more complex
             operations in a vertex shader vs. how often those operations need to be done.</para>
         <para>The second vertex shader we use, the one that computes the offset itself, does a lot
-            of complex map. Sine and cosine values are <emphasis>not</emphasis> fast to compute.
-            They require quite a few computations to calculate. And since the offset itself doesn't
-            change for each vertex, it would be best to compute the offset on the CPU and pass the
-            offset as a uniform value.</para>
+            of complex map. Sine and cosine values are not particularly fast to compute. They
+            require quite a few computations to calculate. And since the offset itself doesn't
+            change for each vertex in a single rendering call, performance-wise it would be best to
+            compute the offset on the CPU and pass the offset as a uniform value.</para>
         <para>And typically, that is how rendering is done much of the time. Vertex shaders are
             given transformation values that are pre-computed on the CPU. But this does not mean
             that this is the only or best way to do this. In some cases, it is often useful to
             the position at a particular time or some other parameter. This can be done for particle
             systems based on forces; the vertex shader executes the force functions based on time,
             and is able to thus compute the location of the particle at an arbitrary time.</para>
+        <para>This also has an advantage that we have seen. By passing high-level information to the
+            shader and letting it do complex math, you can affect much more than just a simple
+            offset. The color animation in the fragment shader would not have been possible with
+            just an offset. High-level parameterization gives shaders a great deal of
+            freedom.</para>
     </section>
     <section>
         <?dbhtml filename="Tut03 In Review.html" ?>
         <title>In Review</title>
         <para>In this tutorial, you have learned about uniform variables in shaders. Uniforms are
             shader variables that change, not with every shader envocation, but between rendering
-            calls. Uniform values are parameters set by the user to control the behavior of the
-            shader. Setting them requires querying a uniform location as well as setting the program
-            to be in use. Uniform state is stored within a program object and preserved until
-            explicitly changed. A uniform that has the same name and type in two different shader
-            stages within the same linked program is the same uniform; setting it will change it for
-            both stages.</para>
+            calls whenever the user chooses to change them. Uniform values are parameters set by the
+            user to control the behavior of the shader. Setting them requires querying a uniform
+            location as well as setting the program to be in use. Uniform state is stored within a
+            program object and preserved until explicitly changed. A uniform that has the same name
+            and type in two different shader stages within the same linked program is the same
+            uniform; setting it will change it for both stages.</para>
         <para>You have also learned a little about how to update the contents of a buffer object,
             though we are <emphasis>far</emphasis> from finished with that subject.</para>
         <section>

Documents/Positioning/Tutorial 04.xml

                         above.</para>
                 </listitem>
                 <listitem>
-                    <para>Perspective division term: compute the W value, where Ez is -1.</para>
+                    <para>Perspective division term: compute the W value, where
+                            E<subscript>z</subscript> is -1.</para>
                 </listitem>
             </orderedlist>
             <para>Now that we have all the theory down, we are ready to put things properly in
                 this line:</para>
             <programlisting>clipPos.xy = cameraPos.xy * frustumScale;</programlisting>
             <para>Even if you are familiar with vector math libraries in other languages, this code
-                should be rather odd. Normal vector libraries allow you to write selectors like
+                should be rather odd. Traditional vector libraries allow you to write selectors like
                     <literal>vec.x</literal> and <literal>vec.w</literal> in order to get a specific
                 field from a vector. So what does something like <literal>vec.xy</literal>
                 mean?</para>
                     <para>You cannot do <literal>theVec.zz</literal>.</para>
                 </listitem>
                 <listitem>
-                    <para>You cannot select more than 4 components. So you can't create a non</para>
+                    <para>You cannot select more than 4 components.</para>
                 </listitem>
             </itemizedlist>
             <para>These are the only rules. So you can have a <type>vec2</type> that you swizzle to
                 etc. Anything goes so long as you stick to those rules.</para>
             <para>You should also assume that swizzling is fast. This is not true of most CPU-based
                 vector hardware, but since the earliest days of programmable GPUs, swizzle selection
-                has been a prominent feature. In the early programmable days, sizzles caused
+                has been a prominent feature. In the early programmable days, swizzles caused
                     <emphasis>no</emphasis> performance loss; in all likelihood, this has not
                 changed.</para>
             <para>Swizzle selection can also be used on the left side of the equals, as we have done
                 <emphasis>all</emphasis> of the camera space position components. Most of the terms
             are zero, of course, so they don't contribute to the output. But they do contribute to
             being able to re-express the entire transformation as a single operation.</para>
-        <para>You may be wondering at the multiplication of half of Zclip's value by the camera
-            space W. Well, our input camera space position's W coordinate is always 1. So performing
-            the multiplication is valid, so long as this continues to be the case. Being able to do
-            what we are about to do is part of the reason why the W coordinate exists (the
-            perspective divide is the other).</para>
+        <para>You may be wondering at the multiplication of the additive term of
+                Z<subscript>clip</subscript>'s value by the camera space W. Well, our input camera
+            space position's W coordinate is always 1. So performing the multiplication is valid, so
+            long as this continues to be the case. Being able to do what we are about to do is part
+            of the reason why the W coordinate exists (the perspective divide is the other).</para>
         <para>Let us now re-express this again, using the coefficients of the equation above. You
             may recognize this reformulation, depending on your knowledge of linear algebra:</para>
         <equation>
             version. Fortunately, graphics hardware is designed to make these operations very fast.
             Because each of the multiplications are independent of each other, they can all be done
             simultaneously, which is exactly the kind of thing graphics hardware does fast.
-            Similarly, the addition operations are partially independent; each rows summation
+            Similarly, the addition operations are partially independent; each row's summation
             doesn't depend on the values from any other row.</para>
         <para>We can re-implement the above perspective projection using matrix math rather than
             explicit math. The <phrase role="propername">MatrixPerspective</phrase> tutorial does
         <para>Please note the <emphasis>order</emphasis> of this operation. The matrix is on the
             left and the vector is on the right. Matrix multiplication is <emphasis>not</emphasis>
             commutative, so M*v is not the same thing as v*M. Normally vectors are considered 1xN
-            matrices (where N is the size of the vector). However, when you multiply vectors on the
-            right, GLSL considers it an Nx1 matrix; this is the only way to make the multiplication
-            make sense. This will multiply the single row of the vector with each column, summing
-            the results, creating a new vector. This is <emphasis>not</emphasis> what we want to do.
-            We want to multiply rows of the matrix by the vector, not columns of the matrix. Put the
-            vector on the right, not the left.</para>
+            matrices (where N is the size of the vector). When you multiply vectors on the left of
+            the matrix, GLSL considers it an Nx1 matrix; this is the only way to make the
+            multiplication make sense. This will multiply the single row of the vector with each
+            column, summing the results, creating a new vector. This is <emphasis>not</emphasis>
+            what we want to do. We want to multiply rows of the matrix by the vector, not columns of
+            the matrix. Put the vector on the right, not the left.</para>
         <para>The program initialization routine has a few changes:</para>
         <example>
             <title>Program Initialization of Perspective Matrix</title>
                 <function>glUniformMatrix4fv</function> function. The first parameter is the uniform
             location that we are uploading to. This function can be used to transfer an entire array
             of matrices (yes, uniform arrays of any type are possible), so the second parameter is
-            the number of array entries.</para>
+            the number of array entries. Since we're only providing one matrix, this value is
+            1.</para>
         <para>The third parameter tells OpenGL what the ordering of the matrix data is. If it is
                 <literal>GL_TRUE</literal>, then the matrix data is in row-major order. Since our
             data is column-major, we set it to <literal>GL_FALSE</literal>. The last parameter is
             width to its height. Currently, when you change the window's dimensions, the code calls
                 <function>glViewport</function> to tell OpenGL the new size. This changes OpenGL's
             viewport transform, which goes from normalized device coordinates to window coordinates.
-            NDC space is square; as long as window coordinates are also square, objects that appear
-            square in NDC space will still be square in window space. Once window space became
-            non-square, it caused the transformation to also become not a square.</para>
+            NDC space has a 1:1 aspect ratio; the width and height of NDC space is 2x2. As long as
+            window coordinates also has a 1:1 width to height ratio, objects that appear square in
+            NDC space will still be square in window space. Once window space became non-1:1, it
+            caused the transformation to also become not a square.</para>
         <para>What exactly can be done about this? Well, that depends on what you intend to
             accomplish by making the window bigger.</para>
         <para>One simple way to do this is to prevent the viewport from ever becoming non-square.
                         happens.</para>
                 </listitem>
                 <listitem>
-                    <para>In the section on aspect ratio, we saw a solution to the aspect ratio
-                        problem that modified the projection matrix's aspect ratio, so that it could
-                        render into a non-square viewport. Instead, change this code so that it
-                        modifies the <emphasis>viewport</emphasis> itself, always using the minimum
-                        sized square that will fit within the window's size. Also, add code to
-                        center the viewport within the window.</para>
-                </listitem>
-                <listitem>
                     <para>We made some simplifying assumptions in our perspective transformation
                         algorithm. In particular, we fixed the eye point at (0, 0, 0). and the plane
                         at (0, 0, 1). However, this was not strictly necessary; we could have

Documents/Tutorial Documents.xpr

 <?xml version="1.0" encoding="UTF-8"?>
-<project version="11.2">
+<project version="11.1">
     <meta>
         <filters directoryPatterns="" filePatterns=""
             positiveFilePatterns="" showHiddenFiles="false"/>
         <options>
-            <serialized version="11.2">
+            <serialized version="11.1">
                 <map>
                     <entry>
                         <String xml:space="preserve">scenario.associations</String>
                             </scenarioAssociation>
                             <scenarioAssociation>
                                 <field name="name">
+                                    <String xml:space="preserve">Tutorial to HTML Chunked</String>
+                                </field>
+                                <field name="type">
+                                    <String xml:space="preserve">XSL</String>
+                                </field>
+                                <field name="url">
+                                    <String xml:space="preserve">Outline.xml</String>
+                                </field>
+                            </scenarioAssociation>
+                            <scenarioAssociation>
+                                <field name="name">
                                     <String xml:space="preserve">Tutorial to HTML</String>
                                 </field>
                                 <field name="type">
                             </scenarioAssociation>
                             <scenarioAssociation>
                                 <field name="name">
-                                    <String xml:space="preserve">Docbook PDF Printable</String>
-                                </field>
-                                <field name="type">
-                                    <String xml:space="preserve">XSL</String>
-                                </field>
-                                <field name="url">
-                                    <String xml:space="preserve">Outline.xml</String>
-                                </field>
-                            </scenarioAssociation>
-                            <scenarioAssociation>
-                                <field name="name">
                                     <String xml:space="preserve">Tutorial to HTML</String>
                                 </field>
                                 <field name="type">
                                     <null/>
                                 </field>
                                 <field name="name">
+                                    <String xml:space="preserve">Docbook PDF Kindle</String>
+                                </field>
+                                <field name="baseURL">
+                                    <String xml:space="preserve"></String>
+                                </field>
+                                <field name="footerURL">
+                                    <String xml:space="preserve"></String>
+                                </field>
+                                <field name="fOPMethod">
+                                    <String xml:space="preserve">pdf</String>
+                                </field>
+                                <field name="fOProcessorName">
+                                    <String xml:space="preserve">Apache FOP</String>
+                                </field>
+                                <field name="headerURL">
+                                    <String xml:space="preserve"></String>
+                                </field>
+                                <field name="inputXSLURL">
+                                    <String xml:space="preserve">${frameworks}/docbook/xsl/fo/docbook.xsl</String>
+                                </field>
+                                <field name="inputXMLURL">
+                                    <String xml:space="preserve">${currentFileURL}</String>
+                                </field>
+                                <field name="defaultScenario">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="isFOPPerforming">
+                                    <Boolean xml:space="preserve">true</Boolean>
+                                </field>
+                                <field name="type">
+                                    <String xml:space="preserve">XSL</String>
+                                </field>
+                                <field name="saveAs">
+                                    <Boolean xml:space="preserve">true</Boolean>
+                                </field>
+                                <field name="openInBrowser">
+                                    <Boolean xml:space="preserve">true</Boolean>
+                                </field>
+                                <field name="outputFile">
+                                    <File xml:space="preserve">${cfd}/${cfn}.pdf</File>
+                                </field>
+                                <field name="openOtherLocationInBrowser">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="locationToOpenInBrowserURL">
+                                    <null/>
+                                </field>
+                                <field name="openInEditor">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="showInHTMLPane">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="showInXMLPane">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="showInSVGPane">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="showInResultSetPane">
+                                    <Boolean xml:space="preserve">false</Boolean>
+                                </field>
+                                <field name="useXSLTInput">
+                                    <Boolean xml:space="preserve">true</Boolean>
+                                </field>
+                                <field name="xsltParams">
+                                    <list>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">body.font.master</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">10</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">body.start.indent</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0pt</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">draft.mode</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">no</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.height</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">4.79in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.height.portrait</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">4.79in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.margin.bottom</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.margin.inner</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.margin.outer</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.margin.top</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.width</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">3.59in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">page.width.portrait</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">3.59in</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
+                                    <String xml:space="preserve">title.margin.left</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0pt</String>
+                                    </field>
+                                    </transformationParameter>
+                                    </list>
+                                </field>
+                                <field name="cascadingStylesheets">
+                                    <String-array/>
+                                </field>
+                                <field name="xslTransformer">
+                                    <String xml:space="preserve">Saxon6.5.5</String>
+                                </field>
+                                <field name="extensionURLs">
+                                    <String-array/>
+                                </field>
+                            </scenario>
+                            <scenario>
+                                <field name="advancedOptionsMap">
+                                    <null/>
+                                </field>
+                                <field name="name">
                                     <String xml:space="preserve">Docbook PDF Printable</String>
                                 </field>
                                 <field name="baseURL">
                                     <field name="paramDescription">
                                     <paramDescriptor>
                                     <field name="localName">
+                                    <String xml:space="preserve">keep.relative.image.uris</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">0</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
                                     <String xml:space="preserve">toc.max.depth</String>
                                     </field>
                                     <field name="prefix">
                                     <Boolean xml:space="preserve">true</Boolean>
                                 </field>
                                 <field name="openInBrowser">
-                                    <Boolean xml:space="preserve">false</Boolean>
+                                    <Boolean xml:space="preserve">true</Boolean>
                                 </field>
                                 <field name="outputFile">
-                                    <File xml:space="preserve">${cfd}/${cfn}.html</File>
+                                    <File xml:space="preserve">${cfd}/html/nothing.html</File>
                                 </field>
                                 <field name="openOtherLocationInBrowser">
-                                    <Boolean xml:space="preserve">false</Boolean>
+                                    <Boolean xml:space="preserve">true</Boolean>
                                 </field>
                                 <field name="locationToOpenInBrowserURL">
-                                    <String xml:space="preserve">${cfd}/html/index.html</String>
+                                    <String xml:space="preserve">html/index.html</String>
                                 </field>
                                 <field name="openInEditor">
                                     <Boolean xml:space="preserve">false</Boolean>
                                     <field name="paramDescription">
                                     <paramDescriptor>
                                     <field name="localName">
+                                    <String xml:space="preserve">base.dir</String>
+                                    </field>
+                                    <field name="prefix">
+                                    <null/>
+                                    </field>
+                                    <field name="namespace">
+                                    <null/>
+                                    </field>
+                                    </paramDescriptor>
+                                    </field>
+                                    <field name="value">
+                                    <String xml:space="preserve">/svn/OpenGL Tutorial/Documents/</String>
+                                    </field>
+                                    </transformationParameter>
+                                    <transformationParameter>
+                                    <field name="paramDescription">
+                                    <paramDescriptor>
+                                    <field name="localName">
                                     <String xml:space="preserve">chunk.quietly</String>
                                     </field>
                                     <field name="prefix">
                                     <null/>
                                 </field>
                                 <field name="name">
-                                    <String xml:space="preserve">Tutorial to Kindle sized PDF</String>
-                                </field>
-                                <field name="baseURL">
-                                    <String xml:space="preserve"></String>
-                                </field>
-                                <field name="footerURL">
-                                    <String xml:space="preserve"></String>
-                                </field>
-                                <field name="fOPMethod">
-                                    <String xml:space="preserve">pdf</String>
-                                </field>
-                                <field name="fOProcessorName">
-                                    <String xml:space="preserve">Apache FOP</String>
-                                </field>
-                                <field name="headerURL">
-                                    <String xml:space="preserve"></String>
-                                </field>
-                                <field name="inputXSLURL">
-                                    <String xml:space="preserve">${frameworks}/docbook/xsl/fo/docbook.xsl</String>
-                                </field>
-                                <field name="inputXMLURL">
-                                    <String xml:space="preserve">${currentFileURL}</String>
-                                </field>
-                                <field name="defaultScenario">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="isFOPPerforming">
-                                    <Boolean xml:space="preserve">true</Boolean>
-                                </field>
-                                <field name="type">
-                                    <String xml:space="preserve">XSL</String>
-                                </field>
-                                <field name="saveAs">
-                                    <Boolean xml:space="preserve">true</Boolean>
-                                </field>
-                                <field name="openInBrowser">
-                                    <Boolean xml:space="preserve">true</Boolean>
-                                </field>
-                                <field name="outputFile">
-                                    <File xml:space="preserve">${cfd}/${cfn}.pdf</File>
-                                </field>
-                                <field name="openOtherLocationInBrowser">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="locationToOpenInBrowserURL">
-                                    <null/>
-                                </field>
-                                <field name="openInEditor">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="showInHTMLPane">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="showInXMLPane">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="showInSVGPane">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="showInResultSetPane">
-                                    <Boolean xml:space="preserve">false</Boolean>
-                                </field>
-                                <field name="useXSLTInput">
-                                    <Boolean xml:space="preserve">true</Boolean>
-                                </field>
-                                <field name="xsltParams">
-                                    <list>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">body.font.master</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">10</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">body.start.indent</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0pt</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">draft.mode</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">no</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.height</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">4.79in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.height.portrait</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">4.79in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.margin.bottom</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.margin.inner</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.margin.outer</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.margin.top</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.width</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">3.59in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">page.width.portrait</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">3.59in</String>
-                                    </field>
-                                    </transformationParameter>
-                                    <transformationParameter>
-                                    <field name="paramDescription">
-                                    <paramDescriptor>
-                                    <field name="localName">
-                                    <String xml:space="preserve">title.margin.left</String>
-                                    </field>
-                                    <field name="prefix">
-                                    <null/>
-                                    </field>
-                                    <field name="namespace">
-                                    <null/>
-                                    </field>
-                                    </paramDescriptor>
-                                    </field>
-                                    <field name="value">
-                                    <String xml:space="preserve">0pt</String>
-                                    </field>
-                                    </transformationParameter>
-                                    </list>
-                                </field>
-                                <field name="cascadingStylesheets">
-                                    <String-array/>
-                                </field>
-                                <field name="xslTransformer">
-                                    <String xml:space="preserve">Saxon6.5.5</String>
-                                </field>
-                                <field name="extensionURLs">
-                                    <String-array/>
-                                </field>
-                            </scenario>
-                            <scenario>
-                                <field name="advancedOptionsMap">
-                                    <null/>
-                                </field>
-                                <field name="name">
                                     <String xml:space="preserve">Execute XQuery</String>
                                 </field>
                                 <field name="baseURL">
             <file name="Positioning/Tutorial%2005.xml"/>
         </folder>
         <file name="Building%20the%20Tutorials.xml"/>
+        <file name="chunked.css"/>
         <file name="cssDoc.txt"/>
         <file name="Outline.xml"/>
         <file name="standard.css"/>

Documents/Tutorials.xml

File contents unchanged.

Documents/chunked.css

+
+body
+{
+    background-color: #fff6e7;
+    padding: 0 5%;
+    font-family: calibri, helvetica, serif;
+    font-size: 12pt;
+}
+
+br.example-break
+{
+    display: none;
+}
+
+div.note
+{
+    margin-left: 50%;
+}
+
+div.example p.title
+{
+    text-align: center;
+}
+
+pre.programlisting
+{
+    font-family: consolas, monospace;
+    font-size: 12pt;
+    margin-left: 5%;
+    margin-right: 5%;
+    background-color: #dbeded;
+    background-image: -moz-linear-gradient(left, #dbeded, #fff6e7);
+    padding: 7px;
+    border: 2px dashed black;
+    -moz-border-radius: 7px;
+    -webkit-border-radius: 7px;
+}
+
+code
+{
+    font-family: consolas, monospace;
+}
+
+code.function { color: #a00010; }
+
+code.varname { color: #d300ff; }
+
+code.filename {  }
+
+code.literal { color: #0f0aae; }
+
+span.type {  }
+
+em.glossterm { text-decoration: underline; }
+
+acronym.acronym { font-weight: bold; }

glm-0.9.0.0/CMakeLists.txt

+cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+cmake_policy(VERSION 2.6)
+
+project(glm)
+
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
+add_subdirectory(glm)
+add_subdirectory(doc)
+
+
+

glm-0.9.0.0/copying.txt

+The MIT License
+
+Copyright (c) 2005 - 2010 G-Truc Creation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

glm-0.9.0.0/doc/CMakeLists.txt

+set(NAME glm-doc)
+
+file(GLOB ROOT_CPP src/*.cpp)
+file(GLOB ROOT_XML src/*.xml)
+file(GLOB ROOT_XSL src/*.xsl)
+
+source_group("XML Files" FILES ${ROOT_XML})
+source_group("XSL Files" FILES ${ROOT_XSL})
+
+add_executable(${NAME} ${ROOT_CPP} ${ROOT_XML} ${ROOT_XSL})

glm-0.9.0.0/doc/about.html

+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html><head><title>OpenGL Mathematics : About</title><meta http-equiv="Content-Language" content="en" /><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" /><meta name="copyright" content="G-Truc Creation" /><link href="./common/style.css" rel="stylesheet" media="screen, print, embossed" type="text/css" /></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.zip/download">
+			Download GLM 0.9.0.0</a></div></div><br /><div class="menu2"><a href="./index.html">News</a></div><div class="menu2"><a href="./about.html">About</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="./goodies.html">Goodies</a></div><br /><div class="menu2"><a href="./glm-manual.pdf">GLM Manual</a></div><div class="menu2"><a href="./html/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.00.8.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&amp;Board=10&amp;page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SF.net page</a></div><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math">Bug report</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">GIT HEAD snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.jpg" alt="G-Truc" /></a></div><div class="menu2"><a href="http://www.sourceforge.net"><img class="menu-img" src="./common/sourceforge.gif" alt="SourceForge" /></a></div><div class="menu2"><a href="http://www.opengl.org"><img class="menu-img" src="./common/opengl.jpg" alt="OpenGL" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM).<br />A C++ mathematics library for 3D graphics.<br /></div><br /><br /><div><div class="title-date"> </div><div class="title4"> </div><div><div class="paragraph">
+			OpenGL Mathematics (GLM) is a C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification.
+		</div><br /><div class="paragraph">
+			The goal of the project is to provide to 3D programmers math classes and functions that miss in C++ when we use to program with GLSL or any high level GPU language. With GLM, the idea is to have a library that works the same way that GLSL which imply a strict following of GLSL specification for the implementation.
+		</div><br /><div class="paragraph">
+			However, this project isn't limited by GLSL features. An extension system allows to extend GLSL capabilities. It allows GLM to be a great subtitute for some OpenGL 3 deprecated functions, to work following a clean programmable approach.
+		</div><br /><div class="paragraph">
+			GLM is release under <a href="./copying.txt">MIT license</a> and available for all version of GCC from version 3.4 and Visual Studio from version 8.0 as a platform independent library.
+		</div><br /></div><div class="news-separator">_________________</div><br /></div><div class="email"><img src="./common/email.png" alt="email not available as text" /></div><div class="news-separator">_________________</div><br /><div class="title3">Copyright � 2005 - 2010 <a href="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>

glm-0.9.0.0/doc/code.html

+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html><head><title>OpenGL Mathematics: Code</title><meta http-equiv="Content-Language" content="en" /><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" /><meta name="copyright" content="G-Truc Creation" /><link href="./common/style.css" rel="stylesheet" media="screen, print, embossed" type="text/css" /></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.zip/download">
+			Download GLM 0.9.0.0</a></div></div><br /><div class="menu2"><a href="./index.html">News</a></div><div class="menu2"><a href="./about.html">About</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="./goodies.html">Goodies</a></div><br /><div class="menu2"><a href="./glm-manual.pdf">GLM Manual</a></div><div class="menu2"><a href="./html/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.00.8.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&amp;Board=10&amp;page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SF.net page</a></div><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math">Bug report</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">GIT HEAD snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.jpg" alt="G-Truc" /></a></div><div class="menu2"><a href="http://www.sourceforge.net"><img class="menu-img" src="./common/sourceforge.gif" alt="SourceForge" /></a></div><div class="menu2"><a href="http://www.opengl.org"><img class="menu-img" src="./common/opengl.jpg" alt="OpenGL" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM).<br />A C++ mathematics library for 3D graphics.<br /></div><br /><br /><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Compute a triangle normal:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/glm.hpp&gt;</span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="keyword">void </span> computeNormal(triangle &amp; Triangle)
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span><span class="keyword">const </span> &amp; a = Triangle.Position[0];
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span><span class="keyword">const </span> &amp; b = Triangle.Position[1];
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span><span class="keyword">const </span> &amp; c = Triangle.Position[2];
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				Triangle.Normal = glm::normalize(glm::cross(c - a, b - a));
+			</span></li><li class="code-line"><span class="code-line-content">
+				}
+			</span></li></ul><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Matrix transform:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="comment">// glm::vec3, glm::vec4, glm::ivec4, glm::mat4</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/glm.hpp&gt; </span></span></li><li class="code-line"><span class="code-line-content"><span class="comment">// glm::perspective</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/gtc/matrix_projection.hpp&gt; </span></span></li><li class="code-line"><span class="code-line-content"><span class="comment">// glm::translate, glm::rotate, glm::scale</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/gtc/matrix_transform.hpp&gt; </span></span></li><li class="code-line"><span class="code-line-content"><span class="comment">// glm::value_ptr</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/gtc/type_ptr.hpp&gt; </span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">mat4</span> Projection =
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f);
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">mat4</span> ViewTranslate = glm::translate(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				glm::<span class="userword">mat4</span>(1.0f), 
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				glm::<span class="userword">vec3</span>(0.0f, 0.0f, -Translate));
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">mat4</span> ViewRotateX = glm::rotate(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				ViewTranslate, 
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				Rotate.y, glm::<span class="userword">vec3</span>(-1.0f, 0.0f, 0.0f));
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">mat4</span> View = glm::rotate(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				ViewRotateX, 
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				Rotate.x, glm::<span class="userword">vec3</span>(0.0f, 1.0f, 0.0f));
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::mat4 Model = glm::scale(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				glm::<span class="userword">mat4</span>(1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				glm::<span class="userword">vec3</span>(0.5f));
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">mat4</span> MVP = Projection * View * Model;
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glUniformMatrix4fv(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP));
+			</span></li><li class="code-line"><span class="code-line-content">
+				}
+			</span></li></ul><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Vector types:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/glm.hpp&gt;</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/gtx/type_precision.hpp&gt;</span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content">
+				std::size_t <span class="keyword">const </span>VertexCount = 4;
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="comment">// Float quad geometry</span></span></li><li class="code-line"><span class="code-line-content">
+				std::size_t <span class="keyword">const </span>PositionSizeF32 = VertexCount * <span class="keyword">sizeof</span>(glm::<span class="userword">vec2</span>);
+			</span></li><li class="code-line"><span class="code-line-content">
+				glm::<span class="userword">vec2 </span><span class="keyword">const </span>PositionDataF32[VertexCount] =
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec2</span>(-1.0f,-1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec2</span>( 1.0f,-1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec2</span>( 1.0f, 1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec2</span>(-1.0f, 1.0f)
+			</span></li><li class="code-line"><span class="code-line-content">
+				};
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="comment">// Half-float quad geometry</span></span></li><li class="code-line"><span class="code-line-content">
+				std::size_t <span class="keyword">const </span>PositionSizeF16 = VertexCount * <span class="keyword">sizeof</span>(glm::<span class="userword">hvec2</span>);
+			</span></li><li class="code-line"><span class="code-line-content">
+				glm::<span class="userword">hvec2 </span><span class="keyword">const </span>PositionDataF16[VertexCount] =
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">hvec2</span>(-1.0f, -1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">hvec2</span>( 1.0f, -1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">hvec2</span>( 1.0f,  1.0f),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">hvec2</span>(-1.0f,  1.0f)
+			</span></li><li class="code-line"><span class="code-line-content">
+				};
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="comment">// 8 bits signed integer quad geometry</span></span></li><li class="code-line"><span class="code-line-content">
+				std::size_t <span class="keyword">const </span>PositionSizeI8 = VertexCount * <span class="keyword">sizeof</span>(glm::<span class="userword">i8vec2</span>);
+			</span></li><li class="code-line"><span class="code-line-content">
+				glm::<span class="userword">i8vec2 </span><span class="keyword">const </span> PositionDataI8[VertexCount] =
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i8vec2</span>(-1,-1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i8vec2</span>( 1,-1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i8vec2</span>( 1, 1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i8vec2</span>(-1, 1)
+			</span></li><li class="code-line"><span class="code-line-content">
+				};
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="comment">// 32 bits signed integer quad geometry</span></span></li><li class="code-line"><span class="code-line-content">
+				std::size_t <span class="keyword">const </span>PositionSizeI32 = VertexCount * <span class="keyword">sizeof</span>(glm::<span class="userword">i32vec2</span>);
+			</span></li><li class="code-line"><span class="code-line-content">
+				glm::<span class="userword">i32vec2 </span><span class="keyword">const </span>PositionDataI32[VertexCount] =
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i32vec2 </span>(-1,-1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i32vec2 </span>( 1,-1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i32vec2 </span>( 1, 1),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">i32vec2 </span>(-1, 1)
+			</span></li><li class="code-line"><span class="code-line-content">
+				};
+			</span></li></ul><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Lighting:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/glm.hpp&gt;</span></span></li><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string">&lt;glm/gtx/random.hpp&gt;</span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content">
+				glm::<span class="userword">vec3 </span> lighting
+			</span></li><li class="code-line"><span class="code-line-content">
+				(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				intersection<span class="keyword"> const </span>&amp; Intersection,
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				material<span class="keyword"> const </span>&amp; Material,
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				light<span class="keyword"> const </span>&amp; Light,
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span>const &amp; View
+			</span></li><li class="code-line"><span class="code-line-content">
+				)
+			</span></li><li class="code-line"><span class="code-line-content">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span> Color = glm::<span class="userword">vec3</span>(0.0f);
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				glm::<span class="userword">vec3 </span>LightVertor = glm::normalize(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				Light.position() - Intersection.globalPosition() +
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px">
+				glm::vecRand3(0.0f, Light.inaccuracy());
+			</span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content" style="padding-left:32px"><span class="keyword">if</span>(!shadow(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				Intersection.globalPosition(),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				Light.position(),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				LightVertor))
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px"><span class="keyword">float</span> Diffuse = glm::dot(Intersection.normal(), LightVector);
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px" /></li><li class="code-line"><span class="code-line-content" style="padding-left:64px"><span class="keyword">if</span>(Diffuse &lt;= 0.0f)
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px"><span class="keyword">return</span> Color;
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px"><span class="keyword">if</span>(Material.isDiffuse())
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px">
+				Color += Light.color() * Material.diffuse() * Diffuse;
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px" /></li><li class="code-line"><span class="code-line-content" style="padding-left:64px"><span class="keyword">if</span>(Material.isSpecular())
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				{
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px">
+				glm::<span class="userword">vec3 </span>Reflect = glm::reflect(
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:128px">
+				glm::normalize(-LightVector),
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:128px">
+				glm::normalize(Intersection.normal()));
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px"><span class="keyword">float</span> Dot = glm::dot(Reflect, View);
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px"><span class="keyword">float</span> Base = Dot &gt; 0.0f ? Dot : 0.0f;
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px"><span class="keyword">float</span> Specular = glm::pow(Base, Material.exponent());
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:96px">
+				Color += Material.specular() * Specular;			 
+			</span></li><li class="code-line"><span class="code-line-content" style="padding-left:64px">
+				}
+			</span></li><li class="code-line"><span class="code-line-content">
+				}
+			</span></li></ul><div class="title3">Copyright � 2005 - 2010 <a href="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>

glm-0.9.0.0/doc/common/doxygen/doxygen.css

+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD