Some changes from John.

The main attraction seems to be correcting a bug with the action-on-
window-close.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@446 7f0cb862-5218-0410-a997-914c9d46530a
Minor style normalizations to minimize the diffs between *now* and from
before John's changes.  No functional changes:

 * Removed some hard TABs introduced.
 * Removed some spaces-at-end-of-line introduced.
 * A couple of function calls were touched up.

I did this separately only because I don't like messing with other people's
commits.  (I don't like feeling like the style police, either, but when
I mess with the commit, there's no room for reverting my interference if
it is deemed undesirable...)


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@447 7f0cb862-5218-0410-a997-914c9d46530a
Ammended a comment on fgCheckJoystickCallback().


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@448 7f0cb862-5218-0410-a997-914c9d46530a
Close a bug whereby events can be delayed arbitrarily long if they get
caught between the socket and the client-side queue on X, sometime
after glutMainLoopEvent()'s loop quits and before the sleep code is
invoked.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@449 7f0cb862-5218-0410-a997-914c9d46530a
Big import of updated joystick code from PLIB, with permission from
Steve Baker.  Most of the adaptation done by John, with a little bit
of testing and changes by Thierry Thomas and myself.  Seems to compile on:

  WIN32
  Red Hat LINUX
  FreeBSD
  NetBSD/amd64


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@450 7f0cb862-5218-0410-a997-914c9d46530a
Adds GLUT_OFFSCREEN as a display mode option.  This includes:

 * Recognizing the mode when you call glutCreateWindow().
   (Offscreen looks and acts like a top-level window in many
   ways.)

 * During the life of the offscreen "window", various window-management
   functions are modified to respect offscreen status.

   (Excepting reshaping windows, there is not much useful interpretation
    for managment of offscreen areas.  Reshaping is possibly more work
    than it's worth to support, and GLUT specs allow us to ignore the
    request.)

 * Cleanup for "offscreen" windows is a little different than for regular
   windows.

Windows still don't start up quite ideally.  Offscreen windows should
probably get a reshape event, but not a display.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@451 7f0cb862-5218-0410-a997-914c9d46530a
John added a #pragma to the joystick code for WIN32 users.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@452 7f0cb862-5218-0410-a997-914c9d46530a
"Heavy editing" by John to his CallbackMaker demo.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@453 7f0cb862-5218-0410-a997-914c9d46530a
Changed a couple of XXX comments. Added a new one.  These all the nest of
#ifs in the BSD section of the new joystick code.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@454 7f0cb862-5218-0410-a997-914c9d46530a
Added entries for the joystick updates and the offscreen experimental
support.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@455 7f0cb862-5218-0410-a997-914c9d46530a
Ooops.  We don't want people to be able to create a subwindow of an
offscreen window.  (^&  This is no longer permitted.

(Actually, it would be nice if it would work, but I don't think that you
can subwindow a pixmap in UNIX_X11, and assume that subwindowing offscreen
doesn't work on WIN32, either.)


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@456 7f0cb862-5218-0410-a997-914c9d46530a
Removed a ^M that snuck into the #pragma for the new joystick code.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@457 7f0cb862-5218-0410-a997-914c9d46530a
...AND a tab snuck into my changes for GLUT_OFFSCREEN support.  Mea culpa.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@458 7f0cb862-5218-0410-a997-914c9d46530a
Commit of John's tidying-up of a comment, closing out an XXX comment that
I wrote.  Thanks, John.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@459 7f0cb862-5218-0410-a997-914c9d46530a
A commit on behalf of John (in turn, and in part, also on behalf of
Thierry).

 * Renamed some of the old PLIB functions to have glut* prefixes.
   (I guess that there is some thought about exporting them to the
    API.)

 * Changes from Thierry for FreeBSD support, and/or results of testing?

 * I re-merged an XXX comment re. NetBSD/amd64 and propogated a
   comment on a duplicated #define for FreeBSD.  We need the GNU
   autoconfig stuff to be updated by someone who groks it, now.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@460 7f0cb862-5218-0410-a997-914c9d46530a
For some reason, the X "expose" event handler was *directly* calling
the display handler in the client.  (Okay, it was calling a function
that operates on the window handle.)

If you have any complexity to the display code, this can be painful
to watch.  I can't think of a good reason to do the display immediately,
so I fixed the code to do a glutPostRedisplay().


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@461 7f0cb862-5218-0410-a997-914c9d46530a
Normalized the style of the new joystick a bit.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@462 7f0cb862-5218-0410-a997-914c9d46530a
Refinements to comments


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@463 7f0cb862-5218-0410-a997-914c9d46530a
Minor comment adjustments.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@464 7f0cb862-5218-0410-a997-914c9d46530a
Added "offscreen" demo, a very simple program that produces an onscreen
window and, upon command, renders a similar offscreen display and writes
the result to disk.

Also, modified the build structure for UNIX_X11 to autobuild the demo.
(Not done for WIN32 at this time.)

Also, forgot to previously commit the updated freeglut_ext.h include.
Eeep.


git-svn-id: https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut@465 7f0cb862-5218-0410-a997-914c9d46530a