Commits

Jason McKesson  committed bc0b78a

Tweaks to docs.

  • Participants
  • Parent commits 48cbb9b

Comments (0)

Files changed (2)

File 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>

File 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();