freeglut
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

11 years agocan now visualize normals of GLUT geometry in GL2 mode as well
Diederick Niehorster [Mon, 19 Nov 2012 01:54:28 +0000 (01:54 +0000)]
can now visualize normals of GLUT geometry in GL2 mode as well

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

11 years agosize of cuboctahedron in shapes demo now in line with other shapes. and
Diederick Niehorster [Sun, 18 Nov 2012 15:55:55 +0000 (15:55 +0000)]
size of cuboctahedron in shapes demo now in line with other shapes. and
resizes along with the other shapes

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

11 years agoshapes demo: cuboctahedron is from the demo itself and not from FreeGLUT
Diederick Niehorster [Sun, 18 Nov 2012 15:49:27 +0000 (15:49 +0000)]
shapes demo: cuboctahedron is from the demo itself and not from FreeGLUT
geometry. Hence not supported in shader drawing mode. Now skipping it

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

11 years agocan now also draw the normal vectors (seems very useful for instructive
Diederick Niehorster [Sun, 18 Nov 2012 15:41:03 +0000 (15:41 +0000)]
can now also draw the normal vectors (seems very useful for instructive
programs, something which FreeGLUT often gets used for). use the 'n' key
in the shapes demo

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

11 years agowrote out the ipow function so its easier to mentally parse
Diederick Niehorster [Sun, 18 Nov 2012 03:31:47 +0000 (03:31 +0000)]
wrote out the ipow function so its easier to mentally parse

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

11 years agosmall enhancements to shapes demo:
Diederick Niehorster [Sun, 18 Nov 2012 03:30:54 +0000 (03:30 +0000)]
small enhancements to shapes demo:
- pitch and yaw rotation speeds are now prime numbers so we don't have a
  repeating cycle
- made window slightly larger so we have more space for the info printed
- added info for 2D rotation vs 1D rotation
- added keys to info where they were missing

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

11 years agofixed install target:
Diederick Niehorster [Sat, 17 Nov 2012 02:20:20 +0000 (02:20 +0000)]
fixed install target:
- freeglut shared library now in /bin dir, as is its pdb file
- its import library, the static library and the static lib's debug info
  are installed in /lib

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

11 years agomenus attached to child windows did not appear in the right place.
Diederick Niehorster [Sat, 17 Nov 2012 01:02:30 +0000 (01:02 +0000)]
menus attached to child windows did not appear in the right place.
Fixed in fghActivateMenu, whose logic is now simpler and commented as
well

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

11 years agominor cosmetics
Diederick Niehorster [Sat, 17 Nov 2012 00:07:30 +0000 (00:07 +0000)]
minor cosmetics

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

11 years agonow have function to get window style based on FreeGLUT's stateflag
Diederick Niehorster [Sat, 17 Nov 2012 00:03:10 +0000 (00:03 +0000)]
now have function to get window style based on FreeGLUT's stateflag
(fgState.DisplayMode) so that window decoration specification is only in
one place in the code. Also, glutGet(GLUT_WINDOW_BORDER_WIDTH); and
glutGet(GLUT_WINDOW_HEADER_HEIGHT); now return the right sizes, i.e.,
taking the display mode into account, for the border and caption when no
window is created yet

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

11 years agoadded note about maximizing behavior on Windows (when the maximize
Diederick Niehorster [Fri, 16 Nov 2012 15:07:33 +0000 (15:07 +0000)]
added note about maximizing behavior on Windows (when the maximize
window tool is pressed by the user) -- resize borders are by default of
the screen to maximize the client area. Lets not change this as FreeGLUT
has stuck with this default for a long time.

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

11 years agoreimplemented the client-area/window-area conversion code. It should now
Diederick Niehorster [Fri, 16 Nov 2012 11:02:06 +0000 (11:02 +0000)]
reimplemented the client-area/window-area conversion code. It should now
be robust across Windows and Visual Studio versions. Bugs in window
size with VS2012 fixed!

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

11 years agoincluding OpenGL/gl.h and OpenGL/glu.h when on apple platform
Diederick Niehorster [Fri, 16 Nov 2012 00:14:55 +0000 (00:14 +0000)]
including OpenGL/gl.h and OpenGL/glu.h when on apple platform

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

11 years agofixing conflicts with opengl headers on some systems, same solution as
Diederick Niehorster [Tue, 25 Sep 2012 07:46:25 +0000 (07:46 +0000)]
fixing conflicts with opengl headers on some systems, same solution as
by John in r1385

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

11 years agoGLUT_WINDOW_HEADER_HEIGHT should always have been GLUT_WINDOW_BORDER_HEIGHT.
Diederick Niehorster [Tue, 25 Sep 2012 07:39:13 +0000 (07:39 +0000)]
GLUT_WINDOW_HEADER_HEIGHT should always have been GLUT_WINDOW_BORDER_HEIGHT.
Adding the second, keeping the first for backward compatibility

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

11 years agofixed shader route in shapes demo:
Diederick Niehorster [Mon, 13 Aug 2012 04:59:48 +0000 (04:59 +0000)]
fixed shader route in shapes demo:
- small bug in gl_frustum implementation in matrix lib, element (4,4)
  should be 0
- default OpenGL ambient color is (.2, .2, .2, 1.), not black
little bit of formatting

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

11 years agoshapes demo: material color now set to red in shader, ambient light off again. looks
Diederick Niehorster [Mon, 13 Aug 2012 02:57:30 +0000 (02:57 +0000)]
shapes demo: material color now set to red in shader, ambient light off again. looks
better now that i understand light a bit better

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

11 years agoThe mapping from XInput button mask to the standard X event button mask is not 1...
John Tsiombikas [Thu, 9 Aug 2012 01:36:31 +0000 (01:36 +0000)]
The mapping from XInput button mask to the standard X event button mask is not 1-1, fixed.

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

11 years ago- trying to fix bug 2781865
John Tsiombikas [Tue, 7 Aug 2012 11:15:01 +0000 (11:15 +0000)]
- trying to fix bug 2781865

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