Commits

Jason McKesson committed 8a782e1

Changed how the In Review section of tutorials are laid out.

  • Participants
  • Parent commits d5bf9bd

Comments (0)

Files changed (5)

File Documents/Basics/Tutorial 01.xml

     <section>
         <?dbhtml filename="Tut01 In Review.html" ?>
         <title>In Review</title>
-        <para>At this point, you have a good general overview of how things work in OpenGL. You know
-            how to compile and link shaders, how to pass some basic vertex data to OpenGL, and how
-            to render a triangle.</para>
+        <para>In this tutorial, you have learned the following:</para>
+        <itemizedlist>
+            <listitem>
+                <para>Buffer objects are linear arrays of memory allocated by OpenGL. They can be
+                    used to store vertex data.</para>
+            </listitem>
+            <listitem>
+                <para>GLSL shaders are compiled into shader objects that represent the code to be
+                    executed for a single shader stage. These shader objects can be linked together
+                    to produce a program object, which represent all of the shader code to be
+                    executed during rendering.</para>
+            </listitem>
+            <listitem>
+                <para>The <function>glDrawArrays</function> function can be used to draw triangles,
+                    using particular buffer objects as sources for vertex data and the currently
+                    bound program object.</para>
+            </listitem>
+        </itemizedlist>
         <section>
             <title>Further Study</title>
             <para>Even with a simple tutorial like this, there are many things to play around with

File Documents/Basics/Tutorial 02.xml

     <section>
         <?dbhtml filename="Tut02 In Review.html" ?>
         <title>In Review</title>
-        <para>In this tutorial, you learned how to use much of the <varname>gl_FragCoord</varname>
-            built-in variable in a fragment shader. You learned that this data is in screen-space,
-            and how to convert screen space into more useful forms. You also learned how to pass
-            data directly from vertex shaders to fragment shaders. You learned about the
-            interpolation that happens to vertex shader outputs across the surface of a
-            triangle.</para>
+        <para>In this tutorial, you have learned the following:</para>
+        <itemizedlist>
+            <listitem>
+                <para>The <varname>gl_FragCoord</varname> built-in GLSL variable can be used in
+                    fragment shaders to get the window-space coordinates of the current
+                    fragment.</para>
+            </listitem>
+            <listitem>
+                <para>Data can be passed from a vertex shader to a fragment shader, using output
+                    variables in the vertex shader and corresponding input variables in the fragment
+                    shader.</para>
+            </listitem>
+            <listitem>
+                <para>Data passed from the vertex shader to the fragment shader is interpolated
+                    across the surface of the triangle, based on the interpolation qualifier used
+                    for the output and input variables in the vertex and fragment shaders
+                    respectively.</para>
+            </listitem>
+        </itemizedlist>
         <section>
             <title>Further Study</title>
             <para>Here are some ideas to play around with.</para>

File Documents/Positioning/Tutorial 03.xml

     <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 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>
+        <para>In this tutorial, you have learned about the following:</para>
+        <itemizedlist>
+            <listitem>
+                <para>Buffer object contents can be updated partially with the
+                        <function>glBufferSubData</function> function. This function performs the
+                    equivalent of a <function>memcpy</function> operation.</para>
+            </listitem>
+            <listitem>
+                <para>Uniform variables in shaders are variables that are set by code outside of
+                    GLSL. They only change between rendering calls, so they are uniform over the
+                    surface of any particular triangle.</para>
+            </listitem>
+            <listitem>
+                <para>Uniform variable values are stored with the program object. This state is
+                    preserved until it is explicitly changed.</para>
+            </listitem>
+            <listitem>
+                <para>Uniform variables defined in two GLSL stages that have the same name and type
+                    are considered the same uniform. Setting this uniform in the program object will
+                    change its value for both stages.</para>
+            </listitem>
+        </itemizedlist>
         <section>
             <title>Further Study</title>
             <para>There are several things you can test to see what happens with these

File Documents/Positioning/Tutorial 04.xml

     <section>
         <?dbhtml filename="Tut04 In Review.html" ?>
         <title>In Review</title>
