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 fltk/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.
The strings passed as menu labels are not copied.
glutPostRedisplay() does not work if called from inside a display function. You must use glutIdleFunc() if you want your display to update continuously.
glutSwapBuffers() does not work from inside a display function. This is on purpose, because FLTK swaps the buffers for you.
glutUseLayer() does not work well, and should only be used to initialize transformations inside a resize callback. You should redraw overlays by using glutOverlayDisplayFunc().
Overlays are cleared before the overlay display function is called. glutLayerGet(GLUT_OVERLAY_DAMAGED) always returns true for compatibility with some GLUT overlay programs. You must rewrite your code so that gl_color() is used to choose colors in an overlay, or you will get random overlay colors.
glutSetCursor(GLUT_CURSOR_FULL_CROSSHAIR) just results in a small crosshair.
The fonts used by glutBitmapCharacter() and glutBitmapWidth() may be different.
glutInit(argc,argv) will consume different switches than GLUT does. It accepts the switches recognized by fltk::args(), and will accept any abbreviation of these switches (such as "-di" for "-display").
You can make your GLUT window a child of a fltk::Window with the following scheme. The biggest trick is that GLUT insists on show() 'ing the window at the point it is created, which means the fltk::Window parent window must already be shown.
fltk::GlWindow | +----fltk::Glut_Window
#include <fltk/glut.h>
The current GLUT window is available in the global variable glut_window.
new fltk::Glut_Window(...) is the same as glutCreateWindow() except it does not show() the window or make the window current.
window->make_current() is the same as glutSetWindow(number). If the window has not had show() called on it yet, some functions that assumme an OpenGL context will not work. If you do show() the window, call make_current() again to set the context.
~Glut_Window() is the same as glutDestroyWindow().
The first constructor takes 4 int arguments to create the window with a preset position and size. The second constructor with 2 arguments will create the window with a preset size, but the window manager will choose the position according to it's own whims.