freeglut
20 years agoPrevent exceeding array bounds in X11 key-repeat detection
Nigel Stewart [Wed, 17 Mar 2004 04:02:21 +0000 (04:02 +0000)]
Prevent exceeding array bounds in X11 key-repeat detection

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@489 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoreplaced all tabs with 4 spaces
Daniel Wagner [Tue, 16 Mar 2004 08:38:28 +0000 (08:38 +0000)]
replaced all tabs with 4 spaces
replaced all // with /* */ block
fixed freeglut_gx.cpp file with #if TARGET_HOST_WINCE

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@488 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoWhitespace conversion - tabs to 4 spaces
Nigel Stewart [Tue, 16 Mar 2004 00:17:11 +0000 (00:17 +0000)]
Whitespace conversion - tabs to 4 spaces

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@487 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRevert X11 fgCloseWindow to 1.38 pre-offscreen implementation.
Nigel Stewart [Tue, 16 Mar 2004 00:15:05 +0000 (00:15 +0000)]
Revert X11 fgCloseWindow to 1.38 pre-offscreen implementation.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@486 7f0cb862-5218-0410-a997-914c9d46530a

20 years agofixed mouse position and keyboard mapping.
Daniel Wagner [Mon, 15 Mar 2004 15:23:29 +0000 (15:23 +0000)]
fixed mouse position and keyboard mapping.
added c-wrapper cpp file for GAPI.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@485 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoadded support for WindowsCE (building on top of klimt)
Daniel Wagner [Mon, 15 Mar 2004 13:42:20 +0000 (13:42 +0000)]
added support for WindowsCE (building on top of klimt)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@484 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRepeat-key handling for Win32
Nigel Stewart [Mon, 15 Mar 2004 11:31:19 +0000 (11:31 +0000)]
Repeat-key handling for Win32
Utilise both FreeGLUT state and per-window filtering modes

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@483 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoForgot to update the ChangeLog for the benefit of those who do not have
Richard Rauch [Mon, 15 Mar 2004 06:19:33 +0000 (06:19 +0000)]
Forgot to update the ChangeLog for the benefit of those who do not have
CVS or Web access.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@482 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoCompleted removal of all support for the offscreen rendering.
Richard Rauch [Mon, 15 Mar 2004 06:16:47 +0000 (06:16 +0000)]
Completed removal of all support for the offscreen rendering.

If you wish to do offscreen supportin a portable manner, you will
no longer be able to do so with current versions of freeglut.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@481 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRemoved Makefile support for the offscreen demo.
Richard Rauch [Mon, 15 Mar 2004 06:10:27 +0000 (06:10 +0000)]
Removed Makefile support for the offscreen demo.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@480 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRemoved offscreen demo program.
Richard Rauch [Mon, 15 Mar 2004 06:08:08 +0000 (06:08 +0000)]
Removed offscreen demo program.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@479 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoProvide local include path to automake for GL/freeglut.h etc
Nigel Stewart [Mon, 15 Mar 2004 00:07:37 +0000 (00:07 +0000)]
Provide local include path to automake for GL/freeglut.h etc

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@478 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoCode formatting tweak
Nigel Stewart [Sun, 14 Mar 2004 04:37:17 +0000 (04:37 +0000)]
Code formatting tweak

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@477 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoResolution of X11 key-repeat handling
Nigel Stewart [Sun, 14 Mar 2004 04:36:02 +0000 (04:36 +0000)]
Resolution of X11 key-repeat handling

glutSetKeyRepeat is global to all FreeGLUT windows in the application
glutIgnoreKeyRepeat is a per-window over-ride

To avoid nasty global X11 state interaction, or GLUT-style
event queue filtering - the approach in FreeGLUT is to
use the current key state XQueryKeymap to detect and
ignore KeyRelease/KeyPress pairs that are auto-generated.