-        <para>In this tutorial, you learned about face culling of triangles and the perspective
-            projection. You learned the math behind creating the illusion of perspective, and you
-            learned how to apply that in a shader. You also learned about how to transform this
-            system of equations into a 4x4 matrix, as well as how to use matrices to transform
-            vectors. Lastly, you learned about how to modify the matrix to maintain a particular
-            aspect ratio, so that objects appear the same relative shape regardless of the shape of
-            the window.</para>
+        <para>In this tutorial, you have learned about the following:</para>
+        <itemizedlist>
+            <listitem>
+                <para>Face culling can cause triangles to be culled (not rendered) based on the
+                    order of the vertices in window space.</para>
+            </listitem>
+            <listitem>
+                <para>Perspective projections are used to give a scene the appearance of depth,
+                    where objects farther away appear smaller and offset compared to near ones.
+                    OpenGL hardware has special provisions for perspective projections; namely the
+                    transform from clip-space to NDC space division by W.</para>
+            </listitem>
+            <listitem>
+                <para>The perspective transformation can be performed as a matrix multiplication
+                    operation.</para>
+            </listitem>
+            <listitem>
+                <para>The proper aspect ratio for a display image can be maintained by scaling the X
+                    and Y coordinates of camera-space vertices based on the window's aspect ratio.
+                    This transformation can be folded into the perspective projection matrix.</para>
+            </listitem>
+        </itemizedlist>
         <section>
             <title>Further Study</title>
             <para>Try doing these things with the given programs.</para>

File Documents/Positioning/Tutorial 05.xml

                 depending on the location of the triangle, you can get quite a few different pieces.
                 The simple act of turning one triangle into several is hard and time
                 consuming.</para>
-            <para>So, if OpenGL states that this must happen, and hardware doesn't do it, then
-                what's going on?</para>
-            <para>If we hadn't told you just now that the hardware doesn't do clipping most of the
-                time, could you tell? No. And that's the point: OpenGL specifies
-                    <emphasis>apparent</emphasis> behavior; the spec doesn't care if you actually do
-                clipping or not. All the spec cares about is that the user can't tell the difference
-                in terms of the output.</para>
+            <para>So, if OpenGL states that this must happen, but supposedly OpenGL-compliant
+                hardware doesn't do it, then what's going on?</para>
+            <para>Consider this: if we hadn't told you just now that the hardware doesn't do
+                clipping most of the time, could you tell? No. And that's the point: OpenGL
+                specifies <emphasis>apparent</emphasis> behavior; the spec doesn't care if you
+                actually do vertex clipping or not. All the spec cares about is that the user can't
+                tell the difference in terms of the output.</para>
             <para>That's how hardware can get away with the early-z optimization mentioned before;
                 the OpenGL spec says that the depth test must happen after the fragment program
                 executes. But if the fragment shader doesn't modify the depth, then would you be
             near the planes. Similar problems happen with the far plane, though backface culling can
             be a help in some cases.</para>
         <note>
-            <para>If you're wondering what happens when you have depth clamping and a clip-space W
-                &lt;= 0 and you don't do clipping, then... well, OpenGL doesn't say. At least, it
-                doesn't say specifically. All it says is that clipping against the near and far
-                planes stops and that fragment depth values generated outside of the expected depth
-                range are clamped to that range. No, really, that's <emphasis>all</emphasis> it
-                says.</para>
+            <para>We defined depth clamping as, in part, turning off clipping. If you're wondering
+                what happens when you have depth clamping, which turns off clipping, and a
+                clip-space W &lt;= 0, then... well, OpenGL doesn't say. At least, it doesn't say
+                specifically. All it says is that clipping against the near and far planes stops and
+                that fragment depth values generated outside of the expected depth range are clamped
+                to that range. No, really, that's <emphasis>all</emphasis> it says.</para>
         </note>
     </section>
     <section>
         <?dbhtml filename="Tut05 In Review.html" ?>
         <title>In Review</title>
-        <para/>
+        <para>In this tutorial, you have learned about the following:</para>
+        <itemizedlist>
+            <listitem>
+                <para>Vertex array objects encapsulate all of the vertex transfer state necessary to
+                    render objects.</para>
+            </listitem>
+            <listitem>
+                <para>Indexed rendering pulls data from the current vertex arrays by using a
+                    separate sequence of indices. The sequence of indices defines the sequence that
+                    OpenGL sees the vertices in. Indexed rendering can be performed by storing index
+                    data in a buffer object, and using <function>glDrawElements</function>.</para>
+            </listitem>
+            <listitem>
+                <para>Indices in indexed rendering calls can be offset by a value using the
+                        <function>glDrawElementsBaseVertex</function> function.</para>
+            </listitem>
+            <listitem>
+                <para>Hidden surface elimination can be performed by using a depth buffer and
+                    properly setting up the depth test.</para>
+            </listitem>
+            <listitem>
+                <para>Triangles that are outside of the camera zNear and zFar range are clipped
+                    against this range. This can open up holes in models if they are too close to
+                    the camera.</para>
+            </listitem>
+            <listitem>
+                <para>Clipping holes can be repaired, so long as there is no overlap, by activating
+                    depth clamping.</para>
+            </listitem>
+        </itemizedlist>
         <section>
             <title>Further Study</title>
             <para/>