X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=doc%2Ffreeglut_user_interface.html;h=23633411a2bdcf175ba8148cc1a3b820248ebbf0;hb=9ddfa4b5ee92933e7ff826ea6685cab44d7a04cd;hp=6a633823d3ca19310d9c127c9bb1c20cd3dd66ba;hpb=bec227f153f60b8a314bd7defddd5e549b72bfa0;p=freeglut diff --git a/doc/freeglut_user_interface.html b/doc/freeglut_user_interface.html index 6a63382..2363341 100644 --- a/doc/freeglut_user_interface.html +++ b/doc/freeglut_user_interface.html @@ -1063,6 +1063,67 @@ is not implemented in freeglut.

13.2  glutGet

+ +

+The following state variables may be queried with glutGet. +The returned value is an integer. +

+ +

+These queries are with respect to the current window: +

+ + + +

+These queries do not depend on the current window. +

+ + + +

13.3  glutDeviceGet

13.4  glutGetModifiers

@@ -1073,7 +1134,7 @@ is not implemented in freeglut.

13.7  glutGetProcAddress

glutGetProcAddress returns -a pointer to a named GL or FreeGLUT function.

+a pointer to a named GL or freeglut function.

Usage

void *glutGetProcAddress ( const char *procName ) ;

@@ -1087,7 +1148,7 @@ 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.

-

Both OpenGL functions and FreeGLUT +

Both OpenGL functions and freeglut functions can be queried with this function.

NOTE: this function is not supported in GLUT.

@@ -1803,19 +1864,67 @@ goes in the upper left-hand corner of the freeglut windows

21.0  Implementation Notes

-

22.0  - GLUT State

- -

23.0  - "freeglut.h" Header File

- -

24.0  - References

- -

25.0  - Index

-   -

 
+

22.0  +GLUT State

+ +

23.0  +"freeglut.h" Header File

+ + +

+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: +

+ +
+#include <GL/glut.h>
+#ifdef FREEGLUT
+#include <GL/freeglut_ext.h>
+#endif
+
+ +

+Compile-time freeglut version testing can be done as follows: +

+ +
+#ifdef FREEGLUT_VERSION_1_4
+  code specific to freeglut 1.4 or later here
+#endif
+
+ +

+In future releases, FREEGLUT_VERSION_1_5, FREEGLUT_VERSION_1_6, etc will +be defined. This scheme mimics OpenGL conventions. +

+ +

+The freeglut 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. +

+

+This may be used as follows: +

+ +
+if (glutGet(GLUT_VERSION) < 10300) {
+    printf("Sorry, you need freeglut version 1.3.0 or later to run this program.\n");
+    exit(1);
+}
+
+ + + +

24.0  +References

+ +

25.0  +Index

+  +