Jason McKesson avatar Jason McKesson committed c8f3207

1.0 candidate.
Readme now has a history.

Comments (0)

Files changed (5)

 The option "core_3_3" is the basic component of the filename that will be used for the generation. Since it is generating OpenGL loaders (again, as opposed to WGL or GLX), it will generate files named "gl_core_3_3.*", where * is the extension used by the particular style.
 
 The above command line will generate "gl_core_3_3.h" and "gl_core_3_3.c" files. Simply include them in your project; there is no library to build, no unresolved extenals to filter through. They just work.
+
+Changes
+-------
+
+Version 1.0:
+ * New Noload loader. Works like GLee.
+ * -stdext now works relative to the extfiles directory, not just LoadGen. So no need to do -stdext=extfiles/gl_name_of_standard_file.txt.
+ * A test suite.
+ * Lua Filesystem is now in use; if it's not available, then you must create the destination directory yourself.
+
+Version 0.3:
+ * Replaced the old generation system with a flexible structure system.
+ * Migrated the styles to the structure system.

docs/Command_Line_Options.xml

                     or versions, collisions will occur.</para>
                 <para>The prefix option allows you to define a string that will be prepended to any
                     non-static (or otherwise hidden) global variables, where possible. As such, the
-                    prefix should start with characters that are valid for C/C++ identifiers.</para>
+                    prefix should start with characters that are valid for C/C++ identifiers. The
+                    prefix will be used as the style decides, so a prefix could just as well be a
+                    namespace as an actual name prefix.</para>
                 <para>If the option is not specified, no prefix will be used.</para>
             </glossdef>
         </glossentry>
                             function pointers.</para>
                     </listitem>
                     <listitem>
-                        <para><link><literal xlink:href="Style_GL_Load">glload</literal></link>: Do
-                            not use.</para>
+                        <para><literal>glload</literal>: For internal use only.</para>
                     </listitem>
                 </itemizedlist>
             </glossdef>
             <glossterm>-stdext</glossterm>
             <glossdef>
                 <para>Works like <literal>extfile</literal>, except that the directory for the file
-                    is relative to the place where the <filename>LoadGen.lua</filename> file is.
-                    These are used primarily for working with <link
-                        xlink:href="Common_Extension_Files">the library of common extension
-                        files</link>.</para>
+                    is relative to the <filename>extfiles</filename> directory, just under the
+                    directory where the <filename>LoadGen.lua</filename> file is. These are used
+                    primarily for working with <link xlink:href="Common_Extension_Files">the library
+                        of common extension files</link>.</para>
             </glossdef>
         </glossentry>
     </glosslist>

docs/Common_Extension_Files.xml

     <para>To include these names from the command-line, you should use the
             <literal>-stdext</literal> option, instead of <literal>-extfile</literal>. The
         difference is where they search; <literal>extfile</literal> is always relative to the
-        directory you're currently in, while <literal>stdext</literal> is relative to LoadGen's
-        directory.</para>
+        directory you're currently in, while <literal>stdext</literal> will search the
+            <filename>extfiles/</filename> directory of where LoadGen is stored.</para>
     <para>To include these names from an extension file, you should use <literal>#include
             &lt;></literal> instead of <literal>#include ""</literal>, for the same reasons as
         above.</para>
-    <para>All of these extension files are located in the directory <filename>extfiles</filename>.
-        Therefore, any inclusion of them should be as this: <literal>-stdext=extfiles/&lt;include
-            filename></literal> or <literal>#include &lt;extfiles/&lt;include
-        filename>></literal>.</para>
+    <para>All of these extension files are located in the directory <filename>extfiles</filename> of
+        LoadGen's directory. However, you don't need to prefix the name with
+            <literal>extfiles/</literal> Therefore, any inclusion of them should be as this:
+            <literal>-stdext=extfiles/&lt;include filename></literal> or <literal>#include
+            &lt;extfiles/&lt;include filename>></literal>.</para>
     <para>Here is a list of the files and what they include:</para>
     <glosslist>
         <glossentry>
-            <glossterm>gl_ubiquitous</glossterm>
+            <glossterm>gl_ubiquitous.txt</glossterm>
             <glossdef>
-                <para>For the kinds of extensions that <emphasis>should</emphasis> be core OpenGL,
-                    but aren't for IP reasons. Namely, anisotropic filtering, and the extensions
-                    needed for S3TC.</para>
+                <para>For <link xlink:href="http://www.opengl.org/wiki/Ubiquitous_Extension">the
+                        kinds of extensions that should be core OpenGL, but aren't for IP
+                        reasons</link>. Namely, anisotropic filtering, and the extensions needed for
+                    S3TC.</para>
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>gl_core_post_3_3</glossterm>
+            <glossterm>gl_core_post_3_3.txt</glossterm>
             <glossdef>
                 <para>Core extensions that are widely available on OpenGL 3.3, but aren't part of GL
                     3.3 itself. These are for post-3.3 API improvements, like internalformat_query,
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>gl_plat_3_3</glossterm>
+            <glossterm>gl_plat_3_3.txt</glossterm>
             <glossdef>
