Commit Graph

627 Commits

Author SHA1 Message Date
puggles
d6eae7134a John Fay: Remove some obsolete defined symbols.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@498 7f0cb862-5218-0410-a997-914c9d46530a
2004-05-12 00:17:46 +00:00
puggles
c46ead491e John Fay: Add "freeglut_glutfont_definitions.c" to the build and tell it to look in the "include" directory for the <GL/freeglut.h> file.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@497 7f0cb862-5218-0410-a997-914c9d46530a
2004-05-12 00:17:17 +00:00
puggles
d3fad7828e Fix broken link to CVS instructions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@496 7f0cb862-5218-0410-a997-914c9d46530a
2004-05-02 04:06:56 +00:00
puggles
107b2d39ae Fix underline behavior due to typo (a.hover should be a:hover) ;)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@495 7f0cb862-5218-0410-a997-914c9d46530a
2004-04-13 00:35:38 +00:00
sjbaker
a19cbfa13a Removed unnecessary initialisation.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@494 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-28 15:51:33 +00:00
sjbaker
3905363c58 Added a cullface test.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@493 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-28 15:44:22 +00:00
drgoldie
c23c129b0e removed .cpp file (using LoadLibrary() instead)
removed modified gx.h file
cleaned up all // and tabs


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@492 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-22 10:19:25 +00:00
puggles
3e6bc9b199 Add "you must subscribe before you can post to our mailing lists" and correctly capitalize "XFree86".
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@491 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-18 18:43:08 +00:00
puggles
13f6488430 Add "mailto" tags to the mailing list links.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@490 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-17 17:47:41 +00:00
nigels
101fd08582 Prevent exceeding array bounds in X11 key-repeat detection
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@489 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-17 04:02:21 +00:00
drgoldie
041d8017dc replaced all tabs with 4 spaces
replaced all // with /* */ block
fixed freeglut_gx.cpp file with #if TARGET_HOST_WINCE


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@488 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-16 08:38:28 +00:00
nigels
c233e0f5db Whitespace conversion - tabs to 4 spaces
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@487 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-16 00:17:11 +00:00
nigels
4e304b51b9 Revert X11 fgCloseWindow to 1.38 pre-offscreen implementation.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@486 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-16 00:15:05 +00:00
drgoldie
154a985699 fixed mouse position and keyboard mapping.
added c-wrapper cpp file for GAPI.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@485 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 15:23:29 +00:00
drgoldie
30aa3f91c3 added support for WindowsCE (building on top of klimt)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@484 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 13:42:20 +00:00
nigels
11d357efc4 Repeat-key handling for Win32
Utilise both FreeGLUT state and per-window filtering modes


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@483 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 11:31:19 +00:00
rkrolib
3ff83f17c8 Forgot to update the ChangeLog for the benefit of those who do not have
CVS or Web access.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@482 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 06:19:33 +00:00
rkrolib
b3f3ea2cf0 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: https://svn.code.sf.net/p/freeglut/code/trunk@481 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 06:16:47 +00:00
rkrolib
a4e8aad90c Removed Makefile support for the offscreen demo.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@480 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 06:10:27 +00:00
rkrolib
68abc58465 Removed offscreen demo program.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@479 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 06:08:08 +00:00
nigels
d566de6bc8 Provide local include path to automake for GL/freeglut.h etc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@478 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-15 00:07:37 +00:00
nigels
121d94e35c Code formatting tweak
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@477 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-14 04:37:17 +00:00
nigels
6065b3da65 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: https://svn.code.sf.net/p/freeglut/code/trunk@476 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-14 04:36:02 +00:00
nigels
a291d1e0d3 Stripped out tabs and end-of-line whitespace
Differences are in whitespace only


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@475 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-14 03:47:46 +00:00
nigels
c203af6503 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: https://svn.code.sf.net/p/freeglut/code/trunk@474 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-10 05:11:04 +00:00
nigels
8ef6187d85 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: https://svn.code.sf.net/p/freeglut/code/trunk@473 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-08 06:06:57 +00:00
nigels
9e4156f49f Resolved bug #869765 glutIgnoreKeyRepeat() Fix (Win32)
glutIgnoreKeyRepeat now behaves correctly on Win32


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@472 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-08 05:49:55 +00:00
nigels
7542599aa9 C++ style comment converted to C style comment
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@471 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-08 05:15:15 +00:00
nigels
1523c69539 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: https://svn.code.sf.net/p/freeglut/code/trunk@470 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-08 05:05:38 +00:00
nigels
def83e15e9 According to John F. Fay:
The variable "num_axes" should be "joy->num_axes".


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@469 7f0cb862-5218-0410-a997-914c9d46530a
2004-03-03 03:35:42 +00:00
rkrolib
15c7f0ba24 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: https://svn.code.sf.net/p/freeglut/code/trunk@468 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-20 23:31:41 +00:00
rkrolib
517a32d77d 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: https://svn.code.sf.net/p/freeglut/code/trunk@467 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-20 05:05:35 +00:00
rkrolib
3b23a58148 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: https://svn.code.sf.net/p/freeglut/code/trunk@466 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-19 11:13:11 +00:00
rkrolib
813e5ed5ac 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://svn.code.sf.net/p/freeglut/code/trunk@465 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-19 10:09:29 +00:00
rkrolib
819e75a0f3 Minor comment adjustments.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@464 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-18 06:52:50 +00:00
nigels
192d0ba74e Refinements to comments
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@463 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-18 02:51:04 +00:00
rkrolib
a1547dde81 Normalized the style of the new joystick a bit.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@462 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-14 08:51:54 +00:00
rkrolib
c03f197329 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://svn.code.sf.net/p/freeglut/code/trunk@461 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-14 03:29:57 +00:00
rkrolib
70f0afbc07 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://svn.code.sf.net/p/freeglut/code/trunk@460 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-14 03:23:43 +00:00
rkrolib
a6d19e891d Commit of John's tidying-up of a comment, closing out an XXX comment that
I wrote.  Thanks, John.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@459 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-09 14:54:14 +00:00
rkrolib
1101bb7b23 ...AND a tab snuck into my changes for GLUT_OFFSCREEN support. Mea culpa.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@458 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 12:12:46 +00:00
rkrolib
5f324aa73b 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://svn.code.sf.net/p/freeglut/code/trunk@456 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 12:10:26 +00:00
rkrolib
401cff3240 Added entries for the joystick updates and the offscreen experimental
support.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@455 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 11:36:39 +00:00
rkrolib
1559d50f18 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://svn.code.sf.net/p/freeglut/code/trunk@454 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 11:22:16 +00:00
rkrolib
f464318e8d "Heavy editing" by John to his CallbackMaker demo.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@453 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 10:57:17 +00:00
rkrolib
bfae88650c John added a #pragma to the joystick code for WIN32 users.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@452 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 10:52:08 +00:00
rkrolib
190a260143 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://svn.code.sf.net/p/freeglut/code/trunk@451 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-07 10:40:59 +00:00
rkrolib
3119df3a6c 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://svn.code.sf.net/p/freeglut/code/trunk@450 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-05 23:31:09 +00:00
rkrolib
46f090da2c 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://svn.code.sf.net/p/freeglut/code/trunk@449 7f0cb862-5218-0410-a997-914c9d46530a
2004-02-01 09:18:59 +00:00
rkrolib
377940880c Ammended a comment on fgCheckJoystickCallback().
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@448 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-16 12:44:50 +00:00
rkrolib
889ff65585 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://svn.code.sf.net/p/freeglut/code/trunk@447 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-16 00:22:43 +00:00
rkrolib
5e022b0578 Some changes from John.
The main attraction seems to be correcting a bug with the action-on-
window-close.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@446 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-16 00:17:23 +00:00
nigels
96d0286492 Minor fix for website nav panel - FreeGLUT logo location
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@445 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 22:47:21 +00:00
nigels
2a3ccb7132 Changed CSS links to absolute URL
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@444 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 15:59:45 +00:00
nigels
b9b95cdc8c 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: https://svn.code.sf.net/p/freeglut/code/trunk@443 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 15:49:14 +00:00
nigels
c342b2fe2a Minor tweak to generateFooter()
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@442 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 15:04:25 +00:00
nigels
10d29e38ed Updated entire website to be XHTML 1.0 Strict XML compliant
Some reorgansiation of navigation structure.
Developer Info "dinfo.php" and User Info "uinfo.php" now obsolete.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@441 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 14:44:52 +00:00
nigels
0245ec89eb Added freshmeat and openl links to navigation panel
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@440 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-05 14:43:50 +00:00
nigels
2c46236afb Added Gentoo ebuild link
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@439 7f0cb862-5218-0410-a997-914c9d46530a
2004-01-01 02:03:56 +00:00
puggles
19a2b0f841 Added the API from the docs directory. Updated the stylesheet with header styles. Noted in the news that the API is now online. Updated the user and developer info pages with a better looking "Documentation" section.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@438 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-31 03:21:06 +00:00
rkrolib
be6350a54f 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: https://svn.code.sf.net/p/freeglut/code/trunk@437 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 11:50:58 +00:00
rkrolib
ba4088e1f2 Changed several #ifdef's to proper #if's. Eeek. Oook.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@436 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 11:43:24 +00:00
rkrolib
5d5ba0e9e9 Hm... I thought that I committed this last night. What's up?
This is Nigel's modified fgSleepForEvents(), essentially.  Take 2.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@435 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 10:57:01 +00:00
nigels
4f23cc54d6 Added pre-built DevPak link for Dev C++ users
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@434 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 09:53:12 +00:00
nigels
4a51a82b08 Three supported win32 compilation environments: MSVC, Cygwin and MingW32
#pragma is specific to MS compiler


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@433 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:55:39 +00:00
nigels
176108b5eb Explicitly cast function pointer to (void *) in SET_WCB since all callbacks stored as void pointers
suppress gcc -Wall -pendantic "noise"


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@432 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:51:32 +00:00
nigels
2ed416a592 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: https://svn.code.sf.net/p/freeglut/code/trunk@431 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:49:56 +00:00
nigels
54ba1965ee 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: https://svn.code.sf.net/p/freeglut/code/trunk@430 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:28:13 +00:00
nigels
b5452aeafe strlen expects (char *), rather than (unsigned char *)
suppress gcc -Wall -pendantic "noise"


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@429 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:24:05 +00:00
nigels
1fdd04c554 Replace assignment of array to struct with field-by-field assignment
suppress gcc -Wall -pendantic "noise"


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@428 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:22:11 +00:00
nigels
ddd877b469 glutBitmapString and glutBitmapLength expect (unsigned char *) rather than (char *)
suppress gcc in -Wall -pendantic "noise"


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@427 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:20:03 +00:00
nigels
4a7c8b153d Replace #ifdef WIN32 with #ifdef TARGET_HOST_WIN32, as per FreeGLUT convention
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@426 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:17:07 +00:00
nigels
4590373e8d fgState.FPSInterval is unsigned int (GLuint), environment variable GLUT_FPS can be negative
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@425 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:14:54 +00:00
nigels
d07ef326cd OpenGL context is not made current on Win32 until fgSetWindow is called.
This resolves severe problems observed in GLUI applications.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@424 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 02:01:53 +00:00
nigels
3585f68a7f #pragma message is only understood my MS compiler
#if defined(_MSC_VER) .. #endif


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@423 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 01:58:19 +00:00
nigels
4be32e042b Resolve bug 864978 - GLUT_OWNS_JOYSTICK unhandled
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@422 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 01:54:44 +00:00
nigels
5cc127d807 Tidy nested if/else to suppress gcc -Wall -pedantic noise
gcc suggests explicit braces to avoid ambiguous `else'


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@421 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-30 01:52:07 +00:00
puggles
5a8204816b Add a newline between the bug reports and the feature requests.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@420 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-29 21:11:33 +00:00
puggles
5e4c0b6c11 Add in a "view PHP source" option to all webpages that links to CVS. Clean up the template file a little more for kicks. :)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@419 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-29 19:02:34 +00:00
rkrolib
4dcf24793a Missed a set of commands to put in a "typewriter" font.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@418 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-25 17:24:27 +00:00
rkrolib
95fc4f4d4d Use "bzcat ... | tar -xvf -" instead of "tar -jxvf ...".
Also, changed to follow the convention that stuff-you-type is in
a "typewriter" font (use <tt> tags).


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@417 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-25 17:23:08 +00:00
rkrolib
2d4c487aff Some cleanup and touchup to the web-pages.
Nothing exciting.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@416 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-25 16:22:03 +00:00
rkrolib
e72b2158c0 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: https://svn.code.sf.net/p/freeglut/code/trunk@415 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-25 14:39:38 +00:00
rkrolib
64443c7c4b 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: https://svn.code.sf.net/p/freeglut/code/trunk@414 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-23 08:39:44 +00:00
rkrolib
38fb597973 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: https://svn.code.sf.net/p/freeglut/code/trunk@413 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-22 22:13:20 +00:00
rkrolib
69c32f5e17 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: https://svn.code.sf.net/p/freeglut/code/trunk@412 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-22 21:39:18 +00:00
rkrolib
0687f2f596 Ooops, left some cruft in a comment in the header when committing the
last patch.  Cleaned up.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@411 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-19 01:00:07 +00:00
rkrolib
a7d846c36b 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: https://svn.code.sf.net/p/freeglut/code/trunk@410 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-19 00:54:27 +00:00
puggles
686cb62330 Change the destination directory of the debug version to "Debug" (John Fay)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@409 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-15 17:18:37 +00:00
puggles
76a87d1864 Add a newline to "make all make install" so that it'll ... work!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@408 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-14 04:55:28 +00:00
puggles
019099a2a2 Keep from claiming 100% compatibility. Richard pointed out this was false advertising and James needs to be shot three times in the stomach and then beheaded by a spoon that is too big.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@407 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-14 02:04:29 +00:00
puggles
ffcd263378 Fix link to the project interface (was pointing at the old typo3 interface!)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@406 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 20:30:01 +00:00
puggles
280fb4a52f Add a placeholder message until we update this page with real progress and timeline information.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@405 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 19:17:08 +00:00
puggles
8407d17ee9 Initial import
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@404 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 18:58:30 +00:00
puggles
ae6a201f0e Initial import of the web page -- Release of 2.2.0
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@403 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 18:56:30 +00:00
puggles
3212d13152 Uh, re-add since the module works.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@402 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 04:51:03 +00:00
puggles
1fe055088a Undo the pseudo-module now that I've added a real web-src module
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@401 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 04:47:12 +00:00
puggles
878f58d35b First try of getting the web page to work via CVS.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@400 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 03:52:54 +00:00
puggles
8625b93f73 Release 2.2.0
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@398 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-13 01:43:57 +00:00
rkrolib
8fdfd1e769 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: https://svn.code.sf.net/p/freeglut/code/trunk@397 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 22:13:03 +00:00
cjp
103f7e8d87 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: https://svn.code.sf.net/p/freeglut/code/trunk@396 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 21:29:43 +00:00
puggles
a28a6de82f Include project file in the distribution.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@395 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 20:53:14 +00:00
puggles
2cbec9d142 Updates for 2.2.0 RC2
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@394 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 19:56:59 +00:00
puggles
a04ca6e4d8 Add shapes to the Visual C workspace.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@392 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 19:51:11 +00:00
puggles
3d300c8f38 Package the visual C project file with the distribution
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@391 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 19:02:07 +00:00
puggles
d305033c78 Set the version to 2.2.0
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@390 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 18:57:32 +00:00
puggles
5707f479d4 Nigel Stewart's Win32 window-sizing fix for game mode
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@389 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 18:53:06 +00:00
puggles
de8936fe30 Disable/enable lighting in the "one.c" demo (John Fay)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@388 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 18:49:38 +00:00
puggles
9438a576ba Add some essentials to get this program to compile (Nigel)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@387 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 17:05:44 +00:00
puggles
d725e892b8 Update to reflect 2.2.0 release
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@386 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 17:03:09 +00:00
puggles
a24ffcc0bc Note the release of 2.2.0 RC1
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@385 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 01:48:08 +00:00
rkrolib
6a3df5043c 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: https://svn.code.sf.net/p/freeglut/code/trunk@383 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-11 00:08:49 +00:00
rkrolib
d4f3ec79de 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: https://svn.code.sf.net/p/freeglut/code/trunk@382 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-10 23:59:45 +00:00
rkrolib
3ae658e166 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: https://svn.code.sf.net/p/freeglut/code/trunk@381 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-07 10:12:22 +00:00
cjp
a9d59e0c78 Added an option to enable gcc compiler warnings.
I've explicitly excluded the one about adding parentheses.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@380 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-03 19:03:13 +00:00
rkrolib
2e4d5de7c0 Touched up several comments, pointing up things that may be worth reflect-
ing upon in the future.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@379 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-03 09:57:01 +00:00
rkrolib
03cf899635 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: https://svn.code.sf.net/p/freeglut/code/trunk@378 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-03 02:07:36 +00:00
rkrolib
60cc2c79ce 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: https://svn.code.sf.net/p/freeglut/code/trunk@377 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-02 21:30:02 +00:00
rkrolib
1f312bc035 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: https://svn.code.sf.net/p/freeglut/code/trunk@376 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-02 21:14:32 +00:00
rkrolib
642f60f651 Ensure that the time-out for sleeping is never negative.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@375 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-02 21:04:33 +00:00
rkrolib
819e8645b6 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: https://svn.code.sf.net/p/freeglut/code/trunk@374 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-02 15:03:48 +00:00
cjp
d45a86a088 Added missing prototype for new list function.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@373 7f0cb862-5218-0410-a997-914c9d46530a
2003-12-01 17:59:42 +00:00
cjp
e7a19a5546 Timer optimizations.
Made the list of pendinig timers ordered.
Added a free list of used timer structures.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@372 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-28 19:19:59 +00:00
cjp
e6de6c2e6f Timer optimizations.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@371 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-28 19:08:25 +00:00
cjp
5b391a7097 Fixed windows compilation problem with last update.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@370 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-28 12:04:24 +00:00
cjp
b309d468c4 Window close fix.
The default behaiour should now be the same as with glut.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@369 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-27 19:49:53 +00:00
rkrolib
9b36eb081b 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: https://svn.code.sf.net/p/freeglut/code/trunk@368 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-26 01:21:29 +00:00
rkrolib
0dd93cb5e1 John reported, and fixed, a problem that recent changes caused for
the Lorenz demo (seems to be WIN32 specific).


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@367 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 17:25:43 +00:00
rkrolib
1e09843db1 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: https://svn.code.sf.net/p/freeglut/code/trunk@366 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 14:17:05 +00:00
rkrolib
efb92f27a8 Added a new demo (from Nigel) showing some of the basic GLUT geometry
shapes.  "shapes" is the name of the demo.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@365 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 14:10:35 +00:00
rkrolib
e1416ae642 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: https://svn.code.sf.net/p/freeglut/code/trunk@364 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 13:53:19 +00:00
rkrolib
96ee3c4798 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: https://svn.code.sf.net/p/freeglut/code/trunk@363 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 04:57:10 +00:00
rkrolib
db9108dfeb 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: https://svn.code.sf.net/p/freeglut/code/trunk@362 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-25 04:21:48 +00:00
rkrolib
354569a7c4 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: https://svn.code.sf.net/p/freeglut/code/trunk@361 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-21 21:15:58 +00:00
rkrolib
7e7ff3191d 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: https://svn.code.sf.net/p/freeglut/code/trunk@360 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-21 00:49:51 +00:00
cjp
1c7454b49d Lots of stuff that John F. Fay pointed out.
Plus some changes to remove gcc warnings.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@359 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-18 22:09:15 +00:00
cjp
6d21d76b1a Fix spelling mistake in a variable name.
Added a comment for John Fay.
Added the copyright notice for XParseGeometry source.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@358 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-17 21:11:33 +00:00
cjp
a437c328e9 Made Modifers variable global as per glut classic.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@357 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-16 14:10:35 +00:00
cjp
b47a8b1fcc Removed old unused glutInitDisplayString code.
Reformated new glutInitDisplayString and XParseGeometry code.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@356 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-16 13:49:49 +00:00
cjp
d906368add 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: https://svn.code.sf.net/p/freeglut/code/trunk@355 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-16 01:41:18 +00:00
cjp
d161195cb4 Removed the state variable BuildingAMenu.
Instead pass a new parameter isMenu to fgCreateWindow().
Elsewhere use window->IsMenu.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@354 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 19:25:22 +00:00
cjp
22b6c59f34 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: https://svn.code.sf.net/p/freeglut/code/trunk@353 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 19:11:09 +00:00
cjp
3f70f7bdf2 Replace TRUE with GL_TRUE and FALSE with GL_FALSE where the type is
GLboolean.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@352 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 19:06:28 +00:00
rkrolib
06174f9086 Normalized the spacing around symbols, for the most part. Ho-hum.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@351 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 17:48:43 +00:00
cjp
e8cfcd2247 Added a call to fgDeinitialize() before the call to exit() in fgError().
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@350 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 16:52:46 +00:00
rkrolib
1fe1473fbb Style normalizations to the joystick code.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@349 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 16:39:46 +00:00
cjp
2b78c976ea 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: https://svn.code.sf.net/p/freeglut/code/trunk@348 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-15 16:24:33 +00:00
rkrolib
6895440554 Normalized the internal header's style a bit.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@347 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 17:46:01 +00:00
rkrolib
26b98ad308 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: https://svn.code.sf.net/p/freeglut/code/trunk@346 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 15:10:50 +00:00
rkrolib
d83464df48 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: https://svn.code.sf.net/p/freeglut/code/trunk@345 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 14:59:49 +00:00
rkrolib
53dfc57542 Minor style corrections.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@344 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 14:52:15 +00:00
rkrolib
2b9010b0b1 Minor spacing quibble.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@343 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 14:39:20 +00:00
rkrolib
74e6d246ca Added a brief explanatory note to the X code for GLUT_CURSOR_NONE.
Corrected the indentation of a block of code.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@342 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 14:36:27 +00:00
rkrolib
1d2ade2f1c 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: https://svn.code.sf.net/p/freeglut/code/trunk@341 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-14 11:04:11 +00:00
rkrolib
4c4112fe92 Updated ChangeLog for the day.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@340 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-11 11:55:19 +00:00
rkrolib
b92f1915fe 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: https://svn.code.sf.net/p/freeglut/code/trunk@339 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-11 11:52:14 +00:00
rkrolib
4ccdcf6f4e 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: https://svn.code.sf.net/p/freeglut/code/trunk@338 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-11 11:20:01 +00:00
rkrolib
48f65ac54d Style normalizations: Removed CRs and hard TABs mostly.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@337 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-11 11:18:16 +00:00
rkrolib
864ea93df3 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: https://svn.code.sf.net/p/freeglut/code/trunk@336 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-11 09:05:14 +00:00
rkrolib
7621f53262 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: https://svn.code.sf.net/p/freeglut/code/trunk@334 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 18:19:53 +00:00
rkrolib
b1c4e6beb8 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: https://svn.code.sf.net/p/freeglut/code/trunk@333 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 17:04:05 +00:00
rkrolib
6829d65fb3 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: https://svn.code.sf.net/p/freeglut/code/trunk@332 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 16:01:05 +00:00
rkrolib
9623350767 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: https://svn.code.sf.net/p/freeglut/code/trunk@331 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 10:00:21 +00:00
rkrolib
1023b7eb84 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: https://svn.code.sf.net/p/freeglut/code/trunk@330 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 09:45:47 +00:00
rkrolib
f02f918842 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: https://svn.code.sf.net/p/freeglut/code/trunk@329 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 09:42:14 +00:00
rkrolib
6230b2de2a 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: https://svn.code.sf.net/p/freeglut/code/trunk@328 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 01:21:06 +00:00
rkrolib
fb26d91989 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: https://svn.code.sf.net/p/freeglut/code/trunk@327 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-10 00:32:15 +00:00
cjp
85e34f0062 Applied Braden McDaniel's non-srcdir build patch.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@326 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-08 17:40:42 +00:00
rkrolib
6bf9d27035 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: https://svn.code.sf.net/p/freeglut/code/trunk@325 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-08 11:28:34 +00:00
rkrolib
9c070e4f9b 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: https://svn.code.sf.net/p/freeglut/code/trunk@324 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-08 01:56:45 +00:00
rkrolib
acd65a4212 From John:
[This] implements the visible/invisible for Windows.  It does
NOT call the visibility callback, though.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@323 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 17:30:32 +00:00
rkrolib
d7896b09ab Stripped out the now truly extraneous {braces} in such forms as:
if( ... )
{
    INVOKE_WCB( ... );
}

Check for compiling on WIN32.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@322 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 15:50:56 +00:00
rkrolib
9108ab693f 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: https://svn.code.sf.net/p/freeglut/code/trunk@321 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 15:30:59 +00:00
rkrolib
711ab5fdac Pure code janitoring: Shuffled the order of some of the case statements
in the UNIX_X11 X event processing loop.  (In general, it's nice to have
case statements sorted, especially when you have a *huge* switch statement
like this.  That makes it easier to find the one that you're looking for,
and to see if a certain case is defined...)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@320 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 10:32:38 +00:00
rkrolib
6f0ae8796a Combined EnterNotify and LeaveNotify event processing in the UNIX_X11
event loop.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@319 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 10:26:37 +00:00
rkrolib
91a94e44bc Added ReparentNotify case to UNIX_X11 event loop, to catch the extraneous
ReparentNotify event types (type 21).


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@318 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 10:22:31 +00:00
rkrolib
2ddf15c536 Oh well, I might as well add the call to clear callbacks on window
destruction.  Also renamed the function to do this: fgClearCallBacks().
Ho-hum.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@317 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 10:18:10 +00:00
rkrolib
89cbd97e02 Added fgInitCallBacks() to freeglut_structure.c. (The function takes
an {SFG_Window *}.)  Added prototype to freeglut_internal.h.  Added use
of the function to the window initialization.  (Don't count on calloc(),
which sets all bits to 0.)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@316 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 09:55:43 +00:00
rkrolib
ca361547ec Style normalization; removal of say-nothing-useful comments.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@315 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 08:46:53 +00:00
rkrolib
5621aa7fcb Normalized the style of freeglut_font.c No substantial alterations.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@314 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 08:25:30 +00:00
rkrolib
85b7b49ead Somewhat normalized the style of this file.
Also moved the "glutMouseWheelFunc" extension down into the "extensions"
part of the table.  (Purely internal organization.  It will still be
found.)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@313 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 08:06:10 +00:00
rkrolib
d8b2c1d571 Further normalization of the code's style. No substantial changes.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@312 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 07:57:03 +00:00
rkrolib
e6b59a4b45 Split one last overlong line in freeglut_cursor.c.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@311 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 07:48:13 +00:00
rkrolib
658305f2c9 Added GLUT_CURSOR_NONE support in UNIX_X11 (well, NetBSD; you lot need
to try it on others; (^&).

Deallocated some resources that we are creating.  VERY slight memory leak,
but plugged now.


These two complete the first two "Open issues" ( (a) and (b) ).  The first
one also completes X support for glutSetCursor().  If others can verify,
we can fully demote the outstanding bug over this to WIN32-specific.

I'll delete the dead Open issues and re-letter the others if someone will
cross-check me.  Or if no one says anything in a day or two.  (^&


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@310 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 07:46:08 +00:00
rkrolib
d8f572533b Further normalized the style of the cursor code.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@309 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 06:25:20 +00:00
rkrolib
aeeabeff93 Slight style improvements. Two rules of thumb that are almost always
good to apply:

 * Don't write a == CONST.  Instead, write CONST == a.  Or, more generally
   (in C like languages): Avoid putting an lvalue on the left-hand side of
   an == comparison.  (For consistancy, I try to avoid lvalues on the left-
   hand side of any comparison---but == is the most notorious.)

   (An "lvalue" is a value that can safely go on the left side of an
   "=" assignment, of course.  (^&)

 * Do not write
       if( !condition )
           return;
       other_thing;
       return;

   (See page 18 of K&P's _The Elements of Programming Style_.)

   Instead, it is better to just write:

       if( condition )
           other_thing;
       return;

   There are times when sacrificing structured programming (e.g., via
   multiple return statements) is okay.  But, here, there is no apparent
   gain---indeed, there seems only loss---in the non-structured code.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@308 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 06:12:58 +00:00
rkrolib
974e38bfbd Grr. Forgot to enable the "freeglut" C programming mode in EMACS, and
had a few TABs in the last commit.  This fixes that.  Sorry.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@307 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 05:46:33 +00:00
rkrolib
869780207d Minor corrections to the UNIX_X11 mouse-wheel support. In part this
reflects that {button} is already shifted to the GLUT numbering, and
hence should be counted as 3&4, 5&6, etc.

The other change was simply to clarify the computation of {direction}.
The original code did some clever arithmetic.  The new code is more
straightforward, even if it requires more lines to express.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@306 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-07 05:43:34 +00:00
rkrolib
2ff70b671c Ooops. I screwed up on part of John's fixes. Sorry.
I think that I have his fix properly committed now.  Mea culpa.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@305 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-06 23:40:21 +00:00
rkrolib
65dde7f632 Cleanup pass after committing callback conversion (from structure to
array-of-pointers).  Mostly deleted commented-out struct-based code.
Also added some XXX comments that I though should be pondered.  (My
own pair of eyes, and one brain cell, were not sufficient at this time
to decide what to do for those ponderables.  (^&)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@304 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-06 23:29:55 +00:00
rkrolib
80a523394c Converted the "Callbacks" structure (with named members holding individual
callback pointers) to a "CallBacks" array in fgState.  (This is to allow
us to write a loop to clear all callbacks from windows when the window is
dead/dying.  Using this, we can safely assign NULL to each in a loop.)

Support includes two new macros, FETCH_WCB() and INVOKE_WCB().  See
freeglut_internal.h for more details there.

Some typedefs of function pointer types were altered to make them more
uniform (necessary for the macros).

All references to window-based callbacks in freeglut are updated to
use the new macros.

Old usages will cause compile-time errors.

As a side bonus, the new invocation macro sets the current window and
checks pointers so that these common steps can be uniformly done on
every window-based callback.  This makes it easier to do things right.
At the same time, the array notation (and now required associated casts)
make it harder to bypass the macros and abuse the function pointers,
in general.

After this commit, I will go through the code and clean up dangling issues
about formatting.  This commit is just a "it now works, let's checkpoint it"
type of affair.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@303 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-06 22:09:35 +00:00
rkrolib
b7dd45a935 From John, a couple of lines needed to be changed to fix the mouse wheel
support on WIN32.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@302 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-06 21:41:17 +00:00
rkrolib
406636047f Update from John: Includes mouse button, mouse motion, and mouse wheel
support.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@301 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-06 21:38:21 +00:00
rkrolib
0b588cdcb7 Multiple changes from John. Style issues, plus a bug-fix to check
a pointer before deallocating some memory.

He also removed one obsolete comment, and added some more comments.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@300 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 18:47:26 +00:00
rkrolib
585433d174 Some changes, mostly from John. Mostly style changes.
One bug fix from John: Execution state bug-fix in glutMainLoop(), per his
post yesterday.

One fix from me: Changed "if( ButtonPress )" to "if( pressed )".
{ButtonPress} is a constant.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@299 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 18:16:52 +00:00
rkrolib
3a18a26d74 Update from John:
I [John] added a feature to check for memory leaks under Windows.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@297 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 15:53:49 +00:00
rkrolib
8df7ae3c29 Update from John:
I [John] converted everything to double precision to avoid compiler
warnings.  I also added a feature to check for memory leaks under
Windows and removed a memory leak (surprise!).


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@296 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 15:32:57 +00:00
rkrolib
cc38ef07e9 Got rid of the G_LOG_DOMAIN junk, per discussion on the mailing list.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@295 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 01:30:32 +00:00
rkrolib
30a7dfb0c4 Minor formatting quibbles. (The brain isn't up to anything more serious
at the moment.)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@294 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 01:17:18 +00:00
rkrolib
2c356e1221 Missed a block where one level was 2-space indented.
Nit-picked a few other lines for consistancy.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@293 7f0cb862-5218-0410-a997-914c9d46530a
2003-11-04 01:10:13 +00:00