Richard Rauch [Fri, 31 Oct 2003 11:11:48 +0000 (11:11 +0000)]
Polished off the say-nothing-new comments and lines-over-80-columns in
freeglut_window.c
There should be no functional changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@278
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 06:25:34 +0000 (06:25 +0000)]
Missed a few say-nothing-new comments in fgOpenWindow().
Eeep. Should be better now. (^&
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@277
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 06:20:07 +0000 (06:20 +0000)]
Cleansed fgCloseWindow():
* say-nothing-new comments axed.
* de-TABbed.
* Made the white-space to be consistant.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@276
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 06:11:25 +0000 (06:11 +0000)]
Cleaned up fgOpenWindow():
* Removed TABs.
* Made indentation consistant.
* Deleted say-nothing-new comments.
* Changed an *error*check* from an assert to an if().
(The error-check was on window creation; we don't want to
lose that if the user compiles with asserts deactivated.
Also, assert()s really tell us more about programming errors,
rather than run-time errors, so it is a little misleading to
use assert() for error-checks, even if you can depend upon
assert()s never being compiled away to null statements.)
* Added some XXX comments for things that bear some rumination.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@275
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 05:34:19 +0000 (05:34 +0000)]
Cleanup to fgSetWindow(). The usual suspects:
* Removed tabs.
* Made indentation consistant.
* Killed off say-nothing-new comments.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@274
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 04:25:34 +0000 (04:25 +0000)]
Cleanup to fgSetupixelFormat(). Should be no functional changes.
Code facelift included:
* Consistant indentation.
* Removal of all TABs (there were a bunch).
* Fit to 80 columns.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@273
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Fri, 31 Oct 2003 03:37:27 +0000 (03:37 +0000)]
There should be no changes to code functionality, though a fair bit of
little changes to the code appearance.
* Fit the comments at the start of the file to fit 80 columns.
* Noted an unusual feature of the ATTRIB() macro.
* Added ATTRIB_VAL() macro which is really just two ATTRIB()s.
This lets us put things like {ATTRIB (GLX_RED_SIZE); ATTRIB (1);}
on one statement: {ATTRIB_VAL (GLX_RED_SIZE, 1);}.
I did this to preserve some of the layout of information while also
avoiding the nasty semi-visible ";" in the middle of a line of code.
And by putting the {braces} in the macro definition, I was able to
visually clean code of the form:
if (condition)
{
ATTRIB( X ); ATTRIB( 1 );
}
...rewriting as:
if (condition)
ATTRIB_VAL( X, 1 );
* Eliminated a bunch of say-nothing-new comments in fgChooseVisual().
* Combined some semi-useful comments into a block comment summarizing
a loop.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@272
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 30 Oct 2003 04:43:08 +0000 (04:43 +0000)]
Finished off most of the issues with freeglut_structure.c, from a stylistic
point of view (at least, insofar as: The original file's code was INCON-
SISTANT. I did not remove the "!= NULL" stuff, did not address the
shortest-branch-first issue for if-else statements, and left some rather
ugly "if (x) {... return y} /* else do this */ return NULL;" garbage.
This should, I think, be re-written as "if (x) return y; else return NULL;"
or even better, "ret = NULL; if (x) ret = y; return ret;"
In short, the code still has some issues, but I think that it's a bit
better.
(Oh, I also got rid of oustanding TABs.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@271
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 30 Oct 2003 04:36:54 +0000 (04:36 +0000)]
Eliminated most of the say-nothing-new comments.
Fit most of the code to no more than 80 columns.
Raised some issues about completeness/correctness of trying to
decrement the max-window-ID (apparently in order to partially
recycle some window IDs to slightly slow the rate of growth of
window IDs). (I didn't change what the code does, though.)
The functionality of the code should be unchanged.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@270
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 30 Oct 2003 03:51:33 +0000 (03:51 +0000)]
Forgot to set {direction} explicitly to +/- 1 for freeglut mouse-wheel
API on MS-WINDOWS. Oops.
Now it should always report +/- 1 on MS-WINDOWS, per the spec.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@269
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 30 Oct 2003 03:20:24 +0000 (03:20 +0000)]
Minor fix to allow for multiple ticks to be received at one time by the
WIN32 code. Take abs(direction) as the number of ticks, and count it
down.
<stdlib.h> *should* be included by freeglut_internal.h, I think, so it
should be okay; otherwise add a suitable #include.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@268
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 30 Oct 2003 03:08:16 +0000 (03:08 +0000)]
Grrr. My attempt to commit got aborted, and the commit message was lost.
Now I've lost track of what I said I'd done. Something like:
* Fixed some issues with multiple wheels.
* Noted in comments some issues about other-than-3-real-buttons.
* Fixed formatting to fit 80 columns.
* Removed some BCPL/C++ style comments (//) that are not legal, and
which, if memory servers, are not even strictly legal when disabled
by preprocessor directives. E.g.,
#if 0
not-syntactically-valid-C
#endif
...is not legal. Though most cpp's will discard the bracketed material
completely before the main C compiler pass has a chance to analyze the
syntax. (MSVC++ and GCC both don't seem to mind the BCPL style comments
in plain C, but let's keep the sources clean, eh?)
* Fixed a problem that would have caused freeglut to report doubled
wheel events under XFree86.
Not tested other than compiling. Personally, I think that the interface
is inherently broken at this point unless you are willing to get user-
configuration. (Which would then solve the complaint that Steve had
about computing the tick-size on behalf of applications.) I.e., there
is NO WAY to know if we have the right buttons to start wheels at, or
if there are any buttons after the first wheel(s), etc. We just have to
guess---and if we are wrong, we can get varying degrees of brokeness.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@267
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Wed, 29 Oct 2003 23:01:56 +0000 (23:01 +0000)]
There is a problem with the way I did glutFullscreen() in my last commit.
So I've copied the way the game mode does it. It's not ideal but it works.
The glutGet() for the window border sizes will also have to be fixed at
some point.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@266
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Wed, 29 Oct 2003 18:19:17 +0000 (18:19 +0000)]
Rewrote glutFullscreen().
It now correctly places the window in X11.
It now uses system dependant code for more efficient use of
windowing system calls.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@265
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 18:05:48 +0000 (18:05 +0000)]
Should be no real changes to the code function.
I missed a few lines that went past 80 columns. (^&
Also made formatting more consistant.
Added a couple of XXX comments re. FreeBSD vs. general BSD #ifdef's.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@264
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 17:44:42 +0000 (17:44 +0000)]
Should be entirely superficial changes to code style:
* Fit lines to 80 columns. (It does get tiresome seeing long lines
forced to break by the right-hand border of windows...(^&)
* Eliminated say-nothing-new comments.
* Made formatting more consistant in spots.
* Eliminated some hard TAB characters.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@263
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 17:29:10 +0000 (17:29 +0000)]
Added Thierry's change to include sys/param.h. This lets us pick out version
numbers for OS releases corresponding to system headers.
I modified it to also work with NetBSD; I cannot confirm if it is safe with
any other systems, so it remains protected by a #if.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@262
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 07:49:59 +0000 (07:49 +0000)]
Deleted some say-nothing-new comments.
Added some XXX's where comments seemed to require future attention.
Added some new comments with XXX's where future attention seems profitable.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@261
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 07:18:10 +0000 (07:18 +0000)]
Deleted a bunch of say-nothing-new comments. Someday, there shall
be an end to them.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@260
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 07:13:55 +0000 (07:13 +0000)]
Previous changes were made without the freeglut major mode in EMACS.
Re-tweaked some lines (mostly got rid of some TABs, but also resulted
in some changed indentation).
Reformatted a big comment to fit to 80 columns.
Removed bogus references to "Linux". (UNIX, and/or X11 were relavent,
and "UNIX/X11" was substituted for "Linux" in those places. This includes
UNIX-alike systems.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@259
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 06:57:07 +0000 (06:57 +0000)]
Rewrote the TODO BEFORE THE STABLE RELEASE comment to fit to 80 columns.
Cleanup of fghGetConfig(). (One return statement, simpler code.)
Made glutSetOption() have a more consistant style---and also got its lines
to stay under 80 columns.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@258
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 06:43:32 +0000 (06:43 +0000)]
Got the last of the say-nothing-new comments in freeglut_misc.c.
(I would have picked them up before, but wanted the bug-fix and
conversion-to-error-message changes to go in before I did more
superficial stuff.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@257
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 29 Oct 2003 06:40:51 +0000 (06:40 +0000)]
* Fixed a bug that I introduced in fgWarning()/fgError(): I thought that
((a) || (b)) was defined to have value as:
(a) if (a) != 0
(b) if (a) == 0
...instead, it has value 0/1. This was causing a bug. It's probably
just as well, since what I was trying to do definitely fell into the
category of "clever code" rather than "clear code".
Sorry.
* Made glutSetKeyRepeat() call fgError() if you go out of range. (The
old code silently did nothing---not even a warning.)
If it is really desirable to keep running, we should probably at least
generate an fgWarning().
* Deleted some say-nothing-new comments.
* XXX added: Is glutSetKeyRepeat() deprecated?
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@256
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Tue, 28 Oct 2003 20:17:39 +0000 (20:17 +0000)]
Commit, mostly of work from John:
* Removed some say-nothing-useful comments.
* Added some tentative mouse-wheel support.
* Fairly massive reformatting of code.
I made some secondary changes to his changes:
* One compilation error was fixed (missing close-paren + semicolon).
* Deleted a few ore say-nothing-useful comments.
* Some of John's code was strangely formatted to the point that it
seemed completely out of place, so I took the liberty of reformatting
it. Since I used GNU EMACS's <tab> key (which re-indents rather than
inserts TAB characters), I had to propogate some indentation changes
a little further than the bare necessity to match up with John's
changes. (John seems to shoot for 2-space indents, while EMACS
(and I, I confess) strongly prefer 4-space indents. The code that
I was re-indenting had been put to 8-space indents, however.)
I have *not* tested the code beyond compiling. I assume that John did
(and that the compilation error was a result a minor change just before
asking me to commit).
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@255
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Tue, 28 Oct 2003 19:37:09 +0000 (19:37 +0000)]
Re-indentation style changes from John.
There should be no alterations to how the code performs.
(I modified how the X11 section of the set-cursor code is indented to
slightly better match (IMHO) the rest of his changes.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@254
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 15:38:14 +0000 (15:38 +0000)]
Converted a few "x != NULL" tests to "x" for clarity.
I think that I've touched enough lines of source for one morning.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@253
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 13:51:35 +0000 (13:51 +0000)]
Cleaned up a little redundancy in a comment on the {menu_pen_*} variables.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@252
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 13:47:55 +0000 (13:47 +0000)]
Removed about 90 lines of say-nothing-new comments.
The code should be functionally unaltered by these changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@251
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 06:39:57 +0000 (06:39 +0000)]
Propogated a pointer-check from menu-attach to menu-detach. (Apparently,
in some cases, the Menu member variable can be NULL.)
Corrected the menu-attach code to make sure that both Window and Menu
pointers are non-NULL (rather than "at least one").
Rewrote button-checks to more simply and more clearly assert that the
"menu button" is a valid button for menu actions: Instead of laboriously
comparing against the three valid buttons (0, 1, 2 or GLUT_BUTTON_*),
we do a simpler range-check and the upper bound is {FREEGLUT_MAX_MENUS},
allowing us to change the number of menuable buttons fairly easily in
the future.
Also deleted a few say-nothing-new comments.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@250
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 05:45:48 +0000 (05:45 +0000)]
Cosmetic changes (mostly deleted a few more say-nothing-new comments).
The functionality of the code should be unchanged.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@249
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 05:36:29 +0000 (05:36 +0000)]
Changed an "#elif TARGET_HOST_UNIX_X11" to "#else", since this simply
governed menu aesthetics. I think that it's better to have a default
that works than to break completely, should freeglut ever be ported to
a new (non-WIN32, non-UNIX/X11) target.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@248
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 05:32:14 +0000 (05:32 +0000)]
Minor modifications to the menus:
* Updated an old "TODO BEFORE STABLE" comment.
* Expanded a comment re. some #define macros.
* Made colors and font choice system dependant. The UNIX freeglut
menus look more like UNIX GLUT menus, now. (This is PURELY a
cosmetic change. But it achieves better compatibility visually.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@247
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 05:12:09 +0000 (05:12 +0000)]
Cleaned up glutMainLoop() a bit:
* Deleted numerous say-nothing-new comments.
* Reformatted a say-something-useful comment to fit on an 80-column
display.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@246
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 27 Oct 2003 05:03:31 +0000 (05:03 +0000)]
Partially (re-?)unified some of the glutMainLoopEvent() code. The only
code that really needs to be system-specific is the window event handling,
which in MS-WINDOWS is tucked into a separate function. In UNIX/X11, it's
all spilled out into glutMainLoopEvent() for some reason.
If the X11 code could be tucked into another function, glutMainLoopEvent()
could be platform-independant.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@245
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 06:13:50 +0000 (06:13 +0000)]
Moved the idle callback out of glutMainLoopEvent() and into
glutMainLoop(), per discussion on the list. The code looks okay,
to me, though I remain less than wholly convinced that treating idles
as special cases is the best way to go. Still, a case can be made
for taking "non-event" idle callbacks out of the "event loop".
From an organizational perspective, I think that it's an improvement,
and it fixes a bug for at least one program.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@244
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 05:59:15 +0000 (05:59 +0000)]
Added John's text-positioning modification.
The lines that he was altering were very oddly-split, so while I was at
it, I repaired the line-break damage.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@243
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 05:44:07 +0000 (05:44 +0000)]
Committed change from Nigel to fix the joystick bug. (The joystick
code was not setting the GLUT window prior to calling callbacks.)
Please verify. If so, this closes out, I think, the latter half of
that bug report, so anyone with the means to modify/close bug reports
should do so upon verification of the fix.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@242
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 05:38:12 +0000 (05:38 +0000)]
Superficial cleanup of the code. Mostly taking lines such as:
...
/*
* <Enslish recapituation of the single following C statement>
*/
<single C statement>
...and rewrote as:
...
<single C statement>
freeglut_main.c still has a lot of that in it, but it looks a bit
better, now.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@241
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 05:19:02 +0000 (05:19 +0000)]
Added some error-checking (particularly w.r.t. strdup()).
Deleted numerous 4-line "padding" sequences of C-as-English trans-
literation comments.
Re-indented some (but not all) code that is using 2-space indentation.
(Most of the freeglut code seems to be using 4-space indentation.)
I did not touch the "INIT DISPLAY STRING PARSING" code, since it is
filled with a ton of over-long lines and also appears to be in more
flux than the rest of the code. (Well, I added one error-check
to a strdup().)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@240
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 04:44:43 +0000 (04:44 +0000)]
Removed two more bogus "carriage return" references where the comments
were in fact talking about a line feed (a.k.a. newline, LF, ^J, \n, ...).
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@239
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 26 Oct 2003 04:39:27 +0000 (04:39 +0000)]
Fixed the buglet about failing to report the program's name on error-
messages. Please test. (Modified glutInit(), the state structure,
and the warn/err functions.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@238
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Thu, 23 Oct 2003 21:43:19 +0000 (21:43 +0000)]
Released 2.0.1
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@237
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Tue, 21 Oct 2003 11:41:54 +0000 (11:41 +0000)]
Added --disable-replace-glut option to autoconf configure.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@236
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Wed, 15 Oct 2003 09:25:32 +0000 (09:25 +0000)]
Noted the release of 2.0.0
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@234
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Wed, 15 Oct 2003 09:24:08 +0000 (09:24 +0000)]
Version bump
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@233
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Tue, 14 Oct 2003 00:51:00 +0000 (00:51 +0000)]
Swept the freeglut_font.c for comment cleanup:
* Got rid of the "rewrite C as English" comments.
* Corrected several bogus references to "carriage returns" (in strings).
The symbols were newlines or EOLs or LFs (\n).
They were *not* carriage returns or CRs (\r).
* Clarified the comments on glBitmap() calls.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@232
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 13 Oct 2003 22:54:10 +0000 (22:54 +0000)]
Small bug-fix that's been on my mind:
Modified the two Fractals* demos so that they only clear (for the random
one) or redraw (for the non-random one) if there is need to do so. (E.g.,
pressing the space bar should not clear and redraw the random fractal since
no parameters are altered.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@231
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 13 Oct 2003 22:36:27 +0000 (22:36 +0000)]
Removed the obsolete hack (or very ill-conceived dream), fgDisplayCursor().
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@230
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 13 Oct 2003 02:09:14 +0000 (02:09 +0000)]
Cleaned up some of the style issues (mostly "fluff" comments) in
freeglut_display.c.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@229
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 13 Oct 2003 02:03:09 +0000 (02:03 +0000)]
Comment-cleaning sweep.
Mostly got rid of the say-it-in-English comments that were adding 1 line
of English and 2 or 3 lines of filler for each of several lines of C code.
Updated a couple of other comments, and tweaked some white-space.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@228
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 13 Oct 2003 01:21:33 +0000 (01:21 +0000)]
Cleaned up the comments a bit in the callbacks.c file (mostly removed some
of the kill-4-lines-to-translate-one-line-of-C-into-English comments).
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@227
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sun, 12 Oct 2003 09:36:54 +0000 (09:36 +0000)]
Added all missing GLUT cursor types for X11.
(Type NONE is not properly supported, yet.)
Corrected behavior for the several old types:
* Wrong glyphs.
* Reversed glyphs (left/right confusion!)
There are some remaining imperfections, but it's a lot closer to
GLUT comformity, now.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@226
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sat, 11 Oct 2003 12:03:34 +0000 (12:03 +0000)]
Three tidying-up changes to the code of freeglut_callbacks.c;
none of them are Earth-shattering, but as I swept through
looking somewhat more systematically for errors, I picked
these off. See the diff's for details.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@225
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sat, 11 Oct 2003 11:36:11 +0000 (11:36 +0000)]
Fixed a basic readability/style error in the code. (Two statements per
line are almost never a good idea; in this case the combined line was
past 80 columns.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@224
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sat, 11 Oct 2003 11:21:27 +0000 (11:21 +0000)]
Added a safety-check on a memory allocation. (Timers were using
dynamic memory allocation but NOT checking the result!)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@223
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sat, 11 Oct 2003 11:13:23 +0000 (11:13 +0000)]
Committed two lines from John to help fix the menus a bit.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@222
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Sat, 11 Oct 2003 07:44:02 +0000 (07:44 +0000)]
Check the glutDisplayFunc() callback for being a NULL pointer. This is
illegal and is disallowed in GLUT 3.0+, so we disallow it too in
freeglut 2.0.1+
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@221
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 9 Oct 2003 16:34:23 +0000 (16:34 +0000)]
Applied John's updated ReadConfigFile() changes to the fractals demos.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@220
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 9 Oct 2003 03:05:40 +0000 (03:05 +0000)]
Fixed:
* glutInit() ordering w.r.t. glutInit*() and {argv} processing.
* Aspect ratio.
* Removed depth-buffer usage. (Also done for Fractals in previous
commit...)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@219
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Thu, 9 Oct 2003 03:00:04 +0000 (03:00 +0000)]
A few minor changes:
* glutInit*() calls should preceed glutInit(), per se, generally.
This is so that glutInit()'s configuration (which picks up on user
parameters) can override application defaults.
* glutInit() should be called before ANY attempt to process {argv, argc}.
This is because there may be GLUT/freeglut parameters (such as
"-display" on X11).
* If the window is tall and skinny, rather than short and squat, we need
to handle aspect ratios differently.
The first is a user-interface bug. The second is a serious bug (especially
since the demo assumes that argv[1] contains a filename). The third is a
display bug.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@218
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 8 Oct 2003 20:17:10 +0000 (20:17 +0000)]
Changed CreateNotify (in X11 ONLY) to act like a ConfigureNotify event.
This is done so that subwindows on X11 will get "resize" events when
they are created. Old GLUT did this---presumably by design in order
to ensure that (a) All windows get notified of their size as soon as
the window exists, and (b) probably more importantly, so that windows
and sub-windows behave as much alike as possible. I believe that GLUT
was right to do this, and I believe that compatibility requires this
(I have a sample program that breaks in freeglut but not GLUT without
this fix).
I did not touch the Microsoft side, because I don't know what their
OS does---nor if old GLUT was historically system-dependant about this.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@217
7f0cb862-5218-0410-a997-
914c9d46530a
Eric Sandall [Wed, 8 Oct 2003 19:17:07 +0000 (19:17 +0000)]
freeglut_menu.c:217,519,532: Fix menus to stay in the window (John Fay)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@216
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 8 Oct 2003 16:04:58 +0000 (16:04 +0000)]
Several updates from John and myself.
The broad outlines are:
* Color schemes are now in variables, are closer to old GLUT, and
are system dependant (as old GLUT did).
* You can change the font to any bitmapped font more easily, which
can aid in finding a better approximation. (Old GLUT does not seem
to have used a GLUT font for the menus, which causes problems for
us.) The menus rescale automatically, including the triangle "arrow"
for sub-menus.
* Menus have real borders, and the placement of highlighting is
much improved.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@215
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 8 Oct 2003 00:24:33 +0000 (00:24 +0000)]
Fixed a bug in the menu callback behavior. Menus were not setting the
current window correctly.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@214
7f0cb862-5218-0410-a997-
914c9d46530a
Eric Sandall [Mon, 6 Oct 2003 16:27:53 +0000 (16:27 +0000)]
freeglut_menu.c:328 Fix submenu triangle (John Fay)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@213
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 4 Oct 2003 15:06:42 +0000 (15:06 +0000)]
Tweaking for menu behavior in Linux regarding mouse whatnot - John Fay
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@212
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 1 Oct 2003 16:30:25 +0000 (16:30 +0000)]
Applied a patch from "extraeme@netbsd.org" to add joystick support.
Untested, but it compiles for me.
Should also add Joystick support for older FreeBSD systems. Also
untested.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@211
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 1 Oct 2003 15:01:58 +0000 (15:01 +0000)]
Added support for more arbitrary number of mouse buttons (though only the
first three can work with menus), in X. This closes a compatibility gap
with old GLUT, and leaves us the option of supporting scroll-wheels
properly.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@210
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Sat, 27 Sep 2003 12:29:03 +0000 (12:29 +0000)]
Don't install the demos.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@208
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Fri, 26 Sep 2003 18:44:06 +0000 (18:44 +0000)]
Package the demos.dsw file.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@207
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Fri, 26 Sep 2003 18:43:12 +0000 (18:43 +0000)]
Demos workspace for MSVC users
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@206
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Wed, 24 Sep 2003 06:26:36 +0000 (06:26 +0000)]
Corrected a bug w.r.t. display and joystick events. When getting ready
to sleep, we need to go through ALL windows to check for pending joysticks
and to check for pending redisplays. I was just going through all TOP-
LEVEL windows. Eeek. This won't do.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@205
7f0cb862-5218-0410-a997-
914c9d46530a
Brian Paul [Tue, 23 Sep 2003 14:17:13 +0000 (14:17 +0000)]
added needClear flag to take care of initial window clear and window resize clears
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@204
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Tue, 23 Sep 2003 01:08:16 +0000 (01:08 +0000)]
Per Nigel Stewart's comments, converted
#ifdef TARGET_HOST_...
to:
#if TARGET_HOST_...
in src/freeglut_init.c. These changes should not have any functional
impact at this time, but you don't want bad examples lying around to
trip people up later.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@203
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Tue, 23 Sep 2003 01:03:41 +0000 (01:03 +0000)]
Fixed:
* GLUT_SINGLE now should behave more or less correctly.
Thanks to Brian Paul!
* Sleeping is now cognizant of outstanding redisplays.
* Fractals_random has been restored more or less to as-before, save that
it uses the more minimal glFlush() rather than glutSwapBuffers().
glutSwapBuffers() was only required when freeglut was incorrectly
handling promotion to double-buffering.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@202
7f0cb862-5218-0410-a997-
914c9d46530a
Richard Rauch [Mon, 22 Sep 2003 19:01:55 +0000 (19:01 +0000)]
Moved the #include/#ifdef/#define stuff up to the top.
Changed #ifdef to #if, per Nigel(?)'s comment. Ooops.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@201
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Mon, 22 Sep 2003 17:40:55 +0000 (17:40 +0000)]
Fix to allow demos to compile before freeglut has been installed.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@200
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Mon, 22 Sep 2003 11:30:33 +0000 (11:30 +0000)]
Add an idle function to ensure that the screen gets drawn even when callbacks are not generated by the mouse/keyboard.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@199
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sun, 21 Sep 2003 13:47:36 +0000 (13:47 +0000)]
Note the possible buffer overflow in window_title
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@198
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sun, 21 Sep 2003 13:36:43 +0000 (13:36 +0000)]
Fix the window title.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@197
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sun, 21 Sep 2003 13:35:36 +0000 (13:35 +0000)]
Fix window title, and ensure that the random integer is not forced to be zero (Thanks Richard Rauch!)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@196
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 20 Sep 2003 19:11:17 +0000 (19:11 +0000)]
Richard Rauch's patch to ensure that freeglut does not use 100% CPU even while idling.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@195
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 20 Sep 2003 16:18:01 +0000 (16:18 +0000)]
Resolution for bug 809561 reported by Nigel Stewart, regarding a possible array underflow error of -1 in the event of "character" being zero.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@194
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Sun, 14 Sep 2003 17:00:28 +0000 (17:00 +0000)]
Removed unused AC_PROG_RANLIB from configure.in
Added passing of $(X_CFLAGS) to compiler.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@193
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sun, 14 Sep 2003 16:00:24 +0000 (16:00 +0000)]
Resolve bug 806008 -- let Microsoft's compiler know to use Windows libraries even if not using our project files.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@192
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 16:24:46 +0000 (16:24 +0000)]
Taking care of keeping things mostly up-to-date
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@191
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 16:09:22 +0000 (16:09 +0000)]
Most everything's been resolved for the 2.0.0 release.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@190
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 15:48:21 +0000 (15:48 +0000)]
Thierry Thomas said that FreeBSD has no machine/joystick.h, instead a sys/joystick.h. I've made the change -- here's hoping it works.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@189
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 13:38:04 +0000 (13:38 +0000)]
Removed the incorrect relative path for including freeglut.h
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@188
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 13:29:35 +0000 (13:29 +0000)]
Made all demos compile. Thanks to Thierry Thomas for reporting bug 802809, which alerted that *none* of the demos compiled automatically!
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@187
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 13:12:26 +0000 (13:12 +0000)]
Nigel Stewart's joystick fix (for hopefully all platforms), SourceForge bug 805481
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@186
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 13:09:06 +0000 (13:09 +0000)]
Fix location of the include files from a fixed to relative path. Closes bug 805477
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@185
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Sat, 13 Sep 2003 13:03:30 +0000 (13:03 +0000)]
Add dos line endings. Fixes bug 805476
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@184
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Wed, 10 Sep 2003 22:33:39 +0000 (22:33 +0000)]
A minor fix to that last commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@183
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Wed, 10 Sep 2003 22:30:29 +0000 (22:30 +0000)]
Removed some remaining glib depandancy.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@182
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Wed, 10 Sep 2003 15:46:12 +0000 (15:46 +0000)]
Re-add catches for the case in which a menu callback destroys the menu. - John Fay
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@181
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Tue, 9 Sep 2003 17:50:31 +0000 (17:50 +0000)]
More to fix a deinitialization related crash.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@180
7f0cb862-5218-0410-a997-
914c9d46530a
Christopher John Purnell [Tue, 9 Sep 2003 17:40:53 +0000 (17:40 +0000)]
Fix for a deinitialization related crash.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@179
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Mon, 8 Sep 2003 20:36:23 +0000 (20:36 +0000)]
Menus should deallocate better now - John Fay
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@178
7f0cb862-5218-0410-a997-
914c9d46530a
J.C. Jones [Fri, 5 Sep 2003 20:21:50 +0000 (20:21 +0000)]
Add freeglut_static.dsp to the releases
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@177
7f0cb862-5218-0410-a997-
914c9d46530a