freeglut
11 years agoinstead of separate Pause and Resume CBs, we now have a AppStatus CB which passes...
Diederick Niehorster [Thu, 4 Apr 2013 10:54:44 +0000 (10:54 +0000)]
instead of separate Pause and Resume CBs, we now have a AppStatus CB which passes flags to indicate which state was entered. more extensible

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

11 years agosome cleanup
Diederick Niehorster [Thu, 4 Apr 2013 10:36:44 +0000 (10:36 +0000)]
some cleanup

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

11 years agoand with 0xFF to indicate to runtime that we want to strip out higher bits - otherwis...
Diederick Niehorster [Thu, 4 Apr 2013 10:20:43 +0000 (10:20 +0000)]
and with 0xFF to indicate to runtime that we want to strip out higher bits - otherwise we get a runtime error when "Smaller Type Checks" is enabled
Thanks Jason Wilkins!

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

11 years agomenu changes based on patch by Jason Wilkins:
Diederick Niehorster [Thu, 4 Apr 2013 10:13:45 +0000 (10:13 +0000)]
menu changes based on patch by Jason Wilkins:
- when menu window is shown, the menu's window no longer becomes the active window on windows (we thus don't steal focus from the active window).
- when menu is active and mouse is pressed outside the active menu and if the pressed button is bound to a menu, the old menu is now closed while a new one immediately appears
- menus now hide before their callback is executed, so they don't linger around if callback execution takes a while

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

11 years agocan now set the font used for a menu
Diederick Niehorster [Thu, 4 Apr 2013 10:13:04 +0000 (10:13 +0000)]
can now set the font used for a menu
set default font using glutSetOption(GLUT_MENU_FONT,...) and set font of current menu using glutSetMenuFont()

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

11 years agoerror in checking if mouse is in window when opening menu...
Diederick Niehorster [Thu, 4 Apr 2013 10:12:02 +0000 (10:12 +0000)]
error in checking if mouse is in window when opening menu...

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

11 years agodont wait till window visible when creating menu, as menu won't be shown until first...
Diederick Niehorster [Thu, 4 Apr 2013 04:49:13 +0000 (04:49 +0000)]
dont wait till window visible when creating menu, as menu won't be shown until first use...

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

11 years agodon't show window when creating menu (better fix then making it very small and hiding...
Diederick Niehorster [Thu, 4 Apr 2013 04:28:53 +0000 (04:28 +0000)]
don't show window when creating menu (better fix then making it very small and hiding it asap...

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

11 years agovariable declaration in wrong place
Diederick Niehorster [Thu, 4 Apr 2013 02:08:55 +0000 (02:08 +0000)]
variable declaration in wrong place

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

11 years ago- moving to a new way of handling window changes (position, size, visibility)
Diederick Niehorster [Thu, 4 Apr 2013 01:56:39 +0000 (01:56 +0000)]
- moving to a new way of handling window changes (position, size, visibility)
- we now use a work list and all actions queued up in that list get executed in the main loop, just before redraws are called
- simplified redrawing on windows, now no longer doing so in response to WM_PAINT message. This allows us to full control over when we draw
- now simplified use of state variables in X11 and andriod
- resize, reposition etc callback now processed thru notify checkers that call callback only if needed
- worklist also has an init work type which is executed once for every window, just before the window receives its first draw. This gets rid of hacks to call the reshape function once (that only worked for windows that are created before mainloop is entered)
- in init work processor we also check for presence of draw callback as not having one is an error following GLUT.
- some cleanup in general

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

11 years agousing FREE_GLUT_BUILD_STATIC_LIBS and FREEGLUT_BUILD_SHARED_LIBS instead of their...
Diederick Niehorster [Thu, 4 Apr 2013 01:29:17 +0000 (01:29 +0000)]
using FREE_GLUT_BUILD_STATIC_LIBS and FREEGLUT_BUILD_SHARED_LIBS instead of their unprefixed counterparts to avoid these defs leaking into build settings for other projects.

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

11 years agochange CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR as requested on tracker ( Jim...
Diederick Niehorster [Thu, 4 Apr 2013 01:23:27 +0000 (01:23 +0000)]
change CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR as requested on tracker ( Jim ( d3x0r ) - 2013-03-18 11:36:51 PDT )

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

11 years agoto check for menu opening/closing upon button press, should pass cursor position...
Diederick Niehorster [Wed, 3 Apr 2013 11:20:56 +0000 (11:20 +0000)]
to check for menu opening/closing upon button press, should pass cursor position in the window, not in the root window

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

11 years agocleaned up a bunch of warnings
Diederick Niehorster [Mon, 1 Apr 2013 15:40:51 +0000 (15:40 +0000)]
cleaned up a bunch of warnings

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

11 years agobit more cleanup
Diederick Niehorster [Mon, 1 Apr 2013 15:12:49 +0000 (15:12 +0000)]
bit more cleanup

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

11 years agonote about glutSetVertexAttribTexCoord2 in shapes demo
Diederick Niehorster [Mon, 1 Apr 2013 12:25:53 +0000 (12:25 +0000)]
note about glutSetVertexAttribTexCoord2 in shapes demo

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

11 years agoimplement setter for texture coord 2 (u,v) vertex attribute so it can be used by...
Diederick Niehorster [Mon, 1 Apr 2013 12:01:17 +0000 (12:01 +0000)]
implement setter for texture coord 2 (u,v) vertex attribute so it can be used by FreeGLUT

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

11 years agofurther worked on the teapot drawing code:
Diederick Niehorster [Mon, 1 Apr 2013 11:46:20 +0000 (11:46 +0000)]
further worked on the teapot drawing code:
cleaned up some debug stuff, and generalized the code
now added teacup and teaspoon too, so we have Newell's set complete
As source attribution, i copied in the whole original email message that the data was taken from, and where i downloaded that email message
fixed z offset as well, so all three objects now drawn centered

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

11 years agosame as for all other geometry functions, teapot takes double, not GLdouble now.
Diederick Niehorster [Sun, 31 Mar 2013 09:46:27 +0000 (09:46 +0000)]
same as for all other geometry functions, teapot takes double, not GLdouble now.

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

11 years agoteapot now using vertex arrays or vertex attribute arrays, using handwritten Bezier...
Diederick Niehorster [Sun, 31 Mar 2013 09:21:14 +0000 (09:21 +0000)]
teapot now using vertex arrays or vertex attribute arrays, using handwritten Bezier surface evaluation code
in fg_geometry, fixed up normal generation for visualization and added support for drawing texture coordinates (teapot has texture coordinates, other geometric shapes don't)

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

11 years agowasn't using GLbooleans in this platform independent part of the code
Diederick Niehorster [Thu, 21 Mar 2013 05:23:31 +0000 (05:23 +0000)]
wasn't using GLbooleans in this platform independent part of the code
(e.g. used TRUE instead of GL_TRUE)

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

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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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