Diederick Niehorster [Sun, 7 Apr 2013 08:04:46 +0000 (08:04 +0000)]
redisplay is now also on the work list instead of handled separately
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1614
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sun, 7 Apr 2013 08:03:48 +0000 (08:03 +0000)]
doc that timers are sorted by endtime + don't call fgElapsedTime() if no timers to check, its a waste
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1613
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 14:08:59 +0000 (14:08 +0000)]
Menu's work again in gamemode too now. We have to do a normal ShowWindow in gamemode, or the menu won't pop up over the gamemode window.
Also now using fgState.ActiveMenus instead of enumerating to see if there is an active menu
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1612
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:20:42 +0000 (10:20 +0000)]
cleanup a debug statement
show flag should be SW_SHOWNA, not SW_SHOWNOACTIVATE according to docs
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1611
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:17:04 +0000 (10:17 +0000)]
clicking in another window also no longer closed the menu unless focus was changed. Fixed in click checker in general menu code, so it'll improve menus on X11 as well. Our Windows part now only needed for when losing focus because switching to a non-FreeGLUT window
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1610
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:16:27 +0000 (10:16 +0000)]
now that menu's no longer take focus from their parent, clicking the non-client area of the parent no longer closed the menu. fixed.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1609
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:15:53 +0000 (10:15 +0000)]
added a function to translate WM_ messages to text, for debugging
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1608
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:15:19 +0000 (10:15 +0000)]
now handling WM_MOUSEACTIVATE so that menus don't get activated upon mouseclick
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1607
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Sat, 6 Apr 2013 10:14:41 +0000 (10:14 +0000)]
fix in fgUpdateMenuHighlight: clicked entry is always the active entry already, so no while loop. also, ignore clicks on a submenu's parent entry
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1606
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Fri, 5 Apr 2013 11:39:14 +0000 (11:39 +0000)]
no idea where this folder came from, think its an error of my git-svn
client. anyway, removing...
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1602
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Fri, 5 Apr 2013 10:51:07 +0000 (10:51 +0000)]
Change FREEGLUT_WARNINGS and *_ERRORS to FREEGLUT_PRINT_WARNINGS and *_ERRORS
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1599
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Fri, 5 Apr 2013 09:13:48 +0000 (09:13 +0000)]
implemented WM_DISPLAYCHANGE message handler per patch in very old bug report (1212167). This for us only helps make sure that glutGet(GLUT_SCREEN_WIDTH) and glutGet(GLUT_SCREEN_HEIGHT) return the correct values, and help make sure menu placement is clipped against the correct window extents. Thanks Dan!
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1597
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Fri, 5 Apr 2013 02:55:45 +0000 (02:55 +0000)]
forgot to add teapot to sourcelist for gles1 and gles2 builds
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1591
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Thu, 4 Apr 2013 14:32:29 +0000 (14:32 +0000)]
menu fonts API improved
No more glutSetOption, casting void* to int and back is not safe
glutSetMenuFont now takes menuID as param
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1588
7f0cb862-5218-0410-a997-
914c9d46530a
Diederick Niehorster [Thu, 4 Apr 2013 11:04:17 +0000 (11:04 +0000)]
added cursor changing to resizer demo, for testing
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1587
7f0cb862-5218-0410-a997-
914c9d46530a
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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