freeglut
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

20 years agoCommit of work from Nigel:
Richard Rauch [Tue, 25 Nov 2003 13:53:19 +0000 (13:53 +0000)]
Commit of work from Nigel:

Massive rework of the geometric primitive code.  Includes a new
primitive (cylinder; solid and wireframe) and corresponding update
to freeglut_ext.h for the prototype.

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

20 years agoMore work from John (sorry for procrastinating):
Richard Rauch [Tue, 25 Nov 2003 04:57:10 +0000 (04:57 +0000)]
More work from John (sorry for procrastinating):

 * We forgot to bump our version number in freeglut_internal.h
   It is now at 2.0.2 (actually, I think that 2.1.0 might be
   a better choice), which is presumably going to be our next
   formal release.  2.0.1 is incorrectly identified as 2.0.0 in
   the header.

 * A typo in a comment has been corrected ("than"/"that").

 * Numerous "manual" checks for callbacks are omitted now, since
   INVOKE_WCB() does this for us.  These were holdovers from the
   pre-INVOKE_WCB() days.  There may be some very subtle changes
   in freeglut behavior, since freeglut used to test the callbacks
   a little earlier in some cases and may have skipped some minor
   things (like changes to the current window) in some special cases,
   otherwise.  It is not believed that any documented behavior is
   broken, and it is unlikely---not to say impossible---that any
   extant applications will detect the change.  It is even possible
   that there is no external behavioral change in freeglut.

   This also significantly simplifies some sections of code that used
   to have conditional execution.  "Unconditional code is simpler code"
   as one of the comments used to say.

 * Lots of XXX commentary is now removed.  Some of it was obsoleted
   by other changes, some by changes from John.

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

