freeglut
11 years agonormalizing line endings..
Diederick Niehorster [Tue, 19 Mar 2013 16:34:21 +0000 (16:34 +0000)]
normalizing line endings..

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

11 years agoadded some beginner notes for compiling through cmake on Unix
Diederick Niehorster [Tue, 19 Mar 2013 14:50:44 +0000 (14:50 +0000)]
added some beginner notes for compiling through cmake on Unix

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

11 years agonote on use of gluint/glushort in fg_geometry
Diederick Niehorster [Tue, 19 Mar 2013 10:23:18 +0000 (10:23 +0000)]
note on use of gluint/glushort in fg_geometry

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

11 years ago- another strdup
Diederick Niehorster [Sun, 17 Mar 2013 14:01:46 +0000 (14:01 +0000)]
- another strdup
- windows only opened in iconic state if its a non-gamemode, non-menu toplevel window
- depending on whether window is iconic or not glutSetWindowTitle or glutSetIconTitle call should have immediate effect on windows

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

11 years agostrdup instead of malloc/strcpy
Diederick Niehorster [Sun, 17 Mar 2013 09:09:41 +0000 (09:09 +0000)]
strdup instead of malloc/strcpy

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

11 years agosmall comment fix (this was not todo, we're not leaking memory here)
Diederick Niehorster [Sat, 16 Mar 2013 15:46:39 +0000 (15:46 +0000)]
small comment fix (this was not todo, we're not leaking memory here)

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

11 years agoon windows too: call resize callback only in response to WM message
Diederick Niehorster [Wed, 6 Mar 2013 09:27:18 +0000 (09:27 +0000)]
on windows too: call resize callback only in response to WM message
(yes, on both platform we now don't have an initial resize callback call, it'll be back later)

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

11 years agogamemode: just go fullscreen
Diederick Niehorster [Wed, 6 Mar 2013 09:17:52 +0000 (09:17 +0000)]
gamemode: just go fullscreen

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

11 years agonow have a default reshape callback function that is used if the user didn't set...
Diederick Niehorster [Wed, 6 Mar 2013 09:17:13 +0000 (09:17 +0000)]
now have a default reshape callback function that is used if the user didn't set any, instead of having what to do spread out over the code

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

11 years agofghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindo...
Diederick Niehorster [Wed, 6 Mar 2013 03:51:01 +0000 (03:51 +0000)]
fghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindows first if we have already found a window with pending redisplay

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

11 years agocomment on timer checking, are timers always sorted by triggertime? Else the code...
Diederick Niehorster [Wed, 6 Mar 2013 03:50:14 +0000 (03:50 +0000)]
comment on timer checking, are timers always sorted by triggertime? Else the code is wrong...

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

11 years agojoystick:
Diederick Niehorster [Wed, 6 Mar 2013 03:39:00 +0000 (03:39 +0000)]
joystick:
- only poll joysticks if we have an active joystick
- active joystick is defined as having callback and having positive (NON-ZERO!) pollInterval, as per GLUT sources
- use fgState.NumActiveJoysticks instead of fghHaveJoystick to save bunch of unnecessary function calls etc
- fghcbCheckJoystickPolls more concervative, per window we first check if a joystick is active (per above definition)

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

11 years agofghSleepForEvents immediately returns if we have an idle callback, so simply don...
Diederick Niehorster [Tue, 5 Mar 2013 17:08:32 +0000 (17:08 +0000)]
fghSleepForEvents immediately returns if we have an idle callback, so simply don't call the function at all if we just processed the idle callback

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

11 years agoerror when entering main loop with no windows defined, as GLUT does
Diederick Niehorster [Mon, 4 Mar 2013 16:27:00 +0000 (16:27 +0000)]
error when entering main loop with no windows defined, as GLUT does

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

11 years agoif user opens menu in parent window and then clicked child window, the menu wasn...
Diederick Niehorster [Mon, 4 Mar 2013 10:18:35 +0000 (10:18 +0000)]
if user opens menu in parent window and then clicked child window, the menu wasn't closed. Fixed (and some cleanup)

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

11 years agoMenuStatusCallback when menu was closed did not return location of pointer relative...
Diederick Niehorster [Mon, 4 Mar 2013 09:54:55 +0000 (09:54 +0000)]
MenuStatusCallback when menu was closed did not return location of pointer relative to child window's top-left, it only worked for top level windows.
To make this work, fghPlatformGetCursorPos now can return cursor pos relative to top-left of a specified window's client area (this is untested on X11)

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

11 years agocallign entryfunc should not steal the current window, so save before calling and...
Diederick Niehorster [Mon, 4 Mar 2013 09:25:15 +0000 (09:25 +0000)]
callign entryfunc should not steal the current window, so save before calling and restore after callback returns

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

11 years agohandling of mouse messages more conform docs, some cleanup
Diederick Niehorster [Mon, 4 Mar 2013 09:17:03 +0000 (09:17 +0000)]
handling of mouse messages more conform docs, some cleanup

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

11 years agomissed the windowproc return value
Diederick Niehorster [Fri, 1 Mar 2013 18:43:22 +0000 (18:43 +0000)]
missed the windowproc return value

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

11 years agoWM_PAINT more conform to docs
Diederick Niehorster [Fri, 1 Mar 2013 18:28:55 +0000 (18:28 +0000)]
WM_PAINT more conform to docs

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

11 years agosome cleanup: on window creation, don't have to zero variables that
Diederick Niehorster [Fri, 1 Mar 2013 17:22:34 +0000 (17:22 +0000)]
some cleanup: on window creation, don't have to zero variables that
already set to zero by calloc
in windowproc, don't have handlers that only forward the message to
defwindowproc

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

11 years agoimplemented glutSetIconTitle that works on win32, when a window is
Diederick Niehorster [Fri, 1 Mar 2013 17:20:47 +0000 (17:20 +0000)]
implemented glutSetIconTitle that works on win32, when a window is
minimized, its title is now changed, and changed back when it is restored

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

11 years agofixed up handling of WM_MOUSEWHEEL, low order of wParam is not the mouse
Diederick Niehorster [Fri, 1 Mar 2013 15:42:26 +0000 (15:42 +0000)]
fixed up handling of WM_MOUSEWHEEL, low order of wParam is not the mouse
wheel number, but indicates which virtual keys are pressed during the
scroll wheel motion

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

11 years agoVisibility functions better implemented now. All goes through
Diederick Niehorster [Fri, 1 Mar 2013 10:31:34 +0000 (10:31 +0000)]
Visibility functions better implemented now. All goes through
WM_SHOWWINDOW except for a newly created window (WM_SHOWWINDOW is too
early for callback then). I now have a state variable that indicates
whether visibility has been notified yet for a new window. This
notification gets done just before the window is first drawn. This
removes the need for fgPlatformMainLoopPreliminaryWork on windows, and
it also works for windows created when the mainloop is already running

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

11 years agocomment on implementation of window status callback
Diederick Niehorster [Fri, 1 Mar 2013 07:43:48 +0000 (07:43 +0000)]
comment on implementation of window status callback

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

11 years agosimplified some window rect calculations
Diederick Niehorster [Fri, 1 Mar 2013 07:41:23 +0000 (07:41 +0000)]
simplified some window rect calculations

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

11 years agodocument coordinates returned by glutPositionFunc, other doc
Diederick Niehorster [Fri, 1 Mar 2013 07:15:20 +0000 (07:15 +0000)]
document coordinates returned by glutPositionFunc, other doc
improvements regarding docs

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

11 years agoupdated docs for fgPlatformMainLoopPreliminaryWork
Diederick Niehorster [Fri, 1 Mar 2013 06:50:15 +0000 (06:50 +0000)]
updated docs for fgPlatformMainLoopPreliminaryWork

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

11 years agoimplemented somewhat better visibility/windowstatus support, some small
Diederick Niehorster [Fri, 1 Mar 2013 05:53:51 +0000 (05:53 +0000)]
implemented somewhat better visibility/windowstatus support, some small
cleanup

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

11 years agolibrary should call window status func at all times, translation to
Diederick Niehorster [Fri, 1 Mar 2013 03:08:05 +0000 (03:08 +0000)]
library should call window status func at all times, translation to
visibility callback happens if needed. Documented this, and added notes
on visibility/windowstatus func in callbackmaker demo

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

11 years agomade fghVisibility more intuitive, documented glutVisibilityfunc and
Diederick Niehorster [Fri, 1 Mar 2013 02:42:14 +0000 (02:42 +0000)]
made fghVisibility more intuitive, documented glutVisibilityfunc and
glutWindowStatusFunc

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

11 years agofiles for demoing GLUT_ICON
Diederick Niehorster [Thu, 28 Feb 2013 17:40:45 +0000 (17:40 +0000)]
files for demoing GLUT_ICON

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

11 years agofixed documentation for GLUT_ICON (its not an environment variable, but
Diederick Niehorster [Thu, 28 Feb 2013 13:40:28 +0000 (13:40 +0000)]
fixed documentation for GLUT_ICON (its not an environment variable, but
an identifier for a resource file) and added an example of it for the
One demo

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

11 years agoimplemented GLUT_WINDOW_STENCIL_SIZE and GLUT_WINDOW_BUFFER_SIZE for glutGet
Diederick Niehorster [Thu, 28 Feb 2013 08:53:31 +0000 (08:53 +0000)]
implemented GLUT_WINDOW_STENCIL_SIZE and GLUT_WINDOW_BUFFER_SIZE for glutGet

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

11 years agoNo need to handle WM_CANCELMODE, defwindowproc takes care of it
Diederick Niehorster [Wed, 27 Feb 2013 12:11:33 +0000 (12:11 +0000)]
No need to handle WM_CANCELMODE, defwindowproc takes care of it
(releasing capture), and we have WM_CAPTURECHANGED to make sure our
application is in consistent state

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

11 years agoupdated README to point to README.cmake for building
Diederick Niehorster [Wed, 27 Feb 2013 12:07:26 +0000 (12:07 +0000)]
updated README to point to README.cmake for building

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

11 years agonow that mouse capture was properly implemented, menus could be opened
Diederick Niehorster [Wed, 27 Feb 2013 11:36:14 +0000 (11:36 +0000)]
now that mouse capture was properly implemented, menus could be opened
outside the window when the window had capture because another mouse
button was depressed. fixed
Also implemented WM_CANCELMODE, which could be important as we should
cancel capture when it comes in

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

11 years agoMousemotion events now generated outside the window until all mouse
Diederick Niehorster [Wed, 27 Feb 2013 10:46:13 +0000 (10:46 +0000)]
Mousemotion events now generated outside the window until all mouse
buttons released, as is done on X11 (according to comments i now
deleted)

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

11 years agofgDeactivateMenu could sometimes be called twice on the same menu, avoid
Diederick Niehorster [Wed, 27 Feb 2013 10:29:24 +0000 (10:29 +0000)]
fgDeactivateMenu could sometimes be called twice on the same menu, avoid
crash in that situation

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

11 years agoGLUT_CURSOR_INHERIT now works, also implemented another cursor
Diederick Niehorster [Wed, 27 Feb 2013 09:35:38 +0000 (09:35 +0000)]
GLUT_CURSOR_INHERIT now works, also implemented another cursor

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

11 years agoshould return zero after processing any of the mouse button down or up
Diederick Niehorster [Wed, 27 Feb 2013 08:18:09 +0000 (08:18 +0000)]
should return zero after processing any of the mouse button down or up
events

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

11 years agoOnly do mouse tracking for EntryFunc if user specified an entryfunc
Diederick Niehorster [Wed, 27 Feb 2013 08:06:24 +0000 (08:06 +0000)]
Only do mouse tracking for EntryFunc if user specified an entryfunc

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

11 years agoNow implemented properly working mouse entry and exit (EntryFunc callback) support...
Diederick Niehorster [Wed, 27 Feb 2013 07:52:55 +0000 (07:52 +0000)]
Now implemented properly working mouse entry and exit (EntryFunc callback) support on windows

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

11 years agodemo glutSetCursor
Diederick Niehorster [Wed, 27 Feb 2013 07:07:55 +0000 (07:07 +0000)]
demo glutSetCursor

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

11 years agoSimplified fghWindowUnderCursor, cleane dup code
Diederick Niehorster [Wed, 27 Feb 2013 07:01:43 +0000 (07:01 +0000)]
Simplified fghWindowUnderCursor, cleane dup code

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

11 years agoOnly check for child window when needed, some cleanup
Diederick Niehorster [Wed, 27 Feb 2013 06:18:20 +0000 (06:18 +0000)]
Only check for child window when needed, some cleanup

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

11 years agoWM_SETFOCUS should not change focus to child instead, then all input goes to child...
Diederick Niehorster [Wed, 27 Feb 2013 06:11:51 +0000 (06:11 +0000)]
WM_SETFOCUS should not change focus to child instead, then all input goes to child even if it should go to parent. Mousewheel needed to check if actually in child, other mouse action (move, press) are automatically passed to child

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

11 years agoUse GetMessagePos, not GetCursorPos to make sure we get the right mouse position...
Diederick Niehorster [Wed, 27 Feb 2013 05:58:56 +0000 (05:58 +0000)]
Use GetMessagePos, not GetCursorPos to make sure we get the right mouse position. Also, no need to get mouse position at time of keypress, every mouse movement before the keypress is processed in an earlier WM_MOUSE message already, so mouse position in the window state is all we need.

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

11 years agoclean up glutSetKeyRepeat function body
Diederick Niehorster [Wed, 27 Feb 2013 04:44:14 +0000 (04:44 +0000)]
clean up glutSetKeyRepeat function body

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

11 years agoAdded subwindows to CallbackMaker demo, for testing and demonstration. Also figured...
Diederick Niehorster [Wed, 27 Feb 2013 04:36:48 +0000 (04:36 +0000)]
Added subwindows to CallbackMaker demo, for testing and demonstration. Also figured out how key repeat's global and per-window flags are supposed to interact, documented and demonstrated it.

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

11 years agoadded modifier key status to callbackmaker output, also added entryfunc
Diederick Niehorster [Wed, 27 Feb 2013 03:58:05 +0000 (03:58 +0000)]
added modifier key status to callbackmaker output, also added entryfunc

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

11 years agoreworked fullscreen code based on implementation of Chromium. can now handle/restore...
Diederick Niehorster [Tue, 26 Feb 2013 16:49:19 +0000 (16:49 +0000)]
reworked fullscreen code based on implementation of Chromium. can now handle/restore windows in maximized state and no longer uses WS_POPUP.

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

11 years agosubwin demo now has a grandchild (subwin in subwin) for testing
Diederick Niehorster [Tue, 26 Feb 2013 16:14:41 +0000 (16:14 +0000)]
subwin demo now has a grandchild (subwin in subwin) for testing

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

11 years agosome msgs only sent to parent window, find child under cursor. This before only searc...
Diederick Niehorster [Tue, 26 Feb 2013 16:13:09 +0000 (16:13 +0000)]
some msgs only sent to parent window, find child under cursor. This before only search for childs of the parent, not grandchilds or more derived. Fixed

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

11 years agobetter name for key up/down function
Diederick Niehorster [Tue, 26 Feb 2013 15:21:34 +0000 (15:21 +0000)]
better name for key up/down function

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

11 years agowin API docs say that defWndProc must be called for system keydown/keyup
Diederick Niehorster [Tue, 26 Feb 2013 15:20:18 +0000 (15:20 +0000)]
win API docs say that defWndProc must be called for system keydown/keyup

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

11 years agowin32: updating keyboard down/up handling. Split off to own function that deals with...
Diederick Niehorster [Tue, 26 Feb 2013 15:05:41 +0000 (15:05 +0000)]
win32: updating keyboard down/up handling. Split off to own function that deals with both down and up to reduce code duplication. Also only get async keystate to see if left or right alt, control, shift is pressed/released when a press on one of these is detected in the first place, not with every message that comes in.

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

11 years agomoving fgPlatformReshapeWindow and fgPlatformDisplayWindow from fg_main_x to fg_windo...
Diederick Niehorster [Wed, 13 Feb 2013 10:28:26 +0000 (10:28 +0000)]
moving fgPlatformReshapeWindow and fgPlatformDisplayWindow from fg_main_x to fg_window_x. Hope this didn't break anything for X11 or andriod

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

11 years agonow have 64bit internal time on Windows, as we deal with wrap of timeGetTime manually
Diederick Niehorster [Sat, 9 Feb 2013 11:59:32 +0000 (11:59 +0000)]
now have 64bit internal time on Windows, as we deal with wrap of timeGetTime manually

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

11 years agocan now configure build such that runtime warnings and/or errors occuring in lib...
Diederick Niehorster [Sun, 27 Jan 2013 12:38:28 +0000 (12:38 +0000)]
can now configure build such that runtime warnings and/or errors occuring in lib are not printed to stderr (thanks Nigel Steward)

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

11 years agosmoothgl3 and shapes demos, now checking if glutGetProcAddress calls give us valid...
Diederick Niehorster [Sun, 27 Jan 2013 11:56:32 +0000 (11:56 +0000)]
smoothgl3 and shapes demos, now checking if glutGetProcAddress calls give us valid function pointers

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

11 years agoMake CTRL and SHIFT arrive properly in single (as opposed to MultiButton) mouse event...
Diederick Niehorster [Thu, 17 Jan 2013 14:53:30 +0000 (14:53 +0000)]
Make CTRL and SHIFT arrive properly in single (as opposed to MultiButton) mouse events, thanks Philipp!

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

11 years agofixed closing window crash, thanks Philipp!
Diederick Niehorster [Thu, 17 Jan 2013 14:51:25 +0000 (14:51 +0000)]
fixed closing window crash, thanks Philipp!

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

11 years agooops, debug code that shouldn't have been committed got in there...
Diederick Niehorster [Thu, 17 Jan 2013 14:46:22 +0000 (14:46 +0000)]
oops, debug code that shouldn't have been committed got in there...

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

11 years agoUpdating last edit time and FreeGLUT version for API document
Diederick Niehorster [Thu, 17 Jan 2013 14:33:54 +0000 (14:33 +0000)]
Updating last edit time and FreeGLUT version for API document

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

11 years agoavoid crash on null temp_window, thanks Phillip Kutin!
Diederick Niehorster [Tue, 18 Dec 2012 05:19:21 +0000 (05:19 +0000)]
avoid crash on null temp_window, thanks Phillip Kutin!

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

11 years agoremoved unnecessary token pasting (##) preprocessor directives that blew
Diederick Niehorster [Tue, 18 Dec 2012 05:13:42 +0000 (05:13 +0000)]
removed unnecessary token pasting (##) preprocessor directives that blew
up some builds. thanks Phillip Kutin!

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

11 years agokicking out the FGCBSelect function prototype that has been here since
Diederick Niehorster [Sat, 24 Nov 2012 01:18:34 +0000 (01:18 +0000)]
kicking out the FGCBSelect function prototype that has been here since
the beginning of times (r3), but is not used anywhere and has no
equivalent in GLUT

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

11 years agoargh! commit 1485 was cut and paste instead of copy paste...
Diederick Niehorster [Fri, 23 Nov 2012 10:35:24 +0000 (10:35 +0000)]
argh! commit 1485 was cut and paste instead of copy paste...

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

11 years agotiny cosmetics in resizer demo
Diederick Niehorster [Fri, 23 Nov 2012 09:43:18 +0000 (09:43 +0000)]
tiny cosmetics in resizer demo

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

11 years agothat was too quick, fgStructure.CurrentWindow can be NULL when glutGetting window
Diederick Niehorster [Fri, 23 Nov 2012 09:42:54 +0000 (09:42 +0000)]
that was too quick, fgStructure.CurrentWindow can be NULL when glutGetting window
width or height

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

11 years agoGLUT_WINDOW_WIDTH and GLUT_WINDOW_HEIGHT can simply be gotten from the
Diederick Niehorster [Fri, 23 Nov 2012 09:31:52 +0000 (09:31 +0000)]
GLUT_WINDOW_WIDTH and GLUT_WINDOW_HEIGHT can simply be gotten from the
window's state. This also simplifies GLUT_WINDOW_X and GLUT_WINDOW_Y a
lot

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

11 years agoprevent resize callback (and indeed the whole resizing logic) from getting
Diederick Niehorster [Fri, 23 Nov 2012 09:30:57 +0000 (09:30 +0000)]
prevent resize callback (and indeed the whole resizing logic) from getting
called twice

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

11 years agotimer func now changes two colors alternatingly, using multiple active
Diederick Niehorster [Fri, 23 Nov 2012 08:40:13 +0000 (08:40 +0000)]
timer func now changes two colors alternatingly, using multiple active
timers

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

11 years agonicer output to terminal in Position callback
Diederick Niehorster [Fri, 23 Nov 2012 08:22:28 +0000 (08:22 +0000)]
nicer output to terminal in Position callback

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

11 years agonow providing new position of child relative to parent in the position
Diederick Niehorster [Fri, 23 Nov 2012 08:21:24 +0000 (08:21 +0000)]
now providing new position of child relative to parent in the position
callback
also need to set position func for the child window in the resizer demo

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

11 years agoresizer demo now uses timer to display window information
Diederick Niehorster [Fri, 23 Nov 2012 08:03:20 +0000 (08:03 +0000)]
resizer demo now uses timer to display window information

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

11 years agoremoved unnecessary calls to SetWindowPos when entering and leaving
Diederick Niehorster [Fri, 23 Nov 2012 07:51:10 +0000 (07:51 +0000)]
removed unnecessary calls to SetWindowPos when entering and leaving
fullscreen mode. This caused the Position callback to fire more than
necessary

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

11 years agoimplemented position callback on windows and some other minor edits
Diederick Niehorster [Fri, 23 Nov 2012 07:41:39 +0000 (07:41 +0000)]
implemented position callback on windows and some other minor edits

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

11 years agoprepared callbackmaker for testing position callback
Diederick Niehorster [Fri, 23 Nov 2012 07:06:57 +0000 (07:06 +0000)]
prepared callbackmaker for testing position callback

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

11 years agoused a macro to remove all the code repetition in fg_callbacks.c
Diederick Niehorster [Fri, 23 Nov 2012 06:55:52 +0000 (06:55 +0000)]
used a macro to remove all the code repetition in fg_callbacks.c

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

11 years agoadded glutPositionFunc callback, now just need to implement so it does
Diederick Niehorster [Fri, 23 Nov 2012 06:40:06 +0000 (06:40 +0000)]
added glutPositionFunc callback, now just need to implement so it does
something
For all callbacks now using function type definitions from
fg_internal.h.
Reorganized and cleaned up fg_callbacks.c so that there are no wrong
comments in there (timers are global, not per window) and so that all
global, per menu, and per window callbacks are grouped together

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

11 years agoadded WCB_Position callback in callback table (only so far), code for
Diederick Niehorster [Fri, 23 Nov 2012 05:26:36 +0000 (05:26 +0000)]
added WCB_Position callback in callback table (only so far), code for
zeroing callbacks upon window creation continues to work correctly

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

11 years agomore cleanup in callbackmaker demo, now showing best practice for
Diederick Niehorster [Thu, 22 Nov 2012 05:52:02 +0000 (05:52 +0000)]
more cleanup in callbackmaker demo, now showing best practice for
various callback. also added menustate/menustatus callbacks

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

11 years agocleaned up callback registering code in One demo, now its best practice
Diederick Niehorster [Thu, 22 Nov 2012 05:49:53 +0000 (05:49 +0000)]
cleaned up callback registering code in One demo, now its best practice

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

11 years agosome callback naming cosmetics as suggested in an old comment
Diederick Niehorster [Thu, 22 Nov 2012 05:27:19 +0000 (05:27 +0000)]
some callback naming cosmetics as suggested in an old comment

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

11 years agoextensive changes in callbackmaker: each of the two windows now has its
Diederick Niehorster [Thu, 22 Nov 2012 04:38:03 +0000 (04:38 +0000)]
extensive changes in callbackmaker: each of the two windows now has its
own events registered and displayed separately

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

11 years agonicely lining up the two windows for the callbackmaker demo, small other
Diederick Niehorster [Wed, 21 Nov 2012 08:30:47 +0000 (08:30 +0000)]
nicely lining up the two windows for the callbackmaker demo, small other
edit

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

11 years agonow using WHEEL_DELTA for mouse wheel processing, instead of a magic
Diederick Niehorster [Wed, 21 Nov 2012 05:15:31 +0000 (05:15 +0000)]
now using WHEEL_DELTA for mouse wheel processing, instead of a magic
number

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

11 years agowrote macro for the special key checks (shift, alt, ctrl) to
Diederick Niehorster [Wed, 21 Nov 2012 04:18:32 +0000 (04:18 +0000)]
wrote macro for the special key checks (shift, alt, ctrl) to
significantly reduce code length (and it was copy-paste code anyway)

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

11 years agosmall enhancement to Callbackmaker demo
Diederick Niehorster [Tue, 20 Nov 2012 08:57:18 +0000 (08:57 +0000)]
small enhancement to Callbackmaker demo

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

11 years agosmall updates to one demo, so windowed windows display after the
Diederick Niehorster [Tue, 20 Nov 2012 05:25:14 +0000 (05:25 +0000)]
small updates to one demo, so windowed windows display after the
gamemode window is closed

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

11 years agoforgot docs for last change
Diederick Niehorster [Tue, 20 Nov 2012 02:23:47 +0000 (02:23 +0000)]
forgot docs for last change

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

11 years agowhen entering game mode, now avoiding call to ChangeDisplaySettingsEx
Diederick Niehorster [Tue, 20 Nov 2012 02:17:31 +0000 (02:17 +0000)]
when entering game mode, now avoiding call to ChangeDisplaySettingsEx
when not necessary. Avoids flashing of the screen

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

11 years agosome comments missing in shapes demo
Diederick Niehorster [Tue, 20 Nov 2012 02:15:43 +0000 (02:15 +0000)]
some comments missing in shapes demo

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

11 years agocosmetics in one demo
Diederick Niehorster [Mon, 19 Nov 2012 13:32:44 +0000 (13:32 +0000)]
cosmetics in one demo

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

11 years agopulling in cleanup from r1442
Diederick Niehorster [Mon, 19 Nov 2012 13:16:17 +0000 (13:16 +0000)]
pulling in cleanup from r1442

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

11 years agoshapes demo: now only draw necessary size info, and calling that info by
Diederick Niehorster [Mon, 19 Nov 2012 02:46:34 +0000 (02:46 +0000)]
shapes demo: now only draw necessary size info, and calling that info by
the right name.

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

11 years agofixed normals of glutCone, thanks Ioannis!
Diederick Niehorster [Mon, 19 Nov 2012 02:26:07 +0000 (02:26 +0000)]
fixed normals of glutCone, thanks Ioannis!
Also now using irad as base input for cone and cylinder, while using
orad as height. Without that the problem can't be seen in our demo

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

11 years agoGLUT_GEOMETRY_VISUALIZE_NORMALS is a better name than GLUT_OBJECTS_VISUALIZE_NORMALS
Diederick Niehorster [Mon, 19 Nov 2012 02:01:52 +0000 (02:01 +0000)]
GLUT_GEOMETRY_VISUALIZE_NORMALS is a better name than GLUT_OBJECTS_VISUALIZE_NORMALS

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