Jason McKesson avatar Jason McKesson committed bc0b78a

Tweaks to docs.

Comments (0)

Files changed (2)

docs/New_Style_Step_By_Step.xml

                         extensions in GL 3.0.</para>
                 </listitem>
             </orderedlist>
-            <para>That last problem is the most devious (we will solve #1 by just loading the
+            <para>That last problem is the most devious (we will solve #1 by just trying to load the
                 function. If it's not there, we exit with a failure). Let's investigate
                 further.</para>
             <para>In OpenGL 2.1 and below, you use <literal>glGetString(GL_EXTENSIONS)</literal> to
             <para>Therefore, if the user asks for OpenGL 3.0 or above, we will use the new-style
                 functions; if the user asks for a lower version, we use the old style. Oh, and while
                 we're doing this, remember that this code generator needs to work with WGL and GLX,
-                which only use old-style. So we only use the new-style if we're writing OpenGL
-                    <emphasis>and</emphasis> version 3.0 or above is requested.</para>
+                which <emphasis>only</emphasis> use old-style. So we only use the new-style if we're
+                writing OpenGL <emphasis>and</emphasis> version 3.0 or above is requested.</para>
             <para>Is that complicated enough?</para>
             <section>
                 <title>Extension Mapping Table</title>

docs/Style_Pointer_C.xml

     <para>For non-fail states, the value works like for the individual extension variables, except
         that the number that failed to load refer to core functions. So for specs that don't load
         core functions, it will always return <literal>LOAD_SUCCEEDED</literal>.</para>
-    <para>Also, this style will generate functions to query the version of the OpenGL
-        context.</para>
+    <para>Also, this style will generate functions to query the version of the OpenGL context. They
+        are:</para>
+    <itemizedlist>
+        <listitem>
+            <para><literal>&lt;prefix>ogl_GetMajorVersion()</literal>: Returns an integer
+                identifying the major version number of this OpenGL context.</para>
+        </listitem>
+        <listitem>
+            <para><literal>&lt;prefix>ogl_GetMinorVersion()</literal>: Returns an integer
+                identifying the minor version number of this OpenGL context.</para>
+        </listitem>
+        <listitem>
+            <para><literal>&lt;prefix>ogl_ogl_IsVersionGEQ(int majorVersion, int
+                    minorVersion)</literal>: Returns non-zero if the current context version is
+                larger than or equal to the given major and minor versions.</para>
+        </listitem>
+    </itemizedlist>
     <section>
         <title>Example</title>
-        <para>This example is for loading the OpenGL functions; it expects the OpenGL header to be
-            included. For loading WGL/GLX functions, include their headers and change the
-                <quote>ogl</quote>s to <quote>wgl</quote> or <quote>glx</quote> as
-            appropriate.</para>
+        <para>This example is for loading the OpenGL functions; it expects the OpenGL header
+            generated by glLoadGen to be included. For loading WGL/GLX functions, include their
+            headers and change the <quote>ogl</quote>s to <quote>wgl</quote> or <quote>glx</quote>
+            as appropriate.</para>
         <programlisting>//Create OpenGL context and make it current.
 
 int loaded = ogl_LoadFunctions();
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.