-                <para>Vendor-specific extensions that are implemented by multiple vendors. Things
-                    like NV_texture_barrier.</para>
+                <para>Vendor-specific extensions that are implemented by multiple vendors for
+                    3.x-class hardware. Things like NV_texture_barrier.</para>
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>gl_AMD_3_3</glossterm>
+            <glossterm>gl_AMD_3_3.txt</glossterm>
             <glossdef>
                 <para>AMD's HD-2xxx, 3xxx, and 4xxx line of hardware all support GL 3.3. However,
                     they also support some features of 4.x-class hardware via non-core extensions.
-                    This file includes these extensions (transform_feedback2/3, draw_buffers_blend,
+                    This file includes those extensions (transform_feedback2/3, draw_buffers_blend,
                     etc).</para>
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>gl_macosx_3_2</glossterm>
+            <glossterm>gl_macosx_3_2.txt</glossterm>
             <glossdef>
                 <para>All of the extensions allowed by core 3.2 profiles in MacOSX, as of version
                     MacOSX 10.8.</para>
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>wgl_common</glossterm>
+            <glossterm>wgl_common.txt</glossterm>
             <glossdef>
                 <para>Commonly useful non-vendor-specific WGL extensions. The basic stuff: getting
                     extensions_string, create_context, swap_control, various pixel-format
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>wgl_AMD</glossterm>
+            <glossterm>wgl_AMD.txt</glossterm>
             <glossdef>
                 <para>Useful AMD vendor WGL extensions.</para>
             </glossdef>
         </glossentry>
         <glossentry>
-            <glossterm>wgl_NV</glossterm>
+            <glossterm>wgl_NV.txt</glossterm>
             <glossdef>
                 <para>Useful NVIDIA vendor WGL extensions.</para>
             </glossdef>
         </glossentry>
+        <glossentry>
+            <glossterm>glx_common.txt</glossterm>
+            <glossdef>
+                <para>Commonly useful non-vendor-specific GLX extensions. The basic stuff:
+                    fbconfig_float, framebuffer_sRGB, multisample, etc.</para>
+            </glossdef>
+        </glossentry>
     </glosslist>
 </article>
                 Windows</link>, or just <link xlink:href="http://luabinaries.sourceforge.net/">the
                 Lua binaries packages</link>. The code should be compatible with Lua 5.1 and 5.2,
             but it has only been tested on 5.1.</para>
+        <para>Note: this script is designed to be stand-alone. There is a caveat: Lua lacks any real
+            filesystem commands, so the script cannot create directories for the destination files.
+            However, if you have installed the <link
+                xlink:href="http://keplerproject.github.com/luafilesystem/">Lua FileSystem</link>
+            Lua module (such that Lua can detect it), then this script will access and use it to
+            create directories. It comes with Lua For Windows, but you can use <link
+                xlink:href="http://www.luarocks.org/">LuaRocks</link> to install it on any platform
+            as well.</para>
         <para>The scripts in this package are licensed under the terms of the MIT License.</para>
         <para>To use the code generator, with Lua in your path (assuming that <literal>lua</literal>
             is the name of your Lua executable), type this:</para>
             <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>
+            <programlisting>lua LoadGen.lua core_3_3 -style=pointer_c -spec=gl -version=3.3 -profile=core -stdext=gl_ubiquitous.txt -stdext=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>
+            <programlisting>lua LoadGen.lua core_4_3 -style=pointer_c -spec=gl -version=4.3 -profile=core -stdext=gl_ubiquitous.txt -stdext=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>
+            <programlisting>lua LoadGen.lua core_3_2 -style=pointer_c -spec=gl -version=3.2 -profile=core -stdext=gl_ubiquitous.txt -stdext=gl_macosx_3_2.txt</programlisting>
         </section>
     </section>
 </article>

modules/GetOptions.lua

 parseOpts:array_single(
 	"stdext",
 	"stdexts",
-	{"A file to load extensions from.", "These file paths are relative to the distribution directory."},
+	{"A file to load extensions from, within the ./extfiles directory.", "These are the standard extension files."},
 	nil,
 	true)
 parseOpts:value(
 		LoadExtFile(options.extensions, util.ParsePath(file)) --vararg
 	end
 	
-	--Standard extension files.
+	--Local extension files.
 	for _, file in ipairs(options.stdexts) do
-		LoadExtFile(options.extensions, util.ParsePath(SysRelPath(file))) --vararg
+		LoadExtFile(options.extensions, util.ParsePath(SysRelPath("extfiles/" .. file))) --vararg
 	end
 	
 	--Fixup names and remove duplicates.
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.