20 years agoChange from John (I removed a couple of spaces from a couple of lines in
Richard Rauch [Tue, 25 Nov 2003 04:21:48 +0000 (04:21 +0000)]
Change from John (I removed a couple of spaces from a couple of lines in
his freeglut_internal.h file where they were wrapping in EMACS; otherwise,
the files are exactly as he sent them to me).

The change unifies the WIN32 and UNIX_X11 code by defining our own
window-handle-type in freeglut_internal.h.  This let John rip out some
#if garbage in several places.  The result is clearer code.

Thanks, John!

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

20 years agoNumerous style normalizations from John:
Richard Rauch [Fri, 21 Nov 2003 21:15:58 +0000 (21:15 +0000)]
Numerous style normalizations from John:

 * Convert "return( value );" to "return value;"
 * Normalize spacing around semicolons.
 * Remove extraneous parens.
 * Split multi-statement lines into multiple lines.  (Mostly things
   of the form: "if( condition ) return;".)

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

20 years agoAll changes are from John, except for:
Richard Rauch [Fri, 21 Nov 2003 00:49:51 +0000 (00:49 +0000)]
All changes are from John, except for:
 (a) I re-inserted the meat of a comment that I still feel is relavent.
 (b) I fixed a compile-time error in the UNIX_X11 code where a variable
     is declared after executable code in a block without creating
     a new sub-block for the declaration.

Changes from John include:
 (a) Style revision.
 (b) Changes to postpone the handling of window resizes.

Lots of lines were changed, but I think that thos two cover the ground that
he hit.  See the diffs for details.

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

20 years agoLots of stuff that John F. Fay pointed out.
Christopher John Purnell [Tue, 18 Nov 2003 22:09:15 +0000 (22:09 +0000)]
Lots of stuff that John F. Fay pointed out.
Plus some changes to remove gcc warnings.

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

20 years agoFix spelling mistake in a variable name.
Christopher John Purnell [Mon, 17 Nov 2003 21:11:33 +0000 (21:11 +0000)]
Fix spelling mistake in a variable name.
Added a comment for John Fay.
Added the copyright notice for XParseGeometry source.

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

20 years agoMade Modifers variable global as per glut classic.
Christopher John Purnell [Sun, 16 Nov 2003 14:10:35 +0000 (14:10 +0000)]
Made Modifers variable global as per glut classic.

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

20 years agoRemoved old unused glutInitDisplayString code.
Christopher John Purnell [Sun, 16 Nov 2003 13:49:49 +0000 (13:49 +0000)]
Removed old unused glutInitDisplayString code.
Reformated new glutInitDisplayString and XParseGeometry code.

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

20 years agoUse XParseGeometry for better geometry parsing.
Christopher John Purnell [Sun, 16 Nov 2003 01:41:18 +0000 (01:41 +0000)]
Use XParseGeometry for better geometry parsing.
Moved geometry parsing to after fgInitialize() so we can use the screen size
to correctly calculate negative positions in the geometry string.
Copied the code for XParseGeometry from the X11 sources for use in the
Win32 version.
freeglut now passes test1 of the glut test suite.

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

20 years agoRemoved the state variable BuildingAMenu.
Christopher John Purnell [Sat, 15 Nov 2003 19:25:22 +0000 (19:25 +0000)]
Removed the state variable BuildingAMenu.
Instead pass a new parameter isMenu to fgCreateWindow().
Elsewhere use window->IsMenu.

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

20 years agofreeglut_assert_ready is going to have to go at some point.
Christopher John Purnell [Sat, 15 Nov 2003 19:11:09 +0000 (19:11 +0000)]
freeglut_assert_ready is going to have to go at some point.
But for now I've moved setting fgState.Initalized to GL_FALSE.

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

20 years agoReplace TRUE with GL_TRUE and FALSE with GL_FALSE where the type is
Christopher John Purnell [Sat, 15 Nov 2003 19:06:28 +0000 (19:06 +0000)]
Replace TRUE with GL_TRUE and FALSE with GL_FALSE where the type is
GLboolean.

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

20 years agoNormalized the spacing around symbols, for the most part. Ho-hum.
Richard Rauch [Sat, 15 Nov 2003 17:48:43 +0000 (17:48 +0000)]
Normalized the spacing around symbols, for the most part.  Ho-hum.

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

20 years agoAdded a call to fgDeinitialize() before the call to exit() in fgError().
Christopher John Purnell [Sat, 15 Nov 2003 16:52:46 +0000 (16:52 +0000)]
Added a call to fgDeinitialize() before the call to exit() in fgError().

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

20 years agoStyle normalizations to the joystick code.
Richard Rauch [Sat, 15 Nov 2003 16:39:46 +0000 (16:39 +0000)]
Style normalizations to the joystick code.

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

20 years agoAdded a new state variable "Initalized".
Christopher John Purnell [Sat, 15 Nov 2003 16:24:33 +0000 (16:24 +0000)]
Added a new state variable "Initalized".
Replaced referenced to Time.Set with this new variable where appropriate.
fgElapsedTime() now set the start time if Time.Set is false.
Moved glutGet(GLUT_ELAPSED_TIME) handling to before the assert.

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

20 years agoNormalized the internal header's style a bit.
Richard Rauch [Fri, 14 Nov 2003 17:46:01 +0000 (17:46 +0000)]
Normalized the internal header's style a bit.

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

20 years agoPlowed one more file this morning. Still just trivial formatting issues.
Richard Rauch [Fri, 14 Nov 2003 15:10:50 +0000 (15:10 +0000)]
Plowed one more file this morning.  Still just trivial formatting issues.

And I left alone the "INIT DISPLAY STRING PARSING" section, since
it still appears to be in flux.

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

20 years agoYet more trivial style normalizations.
Richard Rauch [Fri, 14 Nov 2003 14:59:49 +0000 (14:59 +0000)]
Yet more trivial style normalizations.

Sorry, but that's all that I'm up to at the moment.  On the plus,
excepting the font_data file (which I've been skipping), up through
this file, I think that the code style is pretty close to uniform.

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

20 years agoMinor style corrections.
Richard Rauch [Fri, 14 Nov 2003 14:52:15 +0000 (14:52 +0000)]
Minor style corrections.

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

20 years agoMinor spacing quibble.
Richard Rauch [Fri, 14 Nov 2003 14:39:20 +0000 (14:39 +0000)]
Minor spacing quibble.

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

20 years agoAdded a brief explanatory note to the X code for GLUT_CURSOR_NONE.
Richard Rauch [Fri, 14 Nov 2003 14:36:27 +0000 (14:36 +0000)]
Added a brief explanatory note to the X code for GLUT_CURSOR_NONE.

Corrected the indentation of a block of code.

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

20 years agoNoted one of a few cases where we do something immediately that could more
Richard Rauch [Fri, 14 Nov 2003 11:04:11 +0000 (11:04 +0000)]
Noted one of a few cases where we do something immediately that could more
efficiently be postponed, quite easily---and which GLUT promises *is* to
be postponed.  (It is unlikely that the difference will break any apps, but
postponing should be easy...)

No real change, just a comment in the code.

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

20 years agoUpdated ChangeLog for the day.
Richard Rauch [Tue, 11 Nov 2003 11:55:19 +0000 (11:55 +0000)]
Updated ChangeLog for the day.

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

20 years agoRemoval of all remaining TABs in the freeglut *.[ch] files. (I missed a
Richard Rauch [Tue, 11 Nov 2003 11:52:14 +0000 (11:52 +0000)]
Removal of all remaining TABs in the freeglut *.[ch] files.  (I missed a
few in the "one" demo, it seems, and some more crept back into
freeglut_(ext|font).c, presumably due to my own edits when I forgot to
use the "freeglut-c-mode" in EMACS.)

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

20 years agoMoved glutInit*() functions ahead of glutInit(). (This is proper use of
Richard Rauch [Tue, 11 Nov 2003 11:20:01 +0000 (11:20 +0000)]
Moved glutInit*() functions ahead of glutInit().  (This is proper use of
glutInit() in general, since it allows the user to override settings via
{argc, argv} command-line params.)

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

20 years agoStyle normalizations: Removed CRs and hard TABs mostly.
Richard Rauch [Tue, 11 Nov 2003 11:18:16 +0000 (11:18 +0000)]
Style normalizations: Removed CRs and hard TABs mostly.

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

20 years agoCorrected the numbering of the ChangeLog (there were two (110)s).
Richard Rauch [Tue, 11 Nov 2003 09:05:14 +0000 (09:05 +0000)]
Corrected the numbering of the ChangeLog (there were two (110)s).

Added entries summarizing my commits since September or late August, for
the benefit of those lacking both CVS and web access.

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

20 years agoAdded CRs to the ends of all lines in MS developer studio demos.dsw file..
Richard Rauch [Tue, 11 Nov 2003 03:35:47 +0000 (03:35 +0000)]
Added CRs to the ends of all lines in MS developer studio demos.dsw file..

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

20 years agoJohn's fix for the minimize/close/maximize controls no longer working.
Richard Rauch [Mon, 10 Nov 2003 18:19:53 +0000 (18:19 +0000)]
John's fix for the minimize/close/maximize controls no longer working.
WIN32 expected us to pass the message on up the chain (or do something
else with it), rather than just throwing away the event, for a certain
class of events.  (See the diffs for more details.)

The code is also slightly reformatted from what was previously in the
repository.

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

20 years agoA *.dsp file for CallbackMaker in the demos.
Richard Rauch [Mon, 10 Nov 2003 17:04:05 +0000 (17:04 +0000)]
A *.dsp file for CallbackMaker in the demos.

Plus updated *.dsp and *.dsw files to reflect the new freeglut header
file.

NOTE: The prior version of the *.dsw file does not in fact have CRs.  I
thought that it did.  For consistancy, I am not putting them in in this
version, either.  (At least one person said that his MSVC++ system is
happy with the current files.  If there are problems, we can easily add
the CRs, but that should be a separate commit...)

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

20 years agoNew demo from John: CallbackMaker.
Richard Rauch [Mon, 10 Nov 2003 16:01:05 +0000 (16:01 +0000)]
New demo from John: CallbackMaker.

This demo shows the use of every callback that you can register with
freeglut, and also generates event reports so that you can see what is
happening to the program as it runs.

Not much to look at, but both utilitarian and a practical example.

Please double-check that I updated everything that needs to be updated.
I reran autogen.sh and ./configure, and it built okay for me.  (^&

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

20 years agoHm. I thought that I already hit this file for style normalization.
Richard Rauch [Mon, 10 Nov 2003 10:00:21 +0000 (10:00 +0000)]
Hm.  I thought that I already hit this file for style normalization.
Oh well...  Should be no functional changes.  Should be pretty
close to in-line with the style of changes that I've been making else-
where.

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

20 years agoOoops. Forgot that we already had a call to fgClearCallBacks() in the
Richard Rauch [Mon, 10 Nov 2003 09:45:47 +0000 (09:45 +0000)]
Ooops.  Forgot that we already had a call to fgClearCallBacks() in the
code and added a second one.  I just deleted the new one.  Sorry.

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

20 years agoAdded Nigel's suggested code to clear all but the destroy callback early
Richard Rauch [Mon, 10 Nov 2003 09:42:14 +0000 (09:42 +0000)]
Added Nigel's suggested code to clear all but the destroy callback early
on, leaving Destroy to be cleared later after the last possible point
where it should be invoked.

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

20 years agoModified the menus to refer to {border} rather than {FREEGLUT_MENU_BORDER},
Richard Rauch [Mon, 10 Nov 2003 01:21:06 +0000 (01:21 +0000)]
Modified the menus to refer to {border} rather than {FREEGLUT_MENU_BORDER},
in fghDisplayMenuBox().  The local variable was already defined and used
for some purposes, so we might as well use it throughout.  It does serve
to shorten and clarify the code a bit---though I have mixed feelings about
creating aliases that way.

Still, the variable already existed and was already used in places.  (We
could even move it into the freeglut state, or make it a {const static}
value...)

Oh well.  Stuff to ponder.

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

20 years agoWell, a couple of days have gone by, so I assume that items (a) and (b)
Richard Rauch [Mon, 10 Nov 2003 00:32:15 +0000 (00:32 +0000)]
Well, a couple of days have gone by, so I assume that items (a) and (b)
in the freeglut_cursor.c file's "Open issues" comment are now satisfactor-
ily closed.

I also partially implemented some error-checking, using my limited
understanding of how Xlib users are supposed to do this.  (No one commented
about the lack of error-checking, pro or con.  Perhaps someone will care to
comment now?)

At present, it just will print out a warning, via fgWarning().  In part
because I'm not sure what is best to do, and in part because failure to
set the cursor type is probably not a fatal problem.

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

20 years agoApplied Braden McDaniel's non-srcdir build patch.
Christopher John Purnell [Sat, 8 Nov 2003 17:40:42 +0000 (17:40 +0000)]
Applied Braden McDaniel's non-srcdir build patch.

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

20 years agoA first pass over freeglut_menu.c to bring it in line with the rest of
Richard Rauch [Sat, 8 Nov 2003 11:28:34 +0000 (11:28 +0000)]
A first pass over freeglut_menu.c to bring it in line with the rest of
freeglut's style.  Mostly re-indenting and splitting long lines.
For those that may be concerned: No, I didn't do any more arrangments
of the form (CONST == a) rather than (a == CONST).  (^&

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

20 years agoAltered the way that the {random} value (from 0..3) is chosen.
Richard Rauch [Sat, 8 Nov 2003 01:56:45 +0000 (01:56 +0000)]
Altered the way that the {random} value (from 0..3) is chosen.

Previously, it picked out two adjacent bits in the result of rand().
Unfortunately, these adjacent bits (at least on NetBSD) have a certain
amount of dependance.  After a period (perhaps a thousand or so?), it
starts to repeat the pattern of those two bits.  (I think; I haven't
actually tested that directly.)  This presumably is locking it into a
an an N-way attractor on the "snowflake", such that if you zoom in a
ways, you will start to see some spots *quickly* are colored, and
others are *never* colored.

What I've done now is to pick up two widely-spaced bits in a single
rand() call.  (Perhaps we would do as well to pick up something like
bit #16 from two consecutive rand() calls?)  These widely-spaced bits
have a lower statistical dependance on one another (if I can get away
with using that term for an arithmetic operation; though since stats
has more to do with sampling and less to do with true randomness, I
may be safe).

The net effect, at leats on NetBSD, is far better snowflake if you zoom
in on it.

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

20 years agoFrom John:
Richard Rauch [Fri, 7 Nov 2003 17:30:32 +0000 (17:30 +0000)]
From John:

[This] implements the visible/invisible for Windows.  It does
NOT call the visibility callback, though.

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

20 years agoStripped out the now truly extraneous {braces} in such forms as:
Richard Rauch [Fri, 7 Nov 2003 15:50:56 +0000 (15:50 +0000)]
Stripped out the now truly extraneous {braces} in such forms as:

if( ... )
{
    INVOKE_WCB( ... );
}

Check for compiling on WIN32.

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

20 years agoAdopted Eero Pajarre's suggestion of using a do { ... } while
Richard Rauch [Fri, 7 Nov 2003 15:30:59 +0000 (15:30 +0000)]
Adopted Eero Pajarre's suggestion of using a do { ... } while
rather than { ... } for the INVOKE_WCB() macro.  This lets it
be used "more like a function", in that:

if( ... )
    INVOKE_WCB( ... );
else
    ...

...is now legal.

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