Commits

Jason McKesson committed c84f420

Added info on extensions.

  • Participants
  • Parent commits b7dc664

Comments (0)

Files changed (1)

 lua LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=core core_3_3
 }}}
 
-This tells the system to generate a header/source pair for OpenGL ({{{-spec=gl}}}, as opposed to WGL or GLX), for version 3.3, the core profile. It will generate it in the {{{pointer_c}}} style, which specifies the way it provides the {{{#defines}}} and function pointers. See below for details.
+This tells the system to generate a header/source pair for OpenGL ({{{-spec=gl}}}, as opposed to WGL or GLX), for version 3.3, the core profile. It will generate it in the {{{pointer_c}}} style (which means that it will use function pointer-style, with C linkage and source. Such code is usable from C and C++, and can be compiled as either.
 
 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. {{{pointer_c}}}, as the name suggests, generates function pointer-style loaders with C linkage and source code. Such code is usable from C and C++.
 
-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.
+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 (Well, that's the plan ;) ).
 
-Well, that's the plan ;)
+== Extensions ==
+
+Note that the above command line will //only// generate enumerators and functions for core OpenGL 3.3. It doesn't offer any extensions. To use extensions, you must ask for them with command line parameters, as follows:
+
+{{{
+lua LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=core core_3_3 -exts ARB_texture_view ARB_vertex_attrib_binding EXT_texture_filter_anisotropic -ext=EXT_texture_compression_s3tc -extfile=SomeFile.txt
+}}}
+
+The {{{-exts}}} option starts a list of space-separated extension names (note: don't try to put the output filename after {{{-exts}}}; the system can't tell the difference between a filename and an extension). The {{{-ext}}} option only specifies a single name.
+
+{{{-extfile}}} specifies a //filename// to load extensions from. The file is expected to contain extension names, one on each line. Extension files can also have {{{#include}}} directives, which will include another extension file (relative pathing only). Please don't infinitely recurse your inclusions; there's no protection in the system to check for it.