diff --git a/FL/glut.H b/FL/glut.H index e4c7cdce4..875dd0406 100644 --- a/FL/glut.H +++ b/FL/glut.H @@ -370,7 +370,7 @@ enum { # define GLUT_NUM_BUTTON_BOX_BUTTONS 607 # define GLUT_NUM_DIALS 608 # define GLUT_NUM_TABLET_BUTTONS 609 -inline int glutDeviceGet(GLenum type) { return type <= GLUT_HAS_MOUSE; } +FL_EXPORT int glutDeviceGet(GLenum type); // WARNING: these values are different than GLUT uses: # define GLUT_ACTIVE_SHIFT FL_SHIFT diff --git a/documentation/glut.html b/documentation/glut.html index 2acc4cf83..4358dac8a 100644 --- a/documentation/glut.html +++ b/documentation/glut.html @@ -4,30 +4,14 @@

D - GLUT Compatibility

- This appendix describes the GLUT compatibility header file supplied -with FLTK. +

This appendix describes the GLUT compatibility header file supplied with FLTK. FLTK's GLUT compatibility is based on the original GLUT 3.7 and the follow-on FreeGLUT 2.4.0 libraries.

Using the GLUT Compatibility Header File

- You should be able to compile existing GLUT source code by including -<FL/glut.H> instead of <GL/glut.h>. This can be done by -editing the source, by changing the -I switches to the -compiler, or by providing a symbolic link from GL/glut.h to -FL/glut.H. -

All files calling GLUT procedures must be compiled with C++. - You may have to alter them slightly to get them to compile without -warnings, and you may have to rename them to get make to use the C++ -compiler.

-

You must link with the FLTK library. If you call any GLUT drawing -functions that FLTK does not emulate (glutExtensionsSupported() -, glutWire*(), glutSolid*(), and glutStroke*() -), you will also have to link with the GLUT library (after the -FLTK library!)

-

Most of FL/glut.H is inline functions. You should take a -look at it (and maybe at test/glpuzzle.cxx in the FLTK source) if -you are having trouble porting your GLUT program.

-

This has been tested with most of the demo programs that come with -the GLUT 3.3 distribution.

+

You should be able to compile existing GLUT source code by including <FL/glut.H> instead of <GL/glut.h>. This can be done by editing the source, by changing the -I switches to the compiler, or by providing a symbolic link from GL/glut.h to FL/glut.H.

+

All files calling GLUT procedures must be compiled with C++. You may have to alter them slightly to get them to compile without warnings, and you may have to rename them to get make to use the C++ compiler.

+

You must link with the FLTK library. Most of FL/glut.H is inline functions. You should take a look at it (and maybe at test/glpuzzle.cxx in the FLTK source) if you are having trouble porting your GLUT program.

+

This has been tested with most of the demo programs that come with the GLUT and FreeGLUT distributions.

Known Problems

- The following functions and/or arguments to functions are missing, and +

The following functions and/or arguments to functions are missing, and you will have to replace them or comment them out for your code to compile: