Commit Graph

1759 Commits

Author SHA1 Message Date
cjp
2682a53352 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: https://svn.code.sf.net/p/freeglut/code/trunk@266 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 23:01:56 +00:00
cjp
1ac66fba61 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: https://svn.code.sf.net/p/freeglut/code/trunk@265 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 18:19:17 +00:00
rkrolib
3d344ad2de 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: https://svn.code.sf.net/p/freeglut/code/trunk@264 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 18:05:48 +00:00
rkrolib
1b7f3df686 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: https://svn.code.sf.net/p/freeglut/code/trunk@263 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 17:44:42 +00:00
rkrolib
126e447121 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: https://svn.code.sf.net/p/freeglut/code/trunk@262 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 17:29:10 +00:00
rkrolib
faf725fe15 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: https://svn.code.sf.net/p/freeglut/code/trunk@261 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 07:49:59 +00:00
rkrolib
4078f9a7a9 Deleted a bunch of say-nothing-new comments. Someday, there shall
be an end to them.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@260 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 07:18:10 +00:00
rkrolib
b46806dc31 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: https://svn.code.sf.net/p/freeglut/code/trunk@259 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 07:13:55 +00:00
rkrolib
2abe3abee5 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: https://svn.code.sf.net/p/freeglut/code/trunk@258 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 06:57:07 +00:00
rkrolib
3365de2c4a 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: https://svn.code.sf.net/p/freeglut/code/trunk@257 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 06:43:32 +00:00
rkrolib
9da07cd41f * 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: https://svn.code.sf.net/p/freeglut/code/trunk@256 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-29 06:40:51 +00:00
rkrolib
4672072aa7 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: https://svn.code.sf.net/p/freeglut/code/trunk@255 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-28 20:17:39 +00:00
rkrolib
12bdb86d17 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: https://svn.code.sf.net/p/freeglut/code/trunk@254 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-28 19:37:09 +00:00
rkrolib
6096e031d5 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: https://svn.code.sf.net/p/freeglut/code/trunk@253 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 15:38:14 +00:00
rkrolib
e4937ca1da Cleaned up a little redundancy in a comment on the {menu_pen_*} variables.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@252 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 13:51:35 +00:00
rkrolib
ffdfeec61e Removed about 90 lines of say-nothing-new comments.
The code should be functionally unaltered by these changes.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@251 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 13:47:55 +00:00
rkrolib
09d6d7342e 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: https://svn.code.sf.net/p/freeglut/code/trunk@250 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 06:39:57 +00:00
rkrolib
763b02a955 Cosmetic changes (mostly deleted a few more say-nothing-new comments).
The functionality of the code should be unchanged.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@249 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 05:45:48 +00:00
rkrolib
914a40acb4 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: https://svn.code.sf.net/p/freeglut/code/trunk@248 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 05:36:29 +00:00
rkrolib
f5a588101e 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: https://svn.code.sf.net/p/freeglut/code/trunk@247 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 05:32:14 +00:00
rkrolib
b906986ac4 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: https://svn.code.sf.net/p/freeglut/code/trunk@246 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 05:12:09 +00:00
rkrolib
4eeaaaa08c 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: https://svn.code.sf.net/p/freeglut/code/trunk@245 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-27 05:03:31 +00:00
rkrolib
09723d91eb 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: https://svn.code.sf.net/p/freeglut/code/trunk@244 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 06:13:50 +00:00
rkrolib
9f78016727 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: https://svn.code.sf.net/p/freeglut/code/trunk@243 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 05:59:15 +00:00
rkrolib
1ea15ad9e1 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: https://svn.code.sf.net/p/freeglut/code/trunk@242 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 05:44:07 +00:00
rkrolib
9464f61d1f 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: https://svn.code.sf.net/p/freeglut/code/trunk@241 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 05:38:12 +00:00
rkrolib
14801c8908 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: https://svn.code.sf.net/p/freeglut/code/trunk@240 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 05:19:02 +00:00
rkrolib
6f7dc9821f 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: https://svn.code.sf.net/p/freeglut/code/trunk@239 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 04:44:43 +00:00
rkrolib
04c6d13777 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: https://svn.code.sf.net/p/freeglut/code/trunk@238 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-26 04:39:27 +00:00
puggles
fb3db77b9a Released 2.0.1
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@237 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-23 21:43:19 +00:00
cjp
f0f690766a Added --disable-replace-glut option to autoconf configure.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@236 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-21 11:41:54 +00:00
puggles
3a34c44f10 Noted the release of 2.0.0
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@234 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-15 09:25:32 +00:00
puggles
fcd6068be5 Version bump
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@233 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-15 09:24:08 +00:00
rkrolib
ba4ef53738 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: https://svn.code.sf.net/p/freeglut/code/trunk@232 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-14 00:51:00 +00:00
rkrolib
fd81891b21 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: https://svn.code.sf.net/p/freeglut/code/trunk@231 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-13 22:54:10 +00:00
rkrolib
6e00dab2da Removed the obsolete hack (or very ill-conceived dream), fgDisplayCursor().
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@230 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-13 22:36:27 +00:00
rkrolib
231ad89777 Cleaned up some of the style issues (mostly "fluff" comments) in
freeglut_display.c.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@229 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-13 02:09:14 +00:00
rkrolib
8e6aba17a4 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: https://svn.code.sf.net/p/freeglut/code/trunk@228 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-13 02:03:09 +00:00
rkrolib
20373fe203 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: https://svn.code.sf.net/p/freeglut/code/trunk@227 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-13 01:21:33 +00:00
rkrolib
1d59d1a43c 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: https://svn.code.sf.net/p/freeglut/code/trunk@226 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-12 09:36:54 +00:00
rkrolib
0f0b50c51c 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: https://svn.code.sf.net/p/freeglut/code/trunk@225 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-11 12:03:34 +00:00
rkrolib
57351b4682 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: https://svn.code.sf.net/p/freeglut/code/trunk@224 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-11 11:36:11 +00:00
rkrolib
a2a78f13a1 Added a safety-check on a memory allocation. (Timers were using
dynamic memory allocation but NOT checking the result!)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@223 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-11 11:21:27 +00:00
rkrolib
8cad52a9c1 Committed two lines from John to help fix the menus a bit.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@222 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-11 11:13:23 +00:00
rkrolib
2dc7f60b59 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: https://svn.code.sf.net/p/freeglut/code/trunk@221 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-11 07:44:02 +00:00
rkrolib
45899e5ed9 Applied John's updated ReadConfigFile() changes to the fractals demos.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@220 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-09 16:34:23 +00:00
rkrolib
25545149da 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: https://svn.code.sf.net/p/freeglut/code/trunk@219 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-09 03:05:40 +00:00
rkrolib
8bde679512 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: https://svn.code.sf.net/p/freeglut/code/trunk@218 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-09 03:00:04 +00:00
rkrolib
30d1e165a0 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: https://svn.code.sf.net/p/freeglut/code/trunk@217 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-08 20:17:10 +00:00
sandalle
65f88a4dc4 freeglut_menu.c:217,519,532: Fix menus to stay in the window (John Fay)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@216 7f0cb862-5218-0410-a997-914c9d46530a
2003-10-08 19:17:07 +00:00