Commit Graph

1741 Commits

Author SHA1 Message Date
dcnieho
b0811138cc caption height should include the width of the border atop the window
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1700 7f0cb862-5218-0410-a997-914c9d46530a
2014-08-27 10:14:44 +00:00
dcnieho
f57980927a resizer demo:
some breaks missing in keyboard switch
added instruction text for which buttons can be pressed

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1699 7f0cb862-5218-0410-a997-914c9d46530a
2014-08-27 05:47:05 +00:00
dcnieho
a894e63bdd For builds not using cmake, generate fg_version.h to match cmake-specified version number.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1696 7f0cb862-5218-0410-a997-914c9d46530a
2014-08-18 02:00:40 +00:00
jtsiomb
2ed4ed5b52 changed the X11 gamemode code policy. Falling back to xf86vm when xrandr fails
was problematic when passing invalid modes. Now instead, if xrandr is
available, we use that, and only that. XF86VM is now only used when XR&R is not
supported at all.

I also added a set of env vars to artificially disable one or the other, or
both. If FREEGLUT_NO_XRANDR is set we completely ignore XR&R, and if
FREEGLUT_NO_XF86VM is set, we completely ignore XF86VidMode. Obviously if both
are defined or missing, game mode can't switch resolutions at all any more, but
that's a nice debugging aid, and may be useful to allow the user to pick which
extension he'd rather use for mode switching.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1695 7f0cb862-5218-0410-a997-914c9d46530a
2014-08-18 00:52:53 +00:00
dcnieho
c12f6173db Updated BlackBerry references to make note of the change from FREEGLUT_GLES2/1 to FREEGLUT_GLES.
Updated BlackBerry toolchain to support building with Dinkum and to support OS 10.3 and GCC 4.8.2
Updated BlackBerry fg_window_blackberry so that window usages aren't hardcoded based on compile information, since it is now controlled by glutInitContextVersion.
EGL window setup now supports EGL 1.5, Renderable type for ES3, and using the minor version from glutInitContextVersion to have more exact control over which version of OpenGL ES is used (requires EGL 1.5)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1694 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-24 07:03:16 +00:00
dcnieho
89cfab41fc updated api doc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1693 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-02 13:25:25 +00:00
beuc
c93af8dfea Provide Android binaries for testers
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1692 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 13:55:34 +00:00
beuc
364d6a4cff Clarify the problem with Raspberry PI
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1691 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 13:37:17 +00:00
beuc
f2a534098c Rewrite EGL attributes using our ATTRIB/ATTRIB_VAL macros
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1690 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 11:04:09 +00:00
beuc
7fee3a3bb3 Update GLES instructions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1689 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 10:43:01 +00:00
beuc
13416c05d6 EGL is always double-buffered
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1688 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 09:48:51 +00:00
beuc
25be478938 Unify GLES1 and GLES2 (libraries are compatible and can be co-linked)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1687 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 09:24:47 +00:00
dcnieho
693b4b8de8 add menu to opengl 3 demo. Should work as menu windows have their own classic context
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1686 7f0cb862-5218-0410-a997-914c9d46530a
2014-06-01 03:50:51 +00:00
beuc
5051e40380 android: update documentation with gles1/gles2 unification
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1685 7f0cb862-5218-0410-a997-914c9d46530a
2014-05-31 22:47:17 +00:00
beuc
c4d5ab086d Update GLES2 status and instructions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1684 7f0cb862-5218-0410-a997-914c9d46530a
2014-05-31 10:38:44 +00:00
dcnieho
98d0182357 KEY_EVENT macro exists in windows 8.1 API: renamed it. Also renamed KEY macro to be safe.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1683 7f0cb862-5218-0410-a997-914c9d46530a
2014-05-14 22:02:41 +00:00
jtsiomb
bca59c67ef Using the -pedantic flag with gcc uncovered a series of warnings about
non-standard C constructs in the code. This commit fixes them.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1682 7f0cb862-5218-0410-a997-914c9d46530a
2014-05-14 18:31:58 +00:00
jtsiomb
ff6255810d Compiling with -ansi makes a lot of important POSIX (standard UNIX) facilities
unavailable. This was masked until recently by an incorrect conditional in the
CMakeLists.txt file, that looked like it would use -ansi on anything other than
android, but it didn't actually use it anywhere. As soon as that was fixed, and
-ansi started being used, build broke on linux.

