Source

gltut / Documents / Tutorials.xml

Jason McKesson 6aaec5f 







Jason McKesson 3c5e173 
Jason McKesson 6aaec5f 




Jason McKesson 3c5e173 
Jason McKesson 6aaec5f 
Jason McKesson 3c5e173 

Jason McKesson 6aaec5f 



























































Jason McKesson 6237642 





Jason McKesson 6aaec5f 












Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 







Jason McKesson 5851bf4 


Jason McKesson 6aaec5f 

Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 








Jason McKesson 5851bf4 
Sokka 97a3e4f 
Jason McKesson 85793e2 
Jason McKesson 6aaec5f 

Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 









Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 



Jason McKesson cba22e7 


Jason McKesson 6aaec5f 


Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 







Jason McKesson 35eeedc 
Jason McKesson 6aaec5f 






<?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"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">
    <info>
        <title>OpenGL Tutorials</title>
    </info>
    <preface>
        <?dbhtml filename="About these Tutorials.html" ?>
        <title>About these Tutorials</title>
        <para>These tutorials are designed for a beginning graphics programmer. To use these
            tutorials, you are expected to know the following</para>
        <itemizedlist>
            <listitem>
                <para>C/C++ programming. You should be able to read C and mild C++. If <quote>Hello,
                        world!</quote> is the extent of your C/C++ knowledge, then perhaps you
                    should write some more substantial code before proceeding with trying to render
                    images.</para>
                <para>These tutorials should be transferable to other languages as well. If you can
                    read C/C++, that is enough to understand what the code is doing. The text
                    descriptions that explain what the code does are also sufficient to get
                    information out of these tutorials.</para>
            </listitem>
            <listitem>
                <para>Basic geometry and algebra math. The tutorials will present the more advanced
                    math needed for graphics, but you should have at least a working knowledge of
                    geometry and algebra. Linear algebra is not required, though it would be
                    helpful.</para>
            </listitem>
        </itemizedlist>
        <note>
            <title>Browser Note</title>
            <para>This website and these tutorials make extensive use of SVG images. Basic SVG
                support is in all major browsers except any version of Internet Explorer. And while
                IE has the dominant marketshare, I'm afraid that these images will remain SVG
                images. If you are content with Internet Explorer, consider installing the Google
                Chrome Frame add-on for IE8. This will allow you to see the images correctly.</para>
        </note>
        <section>
            <title>Yet Another OpenGL Tutorial?</title>
            <para>There are many OpenGL tutorials on the internet. If you are here, then you are
                clearly interested in graphics programming with OpenGL. So why should you use this
                tutorial instead of another?</para>
            <para>Programmable graphics cards have been around, in one form or another, for almost
                10 years. Programmability as a core features has been around in OpenGL for almost 5
                years; various vendor-specific API extensions have been around even longer.</para>
            <para>And yet, despite the ubiquity of programmability in OpenGL users lives, using
                programmability is often considered advanced material. Other OpenGL tutorials
                instead focus on doing what they consider the easy things: using the OpenGL
                fixed-function pipeline.</para>
            <para>This indeed makes it very easy to actually accomplish something. If you want to
                have a camera with a perspective projection over a scene of objects in a
                well-defined world, these tutorials can show you how. They give you an effective
                list of rules and API commands to execute in a particular order to achieve a certain
                effect. But what they are terrible at is actually imparting
                    <emphasis>knowledge</emphasis> upon the reader.</para>
            <para>It is easy to show someone how to use <function>gluLookAt</function>,
                    <function>gluPerspective</function>, and other functions to make everything come
                out <quote>right.</quote> But because these functions hide important details, what
                the reader is often left with is a set of rules for where to put what code to make
                things work.</para>
            <para>Without the foundation of knowledge of what these functions actually are
                    <emphasis>doing</emphasis>, the reader is effectively living in a world of
                copy-and-paste code. The reader can parrot code they found in a tutorial, but they
                don't know why it works. And if they should copy it incorrectly or use it in the
                wrong circumstances, they do not have the foundation of knowledge to diagnose the
                problem and find a solution.</para>
            <para>Without a real foundation of knowledge, such persons will quickly find using
                programmable functions in OpenGL to be confusing and disorienting. Stripped of all
                of the convenience functionality, such persons are left to their own devices. This
                is doubly so, considering that while there are a lot of OpenGL tutorials, very few
                of them go into any real depth in terms of programmability.</para>
            <para>These tutorials are designed first and foremost to <emphasis>teach</emphasis> the
                reader valuable information about how graphics works. To this end, each and every
                tutorials will use the OpenGL Shading Language and all modern (as of OpenGL 3.2)
                features of the API. This makes it impossible to gloss over seemingly minor yet
                critical information about how various features of the language and graphics
                hardware actually work.</para>
            <note>
                <para>As a side-effect, these tutorials all require OpenGL 3.2-capable hardware and
                    drivers. This means any GeForce 8xxx or better, or any Radeon HD-class card.
                    These are also called <quote>Direct3D 10</quote> cards, but you do not need
                    Windows Vista or 7 to use their advanced features through OpenGL.</para>
            </note>
            <para>This does not mean that you need to have read other tutorials first. As previously
                stated, these tutorials are intended primarily for the beginning graphics
                programmer. These tutorials are in-depth, but they are also designed to break
                complex subjects down into easily understood sections.</para>
            <para>Because of this, these tutorials are not merely heavily commented source code.
                Indeed, the source code is usually secondary, used only as a way to show how to
                implement the concept that was previously discussed. In most cases, the entire
                source code for a tutorial will not be shown within that tutorial; only the relevant
                sections of code will be described.</para>
        </section>
    </preface>
    <xi:include href="Building the Tutorials.xml"/>
    <part>
        <?dbhtml filename="Basics.html" dir="Basics"?>
        <info>
            <title>The Basics</title>
        </info>
        <partintro>
            <para>These tutorials involve the most basic operations for OpenGL. They deal with the
                core of the OpenGL pipeline. These provide core information about how OpenGL works,
                how its pipeline works, what the basic flow of information is within OpenGL.</para>
        </partintro>
        <xi:include href="Basics/tutorial 00.xml"/>
        <xi:include href="Basics/tutorial 01.xml"/>
        <xi:include href="Basics/tutorial 02.xml"/>
    </part>
    <part>
        <?dbhtml filename="Positioning.html" dir="Positioning" ?>
        <info>
            <title>Positioning</title>
        </info>
        <partintro>
            <para>These tutorials give the reader information about how objects are positioned in 3D
                graphics and OpenGL. These deal with transforming the position of objects, as well
                as doing what is necessary to make those objects appear as though they are in a
                3-dimensional space.</para>
        </partintro>
        <xi:include href="Positioning/tutorial 03.xml"/>
        <xi:include href="Positioning/tutorial 04.xml"/>
        <xi:include href="Positioning/tutorial 05.xml"/>
    </part>
    <part>
        <?dbhtml filename="Illumination.html" dir="Illumination" ?>
        <info>
            <title>Illumination</title>
        </info>
        <partintro>
            <para>Lighting is a fundamental part of almost all rendering. These tutorials provide
                information on how lights can work, as well as details on a few different
                mathematical illumination models.</para>
        </partintro>
    </part>
    <part>
        <?dbhtml filename="Texturing.html" dir="Texturing" ?>
        <info>
            <title>Texturing</title>
        </info>
        <partintro>
            <para>Lookup tables in rendering are usually called textures. This is due to the fact
                that the main use for them is to modify the appearance of a surface. Even so,
                textures have many uses.</para>
        </partintro>
    </part>
    <part>
        <?dbhtml filename="Framebuffer.html" dir="Framebuffer" ?>
        <title>Framebuffer</title>
        <partintro>
            <para>Render targets and framebuffer blending are key components to many advanced
                effects. These tutorials will cover many per-framebuffer operations, from blending
                to render targets.</para>
        </partintro>
    </part>
    <part>
        <?dbhtml filename="Advanced Lighting.html" dir="Adv Lighting" ?>
        <title>Advanced Lighting</title>
        <partintro>
            <para>Simple diffuse lighting and directional shadows are useful, but better, more
                effective lighting models and patterns exist. These tutorials will explore those,
                from Phong lighting to reflections to HDR and blooming.</para>
        </partintro>
    </part>
</book>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.