See also:
http://pyopengl.sourceforge.net/documentation/manual/glutSetKeyRepeat.3GLUT.xml
http://pyopengl.sourceforge.net/documentation/manual/glutIgnoreKeyRepeat.3GLUT.xml

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@476 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoStripped out tabs and end-of-line whitespace
Nigel Stewart [Sun, 14 Mar 2004 03:47:46 +0000 (03:47 +0000)]
Stripped out tabs and end-of-line whitespace
Differences are in whitespace only

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@475 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoResolve [ 853044 ] FreeGLUT menus on Win32 in task bar and ALT-TAB list
Nigel Stewart [Wed, 10 Mar 2004 05:11:04 +0000 (05:11 +0000)]
Resolve [ 853044 ] FreeGLUT menus on Win32 in task bar and ALT-TAB list
CreateWindowEx(WS_EX_TOOLWINDOW,...) extended style suppresses the popup menu window from the taskbar or ALT-TAB list

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@474 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoignoreKeyRepeat mode in FreeGLUT is TRUE by default
Nigel Stewart [Mon, 8 Mar 2004 06:06:57 +0000 (06:06 +0000)]
ignoreKeyRepeat mode in FreeGLUT is TRUE by default
For compatibility with GLUT, the mode should be FALSE by default
This issues was probably undetected until now because ignoreKeyRepeat didn't yet work.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@473 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoResolved bug #869765 glutIgnoreKeyRepeat() Fix (Win32)
Nigel Stewart [Mon, 8 Mar 2004 05:49:55 +0000 (05:49 +0000)]
Resolved bug #869765 glutIgnoreKeyRepeat() Fix (Win32)
glutIgnoreKeyRepeat now behaves correctly on Win32

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@472 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoC++ style comment converted to C style comment
Nigel Stewart [Mon, 8 Mar 2004 05:15:15 +0000 (05:15 +0000)]
C++ style comment converted to C style comment

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@471 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoInclude freeglut header via <GL/freeglut.h> rather than "../include/GL/freeglut.h"
Nigel Stewart [Mon, 8 Mar 2004 05:05:38 +0000 (05:05 +0000)]
Include freeglut header via <GL/freeglut.h> rather than "../include/GL/freeglut.h"
This allows some additional flexibility with file layout.
It should be the responsibility of the build environment, rather than at source level.
This change tested on MSVC 6, cygwin and mingw32 gcc and Linux gcc.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@470 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAccording to John F. Fay:
Nigel Stewart [Wed, 3 Mar 2004 03:35:42 +0000 (03:35 +0000)]
According to John F. Fay:
The variable "num_axes" should be "joy->num_axes".

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@469 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRemoved nonstandard #warning constructs. Converted to XXX comments.
Richard Rauch [Fri, 20 Feb 2004 23:31:41 +0000 (23:31 +0000)]
Removed nonstandard #warning constructs.  Converted to XXX comments.
(These are warnings about gamemode features not working the same on
some systems as on others.  The semantics of gamemode are dubious,
since it was never formally documented, and has for a long time
worked in different ways on different systems, so it is arguable that
there is nothing really wrong with systems that don't support
resolution-changes.)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@468 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoFixed the bug where glutDisplayFunc() was effectively invoking
Richard Rauch [Fri, 20 Feb 2004 05:05:35 +0000 (05:05 +0000)]
Fixed the bug where glutDisplayFunc() was effectively invoking
glutPostRedsiplay().  This is wrong on the face of it, and may be
at root for some of the annoying "timing" issues we've had with
redisplay events being called inappopriately.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@467 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoI had rubbed the offscreen/Makefile.am off from the shapes demo. I forgot
Richard Rauch [Thu, 19 Feb 2004 11:13:11 +0000 (11:13 +0000)]
I had rubbed the offscreen/Makefile.am off from the shapes demo.  I forgot
to remove a couple of references to the shapes.c and shapes.dsp (.dsw?)
files.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@466 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded "offscreen" demo, a very simple program that produces an onscreen
Richard Rauch [Thu, 19 Feb 2004 10:09:29 +0000 (10:09 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@465 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoMinor comment adjustments.
Richard Rauch [Wed, 18 Feb 2004 06:52:50 +0000 (06:52 +0000)]
Minor comment adjustments.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@464 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRefinements to comments
Nigel Stewart [Wed, 18 Feb 2004 02:51:04 +0000 (02:51 +0000)]
Refinements to comments

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@463 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoNormalized the style of the new joystick a bit.
Richard Rauch [Sat, 14 Feb 2004 08:51:54 +0000 (08:51 +0000)]
Normalized the style of the new joystick a bit.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@462 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoFor some reason, the X "expose" event handler was *directly* calling
Richard Rauch [Sat, 14 Feb 2004 03:29:57 +0000 (03:29 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@461 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoA commit on behalf of John (in turn, and in part, also on behalf of
Richard Rauch [Sat, 14 Feb 2004 03:23:43 +0000 (03:23 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@460 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoCommit of John's tidying-up of a comment, closing out an XXX comment that
Richard Rauch [Mon, 9 Feb 2004 14:54:14 +0000 (14:54 +0000)]
Commit of John's tidying-up of a comment, closing out an XXX comment that
I wrote.  Thanks, John.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@459 7f0cb862-5218-0410-a997-914c9d46530a

20 years ago...AND a tab snuck into my changes for GLUT_OFFSCREEN support. Mea culpa.
Richard Rauch [Sat, 7 Feb 2004 12:12:46 +0000 (12:12 +0000)]
...AND a tab snuck into my changes for GLUT_OFFSCREEN support.  Mea culpa.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@458 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRemoved a ^M that snuck into the #pragma for the new joystick code.
Richard Rauch [Sat, 7 Feb 2004 12:11:30 +0000 (12:11 +0000)]
Removed a ^M that snuck into the #pragma for the new joystick code.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@457 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoOoops. We don't want people to be able to create a subwindow of an
Richard Rauch [Sat, 7 Feb 2004 12:10:26 +0000 (12:10 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@456 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded entries for the joystick updates and the offscreen experimental
Richard Rauch [Sat, 7 Feb 2004 11:36:39 +0000 (11:36 +0000)]
Added entries for the joystick updates and the offscreen experimental
support.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@455 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoChanged a couple of XXX comments. Added a new one. These all the nest of
Richard Rauch [Sat, 7 Feb 2004 11:22:16 +0000 (11:22 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@454 7f0cb862-5218-0410-a997-914c9d46530a

20 years ago"Heavy editing" by John to his CallbackMaker demo.
Richard Rauch [Sat, 7 Feb 2004 10:57:17 +0000 (10:57 +0000)]
"Heavy editing" by John to his CallbackMaker demo.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@453 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoJohn added a #pragma to the joystick code for WIN32 users.
Richard Rauch [Sat, 7 Feb 2004 10:52:08 +0000 (10:52 +0000)]
John added a #pragma to the joystick code for WIN32 users.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@452 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdds GLUT_OFFSCREEN as a display mode option. This includes:
Richard Rauch [Sat, 7 Feb 2004 10:40:59 +0000 (10:40 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@451 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoBig import of updated joystick code from PLIB, with permission from
Richard Rauch [Thu, 5 Feb 2004 23:31:09 +0000 (23:31 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@450 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoClose a bug whereby events can be delayed arbitrarily long if they get
Richard Rauch [Sun, 1 Feb 2004 09:18:59 +0000 (09:18 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@449 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAmmended a comment on fgCheckJoystickCallback().
Richard Rauch [Fri, 16 Jan 2004 12:44:50 +0000 (12:44 +0000)]
Ammended a comment on fgCheckJoystickCallback().

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@448 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoMinor style normalizations to minimize the diffs between *now* and from
Richard Rauch [Fri, 16 Jan 2004 00:22:43 +0000 (00:22 +0000)]
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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@447 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoSome changes from John.
Richard Rauch [Fri, 16 Jan 2004 00:17:23 +0000 (00:17 +0000)]
Some changes from John.

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

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@446 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoWin32 glutIconifyWindow() patch contributed by John F. Fay
Nigel Stewart [Mon, 5 Jan 2004 15:49:14 +0000 (15:49 +0000)]
Win32 glutIconifyWindow() patch contributed by John F. Fay
Restrict resize callbacks to visible windows
When iconified via glutIconifyWindow(), don't pass (0,0) to resize callback
Note that minimising the window via the menu or minimise button is not yet resolved.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@443 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoSplit a few overlong lines.
Richard Rauch [Tue, 30 Dec 2003 11:50:58 +0000 (11:50 +0000)]
Split a few overlong lines.

Adjusted some spacing in a few spots to be more consistant with
freeglut style.  Including one unindented if() body.

Eliminated a dead variable.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@437 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoChanged several #ifdef's to proper #if's. Eeek. Oook.
Richard Rauch [Tue, 30 Dec 2003 11:43:24 +0000 (11:43 +0000)]
Changed several #ifdef's to proper #if's.  Eeek.  Oook.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@436 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoHm... I thought that I committed this last night. What's up?
Richard Rauch [Tue, 30 Dec 2003 10:57:01 +0000 (10:57 +0000)]
Hm...  I thought that I committed this last night.  What's up?

This is Nigel's modified fgSleepForEvents(), essentially.  Take 2.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@435 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoThree supported win32 compilation environments: MSVC, Cygwin and MingW32
Nigel Stewart [Tue, 30 Dec 2003 02:55:39 +0000 (02:55 +0000)]
Three supported win32 compilation environments: MSVC, Cygwin and MingW32
#pragma is specific to MS compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@433 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoExplicitly cast function pointer to (void *) in SET_WCB since all callbacks stored...
Nigel Stewart [Tue, 30 Dec 2003 02:51:32 +0000 (02:51 +0000)]
Explicitly cast function pointer to (void *) in SET_WCB since all callbacks stored as void pointers
suppress gcc -Wall -pendantic "noise"

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@432 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTypesafe handling of temporary window destroy callback
Nigel Stewart [Tue, 30 Dec 2003 02:49:56 +0000 (02:49 +0000)]
Typesafe handling of temporary window destroy callback
Move assignment out of while test, scope temporary inside loop
Be explicit about assignment/comparison in if test for gcc peace of mind
suppress gcc -Wall -pendantic "noise"

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@431 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoThree supported win32 compilation environments: MSVC, Cygwin and MingW32
Nigel Stewart [Tue, 30 Dec 2003 02:28:13 +0000 (02:28 +0000)]
Three supported win32 compilation environments: MSVC, Cygwin and MingW32
The windows mmsystem header need only be included internally to freeglut
strdup vs _strdup is specific to the MS compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@430 7f0cb862-5218-0410-a997-914c9d46530a

20 years agostrlen expects (char *), rather than (unsigned char *)
Nigel Stewart [Tue, 30 Dec 2003 02:24:05 +0000 (02:24 +0000)]
strlen expects (char *), rather than (unsigned char *)
suppress gcc -Wall -pendantic "noise"

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@429 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoReplace assignment of array to struct with field-by-field assignment
Nigel Stewart [Tue, 30 Dec 2003 02:22:11 +0000 (02:22 +0000)]
Replace assignment of array to struct with field-by-field assignment
suppress gcc -Wall -pendantic "noise"

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@428 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoglutBitmapString and glutBitmapLength expect (unsigned char *) rather than (char *)
Nigel Stewart [Tue, 30 Dec 2003 02:20:03 +0000 (02:20 +0000)]
glutBitmapString and glutBitmapLength expect (unsigned char *) rather than (char *)
suppress gcc in -Wall -pendantic "noise"

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@427 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoReplace #ifdef WIN32 with #ifdef TARGET_HOST_WIN32, as per FreeGLUT convention
Nigel Stewart [Tue, 30 Dec 2003 02:17:07 +0000 (02:17 +0000)]
Replace #ifdef WIN32 with #ifdef TARGET_HOST_WIN32, as per FreeGLUT convention

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@426 7f0cb862-5218-0410-a997-914c9d46530a

20 years agofgState.FPSInterval is unsigned int (GLuint), environment variable GLUT_FPS can be...
Nigel Stewart [Tue, 30 Dec 2003 02:14:54 +0000 (02:14 +0000)]
fgState.FPSInterval is unsigned int (GLuint), environment variable GLUT_FPS can be negative

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@425 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoOpenGL context is not made current on Win32 until fgSetWindow is called.
Nigel Stewart [Tue, 30 Dec 2003 02:01:53 +0000 (02:01 +0000)]
OpenGL context is not made current on Win32 until fgSetWindow is called.
This resolves severe problems observed in GLUI applications.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@424 7f0cb862-5218-0410-a997-914c9d46530a

20 years ago#pragma message is only understood my MS compiler
Nigel Stewart [Tue, 30 Dec 2003 01:58:19 +0000 (01:58 +0000)]
#pragma message is only understood my MS compiler
#if defined(_MSC_VER) .. #endif

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@423 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoResolve bug 864978 - GLUT_OWNS_JOYSTICK unhandled
Nigel Stewart [Tue, 30 Dec 2003 01:54:44 +0000 (01:54 +0000)]
Resolve bug 864978 - GLUT_OWNS_JOYSTICK unhandled

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@422 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTidy nested if/else to suppress gcc -Wall -pedantic noise
Nigel Stewart [Tue, 30 Dec 2003 01:52:07 +0000 (01:52 +0000)]
Tidy nested if/else to suppress gcc -Wall -pedantic noise
gcc suggests explicit braces to avoid ambiguous `else'

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@421 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoConfiguring with "--enable-warnings" broke three demos:
Richard Rauch [Thu, 25 Dec 2003 14:39:38 +0000 (14:39 +0000)]
Configuring with "--enable-warnings" broke three demos:
 * CallbackMaker defined, but did not use, the Joystick() function
   (a callback for the freeglut joystick interface).  I uncommented
   the callback-registration.  I assume that it was commented out
   because it was spammy.  (freeglut does joysticks by polling with a
   timer.)  Perhaps a longer interval than 10ms would be advisable?

 * fractals.c used strcpy() without getting the prototype.  Added
   #include <string.h> at the top.

 * fractals_random.c had the same problem as fractals.c.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@415 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoMoved the window-resize code so that it happens whenever there is a
Richard Rauch [Tue, 23 Dec 2003 08:39:44 +0000 (08:39 +0000)]
Moved the window-resize code so that it happens whenever there is a
pending resize for the window, whether or not the window is visible or
in need of a redisplay.  The resize is now done before the visibility
and need-to-redisplay checks.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@414 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoGot rid of those int/ptr warnings on AMD64. (The code was
Richard Rauch [Mon, 22 Dec 2003 22:13:20 +0000 (22:13 +0000)]
Got rid of those int/ptr warnings on AMD64.  (The code was
casting an {int} to a pointer, and later retrieving the int
by another cast.  It should be safe provided that pointers
are at least as big as {int}, but GCC was giving warnings on
my system, so...fixed.)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@413 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoSeveral test-on-assignment cases have been converted to stop GCC from
Richard Rauch [Mon, 22 Dec 2003 21:39:18 +0000 (21:39 +0000)]
Several test-on-assignment cases have been converted to stop GCC from
complaining about  if( a = get_a_value_for_a( ) ) type code.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@412 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoOoops, left some cruft in a comment in the header when committing the
Richard Rauch [Fri, 19 Dec 2003 01:00:07 +0000 (01:00 +0000)]
Ooops, left some cruft in a comment in the header when committing the
last patch.  Cleaned up.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@411 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoWrote SET_WCB() to set a window callback. This lets us out of using
Richard Rauch [Fri, 19 Dec 2003 00:54:27 +0000 (00:54 +0000)]
Wrote SET_WCB() to set a window callback.  This lets us out of using
the FETCH_WCB() as an lvalue (which it shouldn't, since the value of
the FETCH is cast to the correct function-pointer type).

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@410 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoChange the destination directory of the debug version to "Debug" (John Fay)
J.C. Jones [Mon, 15 Dec 2003 17:18:37 +0000 (17:18 +0000)]
Change the destination directory of the debug version to "Debug" (John Fay)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@409 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoRelease 2.2.0
J.C. Jones [Sat, 13 Dec 2003 01:43:57 +0000 (01:43 +0000)]
Release 2.2.0

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@398 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoStripped out TABs that got reintroduced.
Richard Rauch [Thu, 11 Dec 2003 22:13:03 +0000 (22:13 +0000)]
Stripped out TABs that got reintroduced.

There were no changes other than replacing about 10 to 12 TABs with a
visually-suitable number of spaces, so this can probably be blindly treated
as equivalent to the previous versions of the two affected files.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@397 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoThe deferred window destruction code was destroying the windows in reverse
Christopher John Purnell [Thu, 11 Dec 2003 21:29:43 +0000 (21:29 +0000)]
The deferred window destruction code was destroying the windows in reverse
order.  This cased a crash when the call to glutDestroyWindow() for a sub
windows was immediately followed by a call to glutDestroyWindow() for it's
parent. fgCloseWindows() would call fgDestroyWindow() for the parent first
fgDestroyWindws() would recurse over the children and then fgCloseWindows()
would call fgDestroyWindow() again for the child.

I've replaced the single linked list with one of our two way link list
structures.  I've also moved it into fgStructure because that seemed the
consistent thing to do.

I said the the deferred windows destruction causes more problems then it
solves.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@396 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoInclude project file in the distribution.
J.C. Jones [Thu, 11 Dec 2003 20:53:14 +0000 (20:53 +0000)]
Include project file in the distribution.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@395 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoUpdates for 2.2.0 RC2
J.C. Jones [Thu, 11 Dec 2003 19:56:59 +0000 (19:56 +0000)]
Updates for 2.2.0 RC2

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@394 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdd shapes to the Visual C workspace.
J.C. Jones [Thu, 11 Dec 2003 19:51:11 +0000 (19:51 +0000)]
Add shapes to the Visual C workspace.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@392 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoPackage the visual C project file with the distribution
J.C. Jones [Thu, 11 Dec 2003 19:02:07 +0000 (19:02 +0000)]
Package the visual C project file with the distribution

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@391 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoSet the version to 2.2.0
J.C. Jones [Thu, 11 Dec 2003 18:57:32 +0000 (18:57 +0000)]
Set the version to 2.2.0

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@390 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoNigel Stewart's Win32 window-sizing fix for game mode
J.C. Jones [Thu, 11 Dec 2003 18:53:06 +0000 (18:53 +0000)]
Nigel Stewart's Win32 window-sizing fix for game mode

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@389 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoDisable/enable lighting in the "one.c" demo (John Fay)
J.C. Jones [Thu, 11 Dec 2003 18:49:38 +0000 (18:49 +0000)]
Disable/enable lighting in the "one.c" demo (John Fay)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@388 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdd some essentials to get this program to compile (Nigel)
J.C. Jones [Thu, 11 Dec 2003 17:05:44 +0000 (17:05 +0000)]
Add some essentials to get this program to compile (Nigel)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@387 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoUpdate to reflect 2.2.0 release
J.C. Jones [Thu, 11 Dec 2003 17:03:09 +0000 (17:03 +0000)]
Update to reflect 2.2.0 release

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@386 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoNote the release of 2.2.0 RC1
J.C. Jones [Thu, 11 Dec 2003 01:48:08 +0000 (01:48 +0000)]
Note the release of 2.2.0 RC1

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@385 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoJohn correctly observed that the initialization {OldHeight} and
Richard Rauch [Thu, 11 Dec 2003 00:08:49 +0000 (00:08 +0000)]
John correctly observed that the initialization {OldHeight} and
{OldWidth} in the window structure should be done for both windows
and sub-windows, and the easiest way to do this is in the
freeglut_structure.c:fgCreateWindow() code.  So, transplant one line.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@383 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoCommit of John's change to stop an infinite-loop condition when the
Richard Rauch [Wed, 10 Dec 2003 23:59:45 +0000 (23:59 +0000)]
Commit of John's change to stop an infinite-loop condition when the
only windows left are freeglut menu windows, and correctly calls exit()
if we drop out of the main loop without having requested any freeglut
extensions to glutMainLoop() handling.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@382 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTwo from Nigel:
Richard Rauch [Sun, 7 Dec 2003 10:12:22 +0000 (10:12 +0000)]
Two from Nigel:

 * Updated shapes.c.  I think that it's just reformatting and the addition
   of some comments.

 * Added shapes.dsp, a Microsoft Visual C++ Developer Studio Project file
   for building shapes on WIN32 with MSVC++.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@381 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded an option to enable gcc compiler warnings.
Christopher John Purnell [Wed, 3 Dec 2003 19:03:13 +0000 (19:03 +0000)]
Added an option to enable gcc compiler warnings.
I've explicitly excluded the one about adding parentheses.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@380 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTouched up several comments, pointing up things that may be worth reflect-
Richard Rauch [Wed, 3 Dec 2003 09:57:01 +0000 (09:57 +0000)]
Touched up several comments, pointing up things that may be worth reflect-
ing upon in the future.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@379 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoHrm. I misunderstood the purpose of {window->State.Width} and
Richard Rauch [Wed, 3 Dec 2003 02:07:36 +0000 (02:07 +0000)]
Hrm.  I misunderstood the purpose of {window->State.Width} and
{...Height}.  Those are *not* records of the old values, but rather
of the *desired* *new* values, hence it was inappropriate to use them
in ConfigureNotify X11 event handling.  Doing so introduced some new
problems.

So, I created OldHeight and OldWidth in the window State structure,
and *those* do what I require.

I also stripped out the obsolete comment about getting extra/bogus
reshape events.  (Though I maintain that an application should be
robust against them, freeglut should no longer generate them if the
window has not changed size since last reported.)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@378 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoChanged Create/ConfigureNotify handling in UNIX_X11:
Richard Rauch [Tue, 2 Dec 2003 21:30:02 +0000 (21:30 +0000)]
Changed Create/ConfigureNotify handling in UNIX_X11:

 * Just need to call GETWINDOW() once.  Ooops.  Heh.
 * Update {window->State} with the new size of the window.
 * If the window-size has NOT changed, then do NOT call the Reshape event.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@377 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded an "XXX" earmark for post-release contemplation. (The point is
Richard Rauch [Tue, 2 Dec 2003 21:14:32 +0000 (21:14 +0000)]
Added an "XXX" earmark for post-release contemplation.  (The point is
definitely in need of consideration, I believe, but is not immediately
a major bug, so I'd rather not mess with it at the risk of postponing
a release "soon".)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@376 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoEnsure that the time-out for sleeping is never negative.
Richard Rauch [Tue, 2 Dec 2003 21:04:33 +0000 (21:04 +0000)]
Ensure that the time-out for sleeping is never negative.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@375 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoFixed a bug for UNIX_X11 where window reshape events were causing freeglut
Richard Rauch [Tue, 2 Dec 2003 15:03:48 +0000 (15:03 +0000)]
Fixed a bug for UNIX_X11 where window reshape events were causing freeglut
to mark the window as *needing* a reshape (which during general display
callback handling would result in effectively a glutReshapeWindow()).

The code is now system-dependant.  It should be abstracted to a function,
but is presently copied in two places.  Sorry.

Also, inverted the order of the associated if()/else check (in both
WIN32 and UNIX_X11 branches) since the former "else" part was a one-line
callback invocation.

This fixes two seemingly unrelated bugs that I was seeing in UNIX_X11.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@374 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded missing prototype for new list function.
Christopher John Purnell [Mon, 1 Dec 2003 17:59:42 +0000 (17:59 +0000)]
Added missing prototype for new list function.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@373 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTimer optimizations.
Christopher John Purnell [Fri, 28 Nov 2003 19:19:59 +0000 (19:19 +0000)]
Timer optimizations.
Made the list of pendinig timers ordered.
Added a free list of used timer structures.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@372 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoTimer optimizations.
Christopher John Purnell [Fri, 28 Nov 2003 19:08:25 +0000 (19:08 +0000)]
Timer optimizations.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@371 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoFixed windows compilation problem with last update.
Christopher John Purnell [Fri, 28 Nov 2003 12:04:24 +0000 (12:04 +0000)]
Fixed windows compilation problem with last update.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@370 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoWindow close fix.
Christopher John Purnell [Thu, 27 Nov 2003 19:49:53 +0000 (19:49 +0000)]
Window close fix.
The default behaiour should now be the same as with glut.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@369 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded change from Nigel to have resize events cause redraw events in WIN32.
Richard Rauch [Wed, 26 Nov 2003 01:21:29 +0000 (01:21 +0000)]
Added change from Nigel to have resize events cause redraw events in WIN32.
Also slightly reshuffled comments to deal with line-wrap issues.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@368 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoJohn reported, and fixed, a problem that recent changes caused for
Richard Rauch [Tue, 25 Nov 2003 17:25:43 +0000 (17:25 +0000)]
John reported, and fixed, a problem that recent changes caused for
the Lorenz demo (seems to be WIN32 specific).

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@367 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoUpdate from John: Removed the freeglut hack of decrementing the
Richard Rauch [Tue, 25 Nov 2003 14:17:05 +0000 (14:17 +0000)]
Update from John: Removed the freeglut hack of decrementing the
highst-window-ID marker when the highest window is deleted.  (This
was a half-way measure for an idea that was decided to be dubious
in the first place.)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@366 7f0cb862-5218-0410-a997-914c9d46530a

20 years agoAdded a new demo (from Nigel) showing some of the basic GLUT geometry
Richard Rauch [Tue, 25 Nov 2003 14:10:35 +0000 (14:10 +0000)]
Added a new demo (from Nigel) showing some of the basic GLUT geometry
shapes.  "shapes" is the name of the demo.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@365 7f0cb862-5218-0410-a997-914c9d46530a