The intention of the -ansi flag was to help catch portability-reducing mistakes
in the code, so instead of removing it completely I used -pedantic in its place,
which produces a lot of warnings for not strictly ISO/ANSI compliant code that
relies on compiler-specific features.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1681 7f0cb862-5218-0410-a997-914c9d46530a
2014-05-14 18:28:53 +00:00
dcnieho
18718163db XPutBackEvent copies an XEvent internally, so the pointer passed in must
point to an actual XEvent object, not an XConfigureEvent, which is
smaller. This avoids an invalid stack read.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1680 7f0cb862-5218-0410-a997-914c9d46530a
2014-04-11 13:41:49 +00:00
dcnieho
d0c5d990d7 Docs update related to BlackBerry 10
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1679 7f0cb862-5218-0410-a997-914c9d46530a
2014-03-09 03:49:43 +00:00
dcnieho
2c025ce66d Fix issues with context lost on Android
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1678 7f0cb862-5218-0410-a997-914c9d46530a
2014-03-05 01:40:18 +00:00
dcnieho
aff8412f26 Added comments about GLES 3.0 support with 2.0 references.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1677 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:35:48 +00:00
dcnieho
8c6c71d29d BlackBerry and Android -Added ability for developer to choose OpenGL ES version (2.0 or 3.0) via glutInitContextVersion (only the major version is used)
BlackBerry specific
-Added better documentation on required window bit depth for BlackBerry.
-Modified screen format picking so it will choose either RGBA8888 or RGB565 instead of always using RGBA8888

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1676 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:35:35 +00:00
dcnieho
47945e4119 Updated toolchain so that it does a more exact check if this is for PlayBook or BlackBerry 10 Fixed bug with keyboard on PlayBook where keyboard heights only occurred on rotation, and resize would occur twice because of it and resize wouldn't happen for keyboard
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1675 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:35:22 +00:00
dcnieho
4c37b66f1e Added BlackBerry PlayBook support Bug memleak when getting the number of mouse buttons on a non-PlayBook where an appropriate device is found and the value is returned
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1674 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:35:05 +00:00
dcnieho
e8cc20621f Info logging only shows in debug compilation Added support for UseCurrentContext flag Updated fghPlatformCloseWindowEGL for performance so that eglMakeCurrent isn't invoked unless it's the current window and that the EGL context isn't destroyed unless no other windows uses
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1673 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:34:49 +00:00
dcnieho
c5201e73ef Hardcoded the RGB bitdepths for EGL surface creation.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1672 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:34:32 +00:00
dcnieho
d8f19f2481 Made glutGet, for window width and height, return width and height determined by device rotation Now handles keyboard open/close (along wit device rotation while the keyboard is open) and resize The "back" operation now returns an ESCAPE key
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1671 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:34:17 +00:00
dcnieho
eb835cc833 Added support for rotation so an app can be rotated and FG will resize and manage the window in the background Additional documentation explaining why certain functions are implemented in the manner they are Changed QNX macro to a non deprecated one
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1670 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:33:57 +00:00
dcnieho
b817a1d976 Added (though commented out) support for setting window position
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1669 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:33:38 +00:00
dcnieho
f3f7e54713 Placeholder for window sizes Prevent navigator event 0x0 to show as unknown (though it is unknown... it's not defined in navigator.h)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1668 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:33:23 +00:00
dcnieho
2f2185d930 Added full support for WindowStatus App status is now based on actual app status instead of window visibility
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1667 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:33:07 +00:00
dcnieho
318f0d5ad9 Fixed bug where if statement didn't have parenthesis, causing it to just exit
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1666 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:32:52 +00:00
dcnieho
52db42d186 Implemented a small work around for no current window being set while executing the event handler
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1665 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:32:39 +00:00
dcnieho
54bc3439c4 Added support for the scroll wheel when using the simulator
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1664 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:29:59 +00:00
dcnieho
8fbcdd5aa9 Forgot to reset modifiers once done with modifiers.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1663 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:29:44 +00:00
dcnieho
2de675c752 Added support for key modifiers
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1662 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:29:30 +00:00
dcnieho
0d49bc62ac Added ability to get mouse button count or touch ID count.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1661 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:29:17 +00:00
dcnieho
b6cc0103c8 Added ability to get screen size of display
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1660 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:29:03 +00:00
dcnieho
8d50a81c9e Restructuring of when screen context and events are started stopped, created and destroyed
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1659 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:28:48 +00:00
dcnieho
4a08e95c50 Added keyboard states for BlackBerry
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1658 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:28:29 +00:00
dcnieho
c41c6b60de Added two more navigator states (that might be implemented) for BlackBerry
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1657 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:28:14 +00:00
dcnieho
887d9f033e Prevented case where no window was set when waiting for events.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1656 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:27:59 +00:00
dcnieho
fd1435ccb7 Converted the odd double spaces into 4 space tabs
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1655 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:27:43 +00:00
dcnieho
80d9609256 Minor order change in Android/BlackBerry CMake, one comment for BlackBerry window
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1654 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:27:24 +00:00
dcnieho
9c4f07fcd3 Added a couple event cases for BlackBerry that are common to prevent them being listed as unknown events.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1653 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:27:08 +00:00
dcnieho
ee3500875c Removed fg_main_blackberry.h. It wasn't needed
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1652 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:26:52 +00:00
dcnieho
5f5513a01e Made sure that windows created on BlackBerry are registered as fullscreen, for now. Added more logging in fgPlatformProcessSingleEvent on BlackBerry. Better handling of key repeats on BlackBerry by taking into account global and window settings.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1651 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:26:37 +00:00
dcnieho
9999328177 Can use input devices from x11 (serial input... unlikely to ever be used, but you never know) Fixed bug in fg_window_egl:fgPlatformSetWindow where a NULL window may be passed and cause a segfault Fixed bug where navigator events were never started Take into account DisplayMode when creating window buffers Proper fgPlatformSystemTime implementation (from fg_main_x11) Added support for mutlitouch (from fg_main_windows)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1650 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:26:20 +00:00
dcnieho
6d5f2582ee Minor change so that OpenGL ES 1.x can be used for BlackBerry
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1649 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:26:00 +00:00
dcnieho
7b34b7be39 Implemented BlackBerry main (initial version)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1648 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:25:47 +00:00
dcnieho
1357eb9fcf Final commit before implementing main loop. All other code is implemented to the same level as Android.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1647 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:25:29 +00:00
dcnieho
8dba97d8a1 Implemented fg_window_blackberry.c to initialize and cleanup windows Implemented a BlackBerry specific fg_init so that bps can be started and stopped.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1646 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:25:10 +00:00
dcnieho
51b44c767f Android and BlackBerry have a fair amount of overlap, for now.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1645 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:24:45 +00:00
dcnieho
11b3e1b393 Initial commit of BlackBerry implementation. It compiles, but doesn't have required functions implemented.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1644 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-24 10:24:23 +00:00
dcnieho
9b0e63e8da -sync command line option now causes X server to operate in synchronized/blocking mode
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1643 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-23 02:28:02 +00:00
dcnieho
f6a11225ad should be using GetKeyState not GetAsyncKeyState to check for modifier keys as we care which modifiers were active at the time of the key/mouse press we are processing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1642 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-22 12:06:59 +00:00
dcnieho
e8d8bdf9e3 implement handling of GLDebugSwitch: we use glutReportErrors to check for errors in each iteration of the glut mainloop if requested
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1641 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-22 10:09:57 +00:00
jtsiomb
2b5292bb4f Applied Bruce Merry's patch fixing bug #206 (segfault on shutdown in the AMD/ATI fglrx driver).
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1640 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-21 10:52:53 +00:00
jtsiomb
65e227d03d fixed timer.c: wouldn't compile in C89 mode due to recent change which added two
for loops with a loop variable declared in the statement itself.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1639 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-21 10:50:05 +00:00
dcnieho
2bbf66ef98 Fixed CMake UNIX config when building only "freeglut_static" or only the shared library
- was setting a property on "freeglut" while "FREEGLUT_BUILD_SHARED_LIBS" was "OFF"

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1638 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-18 01:57:14 +00:00
dcnieho
0be6109313 timer demo now has a menu to:
- set flicker tempo
- test whether menus can be modified in the callback (there was a regression with this in freeglut 2.8.1 that was perchance already fixed in r1583, but make sure we're testing this from now on)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1637 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-17 16:18:46 +00:00
dcnieho
5757433d2a add small note: closing menu before executing callback is also important so that the callback can actually modify the menu
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1636 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-17 16:18:35 +00:00
dcnieho
bf2ff7171a add another call for forking and helping out implementing new features
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1635 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-17 13:40:47 +00:00
dcnieho
cef8d0ce5c add 10bit display formats to todo list
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1634 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-17 13:40:35 +00:00
dcnieho
1acb96bfe4 putting BB10 in progrss list
updating links now that sf.net project is upgraded to new interface
putting word out for github clone and request pull requests there

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1633 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-17 13:27:15 +00:00
dcnieho
792de931b7 note about using near far variable names
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1631 7f0cb862-5218-0410-a997-914c9d46530a
2014-01-15 03:22:37 +00:00
dcnieho
2715e0929e Fixing problem with non-client area becoming unresponsive on Windows due to mouse capture that isn't released. Thanks Philipp Kutin (on list!) for figuring this out and proposing a solution.
-> It appears GetAsyncKeyState's return can be non-zero even when the queried key is not pressed

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1627 7f0cb862-5218-0410-a997-914c9d46530a
2013-11-09 05:33:02 +00:00
jtsiomb
855c10d908 Applied James DeLisle's patch adding EWMH _NET_WM_PID support.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1626 7f0cb862-5218-0410-a997-914c9d46530a
2013-08-28 14:33:07 +00:00
beuc
925f7446b7 Find this kind of bug is definitely out of my juridiction - please, PLEASE maintain a list of changes to apply on each port. Having negative elapsed time messed the animations so weird that you can't guess where that came from.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1625 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 17:04:04 +00:00
beuc
ad7b684681 Update SVN instructions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1624 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 15:13:27 +00:00
beuc
57176e0bcd Make Android work again - adapt to recent changes and fix use of GL-nonES function
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1623 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 15:05:39 +00:00
beuc
8ff008e3d7 Identify Android thread in the logs
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1622 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 15:02:32 +00:00
beuc
2f2ee68986 Fix random crash
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1621 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 15:01:33 +00:00
beuc
efa4318cca Fix compilation warning about unused variables and functions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1620 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 14:57:13 +00:00
beuc
7d21c989bf Document the need to install MESA-GLES development files
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1619 7f0cb862-5218-0410-a997-914c9d46530a
2013-05-19 14:54:55 +00:00
dcnieho
59a8038d1c fgProcessWork, not fgPlatformProcessWork
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1618 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-20 14:04:21 +00:00
dcnieho
6e7e3375a3 strip out GLUT_DISPLAY_CALLBACK from worklist _before_ calling display callback. Any postredisplay in the display callback will then be honored, but no unnecessary redisplay work will be called due to redisplays queued during resize, visibility and other such processing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1617 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-20 14:04:06 +00:00
dcnieho
42dc7ef4bf should not strip out GLUT_DISPLAY_CALLBACK at the end of processing work. It kills the glutPostRedisplay inside the display callback method of getting your window continuously redrawn...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1616 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-18 01:53:21 +00:00
dcnieho
8d979f3c7e part of dealing with work is platform independent, so moved it to platform independent part of code
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1615 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-07 12:21:03 +00:00
dcnieho
5658b01337 redisplay is now also on the work list instead of handled separately
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1614 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-07 08:04:46 +00:00
dcnieho
28539c8e95 doc that timers are sorted by endtime + don't call fgElapsedTime() if no timers to check, its a waste
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1613 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-07 08:03:48 +00:00
dcnieho
02bb655c5c 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: https://svn.code.sf.net/p/freeglut/code/trunk@1612 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 14:08:59 +00:00
dcnieho
60e65375c1 cleanup a debug statement
show flag should be SW_SHOWNA, not SW_SHOWNOACTIVATE according to docs

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1611 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:20:42 +00:00
dcnieho
123c48b2ae 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: https://svn.code.sf.net/p/freeglut/code/trunk@1610 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:17:04 +00:00
dcnieho
7ae2b6eee1 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: https://svn.code.sf.net/p/freeglut/code/trunk@1609 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:16:27 +00:00
dcnieho
c16016e9fa added a function to translate WM_ messages to text, for debugging
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1608 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:15:53 +00:00
dcnieho
9e4fc43b36 now handling WM_MOUSEACTIVATE so that menus don't get activated upon mouseclick
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1607 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:15:19 +00:00
dcnieho
23e0e585ef 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: https://svn.code.sf.net/p/freeglut/code/trunk@1606 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-06 10:14:41 +00:00
dcnieho
4c1b2f7f71 small updates to API doc, some cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1605 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 13:40:32 +00:00
dcnieho
ab06e7c64a more typos in progress page
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1604 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 12:28:54 +00:00
dcnieho
417f965466 added API docs for teacup and teaspoon
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1603 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 11:58:32 +00:00
dcnieho
d319d6d489 add glutSetMenuFont to API docs
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1601 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 11:34:06 +00:00
dcnieho
78385ffca4 document glutInitErrorFunc, glutInitWarningFunc, as well as
FREEGLUT_PRINT_ERRORS and FREEGLUT_PRINT_WARNINGS


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1600 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 11:03:47 +00:00
dcnieho
467a9d3995 Change FREEGLUT_WARNINGS and *_ERRORS to FREEGLUT_PRINT_WARNINGS and *_ERRORS
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1599 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 10:51:07 +00:00
dcnieho
b11381ff15 website: fixed errors in 3.0 roadmap (thank Ines Almeida!)
Moved up the help out item in the left-side menu
improved several texts i wrote earlier today.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1598 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 10:34:28 +00:00
dcnieho
1bb4fa9988 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: https://svn.code.sf.net/p/freeglut/code/trunk@1597 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 09:13:48 +00:00
dcnieho
3aaad918c1 noted incompleteness of glutInitDisplayString implementation and added
call to help out


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1596 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 09:00:40 +00:00
dcnieho
066d495c81 fixed docs for glut*Torus, per suggestion of Chris Marshall. much more
understandable now indeed.
Also changed GLdouble params of geometry functions to normal doubles to
match code in trunk


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1595 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 08:48:33 +00:00
dcnieho
892fafec03 docs: glutPauseFunc/glutResumeFunc -> glutAppStatusFunc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1594 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 03:52:59 +00:00
dcnieho
ad30a17ccd user should include freeglut.h, not freeglut_ext.h
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1593 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 03:43:43 +00:00
dcnieho
1bdc52ff5d added 3.0 todo list and call for help
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1592 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 03:36:16 +00:00
dcnieho
a78fe5852e forgot to add teapot to sourcelist for gles1 and gles2 builds
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1591 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 02:55:45 +00:00
dcnieho
06355842a6 finish up release announcement
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1590 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 02:14:17 +00:00
dcnieho
c35fd2e601 first start at preparing 2.8.1 release on website
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1589 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-05 01:53:20 +00:00
dcnieho
0bb2219049 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: https://svn.code.sf.net/p/freeglut/code/trunk@1588 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 14:32:29 +00:00
dcnieho
afb16d74ea added cursor changing to resizer demo, for testing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1587 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 11:04:17 +00:00
dcnieho
a66dc9389e 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: https://svn.code.sf.net/p/freeglut/code/trunk@1586 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:54:44 +00:00
dcnieho
753f2f1163 some cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1585 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:36:44 +00:00
dcnieho
c387bfee98 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: https://svn.code.sf.net/p/freeglut/code/trunk@1584 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:20:43 +00:00
dcnieho
e024949098 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: https://svn.code.sf.net/p/freeglut/code/trunk@1583 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:13:45 +00:00
dcnieho
75dcd74677 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: https://svn.code.sf.net/p/freeglut/code/trunk@1582 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:13:04 +00:00
dcnieho
58a343f2e3 error in checking if mouse is in window when opening menu...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1581 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 10:12:02 +00:00
dcnieho
2f172a9cb0 dont wait till window visible when creating menu, as menu won't be shown until first use...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1580 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 04:49:13 +00:00
dcnieho
62b5dadbe3 don't show window when creating menu (better fix then making it very small and hiding it asap...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1579 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 04:28:53 +00:00
dcnieho
9495df62ee variable declaration in wrong place
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1578 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 02:08:55 +00:00
dcnieho
0685ee4d0d - 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: https://svn.code.sf.net/p/freeglut/code/trunk@1577 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 01:56:39 +00:00
dcnieho
52bd423f58 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: https://svn.code.sf.net/p/freeglut/code/trunk@1576 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 01:29:17 +00:00
dcnieho
dde06cbe5c 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: https://svn.code.sf.net/p/freeglut/code/trunk@1575 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-04 01:23:27 +00:00
dcnieho
b0d3a86555 to check for menu opening/closing upon button press, should pass cursor position in the window, not in the root window
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1574 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-03 11:20:56 +00:00
dcnieho
2811836c94 cleaned up a bunch of warnings
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1573 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 15:40:51 +00:00
dcnieho
b7bbf6277e bit more cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1572 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 15:12:49 +00:00
dcnieho
86a5d3fc91 note about glutSetVertexAttribTexCoord2 in shapes demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1571 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 12:25:53 +00:00
dcnieho
67cd64fd7a implement setter for texture coord 2 (u,v) vertex attribute so it can be used by FreeGLUT
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1570 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 12:01:17 +00:00
dcnieho
1af0007c38 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: https://svn.code.sf.net/p/freeglut/code/trunk@1569 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 11:46:20 +00:00
dcnieho
78b4e988c4 same as for all other geometry functions, teapot takes double, not GLdouble now.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1568 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-31 09:46:27 +00:00
dcnieho
6581072673 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: https://svn.code.sf.net/p/freeglut/code/trunk@1567 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-31 09:21:14 +00:00
dcnieho
fc84854e33 wasn't using GLbooleans in this platform independent part of the code
(e.g. used TRUE instead of GL_TRUE)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1566 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-21 05:23:31 +00:00
dcnieho
eca6fc6749 normalizing line endings..
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1565 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 16:34:21 +00:00
dcnieho
3d935ff946 added some beginner notes for compiling through cmake on Unix
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1564 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 14:50:44 +00:00
dcnieho
dbad51f95b note on use of gluint/glushort in fg_geometry
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1563 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 10:23:18 +00:00
dcnieho
074ae923ab - 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: https://svn.code.sf.net/p/freeglut/code/trunk@1562 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-17 14:01:46 +00:00
dcnieho
ace8df53ef strdup instead of malloc/strcpy
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1561 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-17 09:09:41 +00:00
dcnieho
24caa9843b small comment fix (this was not todo, we're not leaking memory here)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1560 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-16 15:46:39 +00:00
dcnieho
7d4a63d970 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: https://svn.code.sf.net/p/freeglut/code/trunk@1559 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:27:18 +00:00
dcnieho
9ae70d72c7 gamemode: just go fullscreen
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1558 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:17:52 +00:00
dcnieho
b3b678a2f7 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: https://svn.code.sf.net/p/freeglut/code/trunk@1557 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:17:13 +00:00
dcnieho
d2991524cb fghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindows first if we have already found a window with pending redisplay
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1556 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:51:01 +00:00
dcnieho
05fc819508 comment on timer checking, are timers always sorted by triggertime? Else the code is wrong...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1555 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:50:14 +00:00
dcnieho
9c2936cd85 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: https://svn.code.sf.net/p/freeglut/code/trunk@1554 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:39:00 +00:00
dcnieho
59ae6d2a56 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: https://svn.code.sf.net/p/freeglut/code/trunk@1553 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-05 17:08:32 +00:00
dcnieho
7365dc38d4 error when entering main loop with no windows defined, as GLUT does
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1552 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 16:27:00 +00:00
dcnieho
9fa8bcf4db if user opens menu in parent window and then clicked child window, the menu wasn't closed. Fixed (and some cleanup)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1551 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 10:18:35 +00:00
dcnieho
5e97fed06a 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: https://svn.code.sf.net/p/freeglut/code/trunk@1550 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:54:55 +00:00
dcnieho
5398d76b76 callign entryfunc should not steal the current window, so save before calling and restore after callback returns
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1549 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:25:15 +00:00
dcnieho
76f9c9a902 handling of mouse messages more conform docs, some cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1548 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:17:03 +00:00
dcnieho
bf4a53a72e missed the windowproc return value
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1547 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 18:43:22 +00:00
dcnieho
bab8eb3423 WM_PAINT more conform to docs
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1546 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 18:28:55 +00:00
dcnieho
c8177024db document glutSetWindowTitle, glutSetIconTitle
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1545 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:44:44 +00:00
dcnieho
4edd89470b 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: https://svn.code.sf.net/p/freeglut/code/trunk@1544 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:22:34 +00:00
dcnieho
78707f3e63 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: https://svn.code.sf.net/p/freeglut/code/trunk@1543 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:20:47 +00:00
dcnieho
736f745cc1 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: https://svn.code.sf.net/p/freeglut/code/trunk@1542 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 15:42:26 +00:00
dcnieho
7caa405f57 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: https://svn.code.sf.net/p/freeglut/code/trunk@1541 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 10:31:34 +00:00
dcnieho
c7656b8659 comment on implementation of window status callback
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1540 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:43:48 +00:00
dcnieho
4d83b5ab50 simplified some window rect calculations
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1539 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:41:23 +00:00
dcnieho
5e48d25cdb document coordinates returned by glutPositionFunc, other doc
improvements regarding docs


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1538 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:15:20 +00:00
dcnieho
6d9e4fdb30 updated docs for fgPlatformMainLoopPreliminaryWork
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1537 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 06:50:15 +00:00
dcnieho
1d9ec8e1e9 implemented somewhat better visibility/windowstatus support, some small
cleanup


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1536 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 05:53:51 +00:00
dcnieho
f46574e263 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: https://svn.code.sf.net/p/freeglut/code/trunk@1535 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 03:08:05 +00:00
dcnieho
41dd280289 made fghVisibility more intuitive, documented glutVisibilityfunc and
glutWindowStatusFunc


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1534 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 02:42:14 +00:00
dcnieho
a2e3b9c31d fixed up docs a bit, provided docs for some functions
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1533 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 18:26:14 +00:00
dcnieho
8cafb13ec9 doc cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1532 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 17:41:20 +00:00
dcnieho
3299e79bdf files for demoing GLUT_ICON
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1531 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 17:40:45 +00:00
dcnieho
cd92d7fdd2 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: https://svn.code.sf.net/p/freeglut/code/trunk@1530 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 13:40:28 +00:00
dcnieho
766e0cafc5 implemented GLUT_WINDOW_STENCIL_SIZE and GLUT_WINDOW_BUFFER_SIZE for glutGet
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1529 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 08:53:31 +00:00
dcnieho
ccebf6f3df 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: https://svn.code.sf.net/p/freeglut/code/trunk@1528 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 12:11:33 +00:00
dcnieho
c0522d1fcf updated README to point to README.cmake for building
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1527 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 12:07:26 +00:00
dcnieho
953dcc637c 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: https://svn.code.sf.net/p/freeglut/code/trunk@1526 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 11:36:14 +00:00
dcnieho
a5ed343b38 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: https://svn.code.sf.net/p/freeglut/code/trunk@1525 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 10:46:13 +00:00
dcnieho
371adb260e fgDeactivateMenu could sometimes be called twice on the same menu, avoid
crash in that situation


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1524 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 10:29:24 +00:00
dcnieho
5fe69bdac1 GLUT_CURSOR_INHERIT now works, also implemented another cursor
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1523 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 09:35:38 +00:00
dcnieho
0d353df338 should return zero after processing any of the mouse button down or up
events


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1522 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 08:18:09 +00:00
dcnieho
b362113e1f Only do mouse tracking for EntryFunc if user specified an entryfunc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1521 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 08:06:24 +00:00
dcnieho
3eda176577 Now implemented properly working mouse entry and exit (EntryFunc callback) support on windows
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1520 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:52:55 +00:00
dcnieho
eccb722d20 demo glutSetCursor
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1519 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:07:55 +00:00
dcnieho
9652d57d4f Simplified fghWindowUnderCursor, cleane dup code
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1518 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:01:43 +00:00
dcnieho
363c2c363a Only check for child window when needed, some cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1517 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 06:18:20 +00:00
dcnieho
8363fa9507 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: https://svn.code.sf.net/p/freeglut/code/trunk@1516 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 06:11:51 +00:00
dcnieho
6f9152c92e 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: https://svn.code.sf.net/p/freeglut/code/trunk@1515 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 05:58:56 +00:00
dcnieho
b1274e9078 added API doc for glutSetKeyRepeat and glutIgnoreKeyRepeat
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1514 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:58:23 +00:00
dcnieho
00260311f3 clean up glutSetKeyRepeat function body
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1513 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:44:14 +00:00
dcnieho
e9318d4e55 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: https://svn.code.sf.net/p/freeglut/code/trunk@1512 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:36:48 +00:00
dcnieho
71c6054fe0 added modifier key status to callbackmaker output, also added entryfunc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1511 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 03:58:05 +00:00
dcnieho
ddda931bac 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: https://svn.code.sf.net/p/freeglut/code/trunk@1510 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:49:19 +00:00
dcnieho
5fa61c0c64 subwin demo now has a grandchild (subwin in subwin) for testing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1509 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:14:41 +00:00
dcnieho
3b5f3573a1 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: https://svn.code.sf.net/p/freeglut/code/trunk@1508 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:13:09 +00:00
dcnieho
fdbb8086ed better name for key up/down function
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1507 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:21:34 +00:00
dcnieho
a6e021db4a win API docs say that defWndProc must be called for system keydown/keyup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1506 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:20:18 +00:00
dcnieho
cf6e2a419c 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: https://svn.code.sf.net/p/freeglut/code/trunk@1505 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:05:41 +00:00
dcnieho
813addede1 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: https://svn.code.sf.net/p/freeglut/code/trunk@1504 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-13 10:28:26 +00:00
dcnieho
4f1f85c231 api doc for glutWMClosefunc was wrong....
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1503 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-13 09:48:51 +00:00
dcnieho
dae7120ed5 now have 64bit internal time on Windows, as we deal with wrap of timeGetTime manually
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1502 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-09 11:59:32 +00:00
dcnieho
17a8372217 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: https://svn.code.sf.net/p/freeglut/code/trunk@1501 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-27 12:38:28 +00:00
dcnieho
f79dae9865 smoothgl3 and shapes demos, now checking if glutGetProcAddress calls give us valid function pointers
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1500 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-27 11:56:32 +00:00
dcnieho
05a9a7c907 Make CTRL and SHIFT arrive properly in single (as opposed to MultiButton) mouse events, thanks Philipp!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1496 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:53:30 +00:00
dcnieho
d657a564e5 fixed closing window crash, thanks Philipp!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1495 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:51:25 +00:00
dcnieho
242d359f5b oops, debug code that shouldn't have been committed got in there...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1494 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:46:22 +00:00
dcnieho
14276cac9e Updating last edit time and FreeGLUT version for API document
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1493 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:33:54 +00:00
dcnieho
bbefe8aee0 avoid crash on null temp_window, thanks Phillip Kutin!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1490 7f0cb862-5218-0410-a997-914c9d46530a
2012-12-18 05:19:21 +00:00
dcnieho
ff0366185f removed unnecessary token pasting (##) preprocessor directives that blew
up some builds. thanks Phillip Kutin!



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1489 7f0cb862-5218-0410-a997-914c9d46530a
2012-12-18 05:13:42 +00:00