Commits

Jason McKesson committed a183121

Added examples and moved the available styles page to the top.

Comments (0)

Files changed (2)

                     extension files</link> that store useful sets of extensions. You may use these
                 as you wish.</para>
         </section>
+        <section>
+            <title>Examples</title>
+            <para>Here are some example command lines. This command-line generates loaders for core
+                OpenGL 3.3, without proprietary extensions, but with non-hardware features that were
+                added to OpenGL in later versions:</para>
+            <programlisting>lua LoadGen.lua core_3_3 -style=pointer_c -spec=gl -version=3.3 -profile=core -stdext=extfiles/gl_ubiquitous.txt -stdext=extfiles/gl_core_post_3_3.txt</programlisting>
+            <para>This command-line is for OpenGL 4.3, but with certain commonly-provided extensions
+                that are generally useful.</para>
+            <programlisting>lua LoadGen.lua core_4_3 -style=pointer_c -spec=gl -version=4.3 -profile=core -stdext=extfiles/gl_ubiquitous.txt -stdext=extfiles/gl_plat_3_3.txt</programlisting>
+            <para>This command-line generates a header that exposes OpenGL 3.2 for what MacOSX 10.8
+                uses (note: the loader generator files have not been tested with MacOSX of any
+                kind):</para>
+            <programlisting>lua LoadGen.lua core_3_2 -style=pointer_c -spec=gl -version=3.2 -profile=core -stdext=extfiles/gl_ubiquitous.txt -stdext=extfiles/gl_macosx_3_2.txt</programlisting>
+        </section>
     </section>
 </article>
             <literal>#define</literal>s, for example). But each style must provide this set of
         information.</para>
     <section>
+        <title>Available styles</title>
+        <para>There are a number of styles available, with documentation explaining exactly what
+            they generate:</para>
+        <itemizedlist>
+            <listitem>
+                <para><link xlink:href="Style_Pointer_C"><literal>pointer_c</literal></link>: Used
+                    for C-style header generation.</para>
+            </listitem>
+            <listitem>
+                <para><link xlink:href="Style_Pointer_CPP"><literal>pointer_cpp</literal></link>:
+                    Used for creating C++-style loaders, wrapping as much as possible in
+                    namespaces.</para>
+            </listitem>
+        </itemizedlist>
+    </section>
+    <section>
         <title>Core Extensions</title>
         <para>OpenGL 3.0 introduced the concept of <quote>core extensions.</quote> Normally with
             extensions, even ARB extensions, the enumerators, functions and typedefs end in the
             defines are part of GL 3.1 as well as the extension.</para>
         <para>Because of this, it is possible to ask for GL 3.1 (which will provide those
             functions/enums) <emphasis>and</emphasis> ARB_uniform_buffer_object at the same time. Or
-            to ask for GL 3.0 (which won't provide them) and ARB_uniform_buffer_object. Or to ask
-            for GL 3.1 <emphasis>without</emphasis> explicitly asking for
-            ARB_uniform_buffer_object.</para>
-        <para>The way this works is as follows. If you ask for an extension, no matter what, the
-            system will provide you a way to query whether that extension is loaded. If you don't
-            ask for the extension, but the version number effectively requires that extension
-            (asking for GL 3.1+ requires ARB_uniform_buffer_object), you'll still get the enums and
-            functions, but you <emphasis>won't</emphasis> get a way to query whether that extension
-            specifically is loaded.</para>
+            to ask for GL 3.0 (where it isn't core) and ARB_uniform_buffer_object. Or to ask for GL
+            3.1 <emphasis>without</emphasis> explicitly asking for ARB_uniform_buffer_object.</para>
+        <para>The way this works is as follows. If you explicitly ask for an extension, the system
+            will <emphasis>always</emphasis> provide you a way to query whether that extension is
+            loaded. If you don't ask for the extension, but the version number effectively requires
+            that extension (asking for GL 3.1+ requires ARB_uniform_buffer_object), you'll still get
+            the enums and functions, but you <emphasis>won't</emphasis> get a way to query whether
+            that extension specifically is loaded.</para>
         <para>In short, if you want GL 4.2, but you want to verify whether particular parts are
-                <quote>available,</quote> (if you only get GL 4.1, but there are 4.2 features
-            exposed via extensions), you must explicitly request that extension.</para>
+                <quote>available,</quote> (ie: if you only get GL version 4.1, but there are 4.2
+            features exposed via extensions), you must explicitly request each extension.</para>
     </section>
     <section>
         <title>Compatibility profile</title>
             a few others. The number of these are rather few, so it should not be a problem.</para>
     </section>
     <section>
-        <title>Available styles</title>
-        <para>There are a number of styles available, with documentation explaining exactly what
-            they generate:</para>
-        <itemizedlist>
-            <listitem>
-                <para><link xlink:href="Style_Pointer_C"><literal>pointer_c</literal></link>: Used
-                    for C-style header generation.</para>
-            </listitem>
-            <listitem>
-                <para><link xlink:href="Style_Pointer_CPP"><literal>pointer_cpp</literal></link>:
-                    Used for creating C++-style loaders, wrapping as much as possible in
-                    namespaces.</para>
-            </listitem>
-        </itemizedlist>
-    </section>
-    <section>
         <title>User-created styles</title>
         <para>The style mechanism is designed to be extensible. You should be able to write new
             styles relatively painlessly. This system is <link xlink:href="Style_Creation">covered