No more glutSetOption, casting void* to int and back is not safe
glutSetMenuFont now takes menuID as param
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1588 7f0cb862-5218-0410-a997-914c9d46530a
- 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: https://svn.code.sf.net/p/freeglut/code/trunk@1583 7f0cb862-5218-0410-a997-914c9d46530a
set default font using glutSetOption(GLUT_MENU_FONT,...) and set font of current menu using glutSetMenuFont()
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1582 7f0cb862-5218-0410-a997-914c9d46530a
- 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: https://svn.code.sf.net/p/freeglut/code/trunk@1577 7f0cb862-5218-0410-a997-914c9d46530a
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: https://svn.code.sf.net/p/freeglut/code/trunk@1569 7f0cb862-5218-0410-a997-914c9d46530a
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: https://svn.code.sf.net/p/freeglut/code/trunk@1567 7f0cb862-5218-0410-a997-914c9d46530a
- 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: https://svn.code.sf.net/p/freeglut/code/trunk@1562 7f0cb862-5218-0410-a997-914c9d46530a
- 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: https://svn.code.sf.net/p/freeglut/code/trunk@1554 7f0cb862-5218-0410-a997-914c9d46530a
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: https://svn.code.sf.net/p/freeglut/code/trunk@1550 7f0cb862-5218-0410-a997-914c9d46530a
already set to zero by calloc
in windowproc, don't have handlers that only forward the message to
defwindowproc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1544 7f0cb862-5218-0410-a997-914c9d46530a
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: https://svn.code.sf.net/p/freeglut/code/trunk@1541 7f0cb862-5218-0410-a997-914c9d46530a