fix crash when calling primitive drawing functions without creating a window (bug...
[freeglut] / doc / freeglut_user_interface.html
index df666b6..20d1e42 100644 (file)
@@ -19,7 +19,7 @@
 <h1> OpenGL Utility Toolkit</h1>
  </center>
 <center>  
-<h1> (freeglut)</h1>
+<h1> (<i>freeglut</i> 2.0.0)</h1>
  </center>
 <center>  
 <h1> Application Programming Interface</h1>
  </center>
     
 <center>  
-<h2> The freeglut Programming Consortium</h2>
+<h2> The <i>freeglut</i> Programming Consortium</h2>
  </center>
     
 <center>  
-<h2> November, 2002</h2>
+<h2> July, 2003</h2>
  </center>
     
 <p><br>
@@ -323,7 +323,7 @@ There was no way for an application to loop in GLUT for a while, possibly
 as a subloop while a specific window was open, and then return to the calling
 function.&nbsp; A new function, "<tt>glutMainLoopEvent</tt>", has been added
 to allow this functionality.&nbsp; Another function, "<tt>glutLeaveMainLoop</tt>
-", has also been added to allow the application to tell freeglut to clean
+", has also been added to allow the application to tell <i>freeglut</i> to clean
 up and close down.                                    
                                   <h3> 3.4.2&nbsp; Action on Window Closure</h3>
   Another difficulty with GLUT, especially with multiple-window programs,
@@ -339,11 +339,10 @@ GLUT should simply exit (the default).
 to Silicon Graphics hardware have not been implemented.&nbsp; Most or all 
 of the new callbacks are listed in the GLUT Version 4 "glut.h" header file 
 but did not make it into the documentation.&nbsp; The new callbacks consist 
-of regular and special key release callbacks, a joystick callback, a menu 
-state callback (with one argument, distinct from the menu status callback 
-which has three arguments), and a window status callback <br>
- (also with one argument).&nbsp; Unsupported callbacks are the three Spaceball 
-callbacks, the ButtonBox callback, the Dials callback, and the two Tablet 
+of regular and special key release callbacks, a joystick callback, a window 
+status callback, window closure callbacks, a menu closure callback, and a
+mouse wheel callback.&nbsp; Unsupported callbacks are the three Spaceball 
+callbacks, the ButtonBox callback, and the two Tablet 
 callbacks.&nbsp; If the user has a need for an unsupported callback he should 
 contact the <i>freeglut</i> development team.<br>
                                    
@@ -356,8 +355,8 @@ pixels for bitmapped fonts and in OpenGL units for the stroke fonts.<br>
                                    
                                   <h3>3.4.5&nbsp; Geometry Rendering<br>
                                    </h3>
- Two functions have been added to render a wireframe and a solid rhombic
-dodecahedron.                                    
+ Functions have been added to render a wireframe and a solid rhombic
+dodecahedron, a cylinder, and a Sierpinski sponge.                                    
                                   <h3> 3.4.5&nbsp; Extension Function Queries</h3>
  glutGetProcAddress is a wrapper for the glXGetProcAddressARB and wglGetProcAddress
 functions. 
@@ -1065,7 +1064,7 @@ is not implemented in <i>freeglut</i>. </p>
                                       
 
 <p>
-The following state variables may be queried with glutGet.
+The following state variables may be queried with "<tt>glutGet</tt>".
 The returned value is an integer.
 </p>
 
@@ -1120,7 +1119,7 @@ These queries do not depend on the current window.
 <li>GLUT_INIT_STATE - ?
 <li>GLUT_VERSION - Return value will be X*10000+Y*100+Z where X is the
     major version, Y is the minor version and Z is the patch level.
-    This query is only supported in FreeGLUT (version 1.3 or later).
+    This query is only supported in <i>freeglut</i> (version 2.0.0 or later).
 </ul>
 
 
@@ -1134,7 +1133,7 @@ These queries do not depend on the current window.
                                       
                                   <h2> 13.7&nbsp; glutGetProcAddress</h2>
                                   <p><tt>glutGetProcAddress</tt> returns
-a pointer to a named GL or FreeGLUT function. </p>
+a pointer to a named GL or <i>freeglut</i> function. </p>
                                   <p><b>Usage</b></p>
                                   <p><tt>void *glutGetProcAddress ( const
 char *procName ) ;</tt></p>
@@ -1148,10 +1147,13 @@ functions directly, that application will only link/run with an OpenGL library
 that supports the extension. By using a function pointer returned from glutGetProcAddress(),
 the application will avoid this hard dependency and be more portable and interoperate
 better with various implementations of OpenGL. </p>
-                                  <p> Both OpenGL functions and FreeGLUT
+                                  <p> Both OpenGL functions and <i>freeglut</i>
 functions can be queried with this function. </p>
-                                  <p><b>NOTE</b>: this function is not supported
-in GLUT. </p>
+                                  <p><b>Changes From GLUT</b> </p>
+                                   
+                                  <p>GLUT does not include this function.
+                                   </p>
+                                   
                                   <h1> 14.0&nbsp;<a name="FontRendering"></a>
   Font Rendering Functions</h1>
   <i>Freeglut</i> supports two types of font rendering:&nbsp; bitmap fonts,
@@ -1872,35 +1874,37 @@ GLUT State</h1>
                                       
 
 <p>
-FreeGLUT users should normally just include GL/glut.h in their programs.
-Programs which need FreeGLUT-specific functions should also include
-GL/freeglut_ext.h as follows:
+Application programmers who are porting their GLUT programs to <i>freeglut</i> may continue
+to include <tt>&lt;GL/glut.h&gt;</tt> in their programs.
+Programs which use the <i>freeglut</i>-specific extensions to GLUT should include
+<tt>&lt;GL/freeglut.h&gt;</tt>.  One possible arrangement is as follows:
 </p>
 
 <pre>
-#include &lt;GL/glut.h&gt;
 #ifdef FREEGLUT
 #include &lt;GL/freeglut_ext.h&gt;
+#else
+#include &lt;GL/glut.h&gt;
 #endif
 </pre>
 
 <p>
-Compile-time FreeGLUT version testing can be done as follows:
+Compile-time <i>freeglut</i> version testing can be done as follows:
 </p>
 
 <pre>
-#ifdef FREEGLUT_VERSION_1_4
-  code specific to FreeGLUT 1.4 or later here
+#ifdef FREEGLUT_VERSION_2_0
+  code specific to freeglut 2.0 or later here
 #endif
 </pre>
 
 <p>
-In future releases, FREEGLUT_VERSION_1_5, FREEGLUT_VERSION_1_6, etc will
+In future releases, FREEGLUT_VERSION_2_1, FREEGLUT_VERSION_2_2, etc will
 be defined.  This scheme mimics OpenGL conventions.
 </p>
 
 <p>
-The FreeGLUT version can be queried at runtime by calling
+The <i>freeglut</i> version can be queried at runtime by calling
 glutGet(GLUT_VERSION).
 The result will be X*10000+Y*100+Z where X is the major version, Y is the
 minor version and Z is the patch level.
@@ -1910,8 +1914,8 @@ This may be used as follows:
 </p>
 
 <pre>
-if (glutGet(GLUT_VERSION) < 10300) {
-    printf("Sorry, you need FreeGLUT version 1.3.0 or later to run this program.\n");
+if (glutGet(GLUT_VERSION) < 20001) {
+    printf("Sorry, you need freeglut version 2.0.1 or later to run this program.\n");
     exit(1);
 }
 </pre>