Commit Graph

1979 Commits

Author SHA1 Message Date
dcnieho
da3e00905e Fixed issue where setting the same callback with different user pointer wouldn't change the user pointer.
Removed extra comment on FETCH_USER_DATA_WCB
Renamed helper callbacks from glutXXXCalback to fghXXXCallback

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1816 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:53 +00:00
dcnieho
16d920d56a Added compiler feature detection for __VA_ARGS__ and GCC ##__VA_ARGS__
Made macro names more explicit to prevent name conflicts

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1815 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:46 +00:00
dcnieho
dbbf2e5f08 Implemented pre-C99 support for macro expansion for callbacks.
Note: not tested with a pre-C99 compiler as I (the author) don't have any compiler that doesn't C99.

Fixed copyright too.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1814 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:40 +00:00
dcnieho
0209cd1ef5 Bug fix for GCC compiler usage
Removed old/original GCC implementation of EXPAND_WCB

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1813 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:34 +00:00
dcnieho
658edf902d Initial refactoring of callback macros to make sure all compilers are supported
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1812 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:28 +00:00
dcnieho
f0150de08d More explicit argument list for INVOKE_WCB callbacks
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1811 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:21 +00:00
dcnieho
da0b7b3369 Changed EXPAND_WCB so it works with MSVC and GCC
- Required adding an "argument expansion macro" for each callback (hope to remove eventually)
- Fixed MSVC linking error where glutMenuStatusFuncUCall had the incorrect case and should've been glutMenuStatusFuncUcall
- Updated formatting of some freeglut_ext.h functions

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1810 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:14 +00:00
dcnieho
827f593d96 Finished implementing all user-data callbacks (GCC-only for now).
Updated glutCreateMenu, glutIdleFunc, and glutTimerFunc so they handle NULL callback cases.
Removed glutMenuStateFuncUcall (as glutMenuStateFunc is a depreciated function).

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1809 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:21:06 +00:00
dcnieho
3c3e3cd234 Initial work on callbacks with user data parameters.
-glutCreateMenuUcall
-glutTimerFuncUcall
-glutIdleFuncUcall

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1808 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-30 23:20:57 +00:00
Diederick C. Niehorster
913c66e35e Merge pull request #42 from rcmaniac25/feature/usr_callback_support
User data callback support
2017-07-01 01:14:41 +02:00
Diederick C. Niehorster
75cd7a2fb4 Merge pull request #57 from rcmaniac25/bugfix/xinput_no_error_on_not_found
CMake error on X11 builds if XInput.h is not found
2017-06-15 08:29:21 +02:00
Diederick C. Niehorster
41f34945c8 Merge remote-tracking branch 'svn/trunk' into git_master 2017-06-14 22:53:21 +02:00
dcnieho
1941df93b9 freeglut should be spelled lowercase, fixed up all documentation
(cherry picked from commit 16e941b2a2)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1807 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-14 20:51:30 +00:00
dcnieho
75854e0698 multi-touch demo: if an index 64 would come in, this would be written in the wrong place in the cursor buffer. Supporting 64 IDs means writing to slots 0--63
(cherry picked from commit bef94a71b1)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1806 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-14 20:51:20 +00:00
dcnieho
caa5ffe29a resizer demo: adding a bit more output to console to indicate what is going on upon keypress
(cherry picked from commit f04be0c4f2)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1805 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-14 20:51:14 +00:00
dcnieho
26a9d9ca03 multi-touch callback had a copy paste error in the draw loop (thanks sorav for reporting)
(cherry picked from commit a40f9e9c4e)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1804 7f0cb862-5218-0410-a997-914c9d46530a
2017-06-14 20:51:09 +00:00
Rcmaniac25
3e6d77f718 Fixed incorrect MESSAGE usage 2017-06-14 02:02:58 -04:00
Rcmaniac25
e5cd3595a5 CMake produces an error if XInput.h is not found 2017-06-10 01:25:32 -04:00
Rcmaniac25
b1401de9a9 Removed "hack" macro set 2017-06-10 01:16:01 -04:00
Diederick C. Niehorster
16e941b2a2 freeglut should be spelled lowercase, fixed up all documentation 2017-06-07 22:05:27 +02:00
Diederick C. Niehorster
bef94a71b1 multi-touch demo: if an index 64 would come in, this would be written in the wrong place in the cursor buffer. Supporting 64 IDs means writing to slots 0--63 2017-06-05 20:50:44 +02:00
Diederick C. Niehorster
f04be0c4f2 resizer demo: adding a bit more output to console to indicate what is going on upon keypress 2017-06-05 20:33:52 +02:00
Diederick C. Niehorster
a40f9e9c4e multi-touch callback had a copy paste error in the draw loop (thanks sorav for reporting) 2017-06-05 20:32:27 +02:00
Rcmaniac25
e9676fc406 Corrected phrasing in docs and unneeded \ in code 2017-06-04 15:39:13 -04:00
Rcmaniac25
47f69d8655 Fixed x11 and Wayland not using INVOKE_WCB
...since INVOKE_WCB handled user data. Now they handle user data.
2017-05-31 03:07:57 -04:00
Rcmaniac25
4fe9d11e56 Added timer_callback sample for user callbacks 2017-05-29 20:25:42 -04:00
Rcmaniac25
df67607c0a Added "hack" function for glutCreateMenuUcall
Not desired, but potentially needed as with the other "hack" functions
2017-05-29 20:23:58 -04:00
Diederick C. Niehorster
40a20ed2b1 Merge remote-tracking branch 'svn/trunk' into git_master 2017-05-26 12:25:30 +02:00
jtsiomb
d860b2e225 In glutMainLoop, the checking of ExecState, and wether it's equal to
GLUT_EXEC_STATE_RUNNING should not have been at the top of the loop, but rather
right after glutMainLoopEvent returns, after it processes a single event. As it
was, we would be sleeping, waiting for further events even if the user just
called glutLeaveMainLoop (which sets ExecState to GLUT_EXEC_STATE_STOP).

Also fixed a couple cases if inconsistent use of tabs/spaces for indentation
which was causing gcc to emit bogus warnings about misleading indentation
around braceless ifs.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1803 7f0cb862-5218-0410-a997-914c9d46530a
2017-05-25 06:34:57 +00:00
Diederick C. Niehorster
d1418bfcca Merge remote-tracking branch 'svn/trunk' into git_master 2017-05-14 22:52:30 +02:00
dcnieho
f9acc79690 Update README.md
bit more logical ordering of content

(cherry picked from commit 6cb86e9657)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1802 7f0cb862-5218-0410-a997-914c9d46530a
2017-05-14 20:52:19 +00:00
Diederick C. Niehorster
6cb86e9657 Update README.md
bit more logical ordering of content
2017-05-14 22:51:31 +02:00
dcnieho
d7425510d3 updated text on main website page regarding license of FreeGLUT (reverted from commit 174bd48290)
(cherry picked from commit 5488acab38)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1801 7f0cb862-5218-0410-a997-914c9d46530a
2017-05-14 20:49:53 +00:00
dcnieho
50212bcb3b Ensure "maximixed" is taken into account when updating window visibility on WM_SIZE
(cherry picked from commit 5b8a164de1)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1800 7f0cb862-5218-0410-a997-914c9d46530a
2017-05-14 20:49:46 +00:00
Diederick C. Niehorster
5488acab38 updated text on main website page regarding license of FreeGLUT (reverted from commit 174bd48290) 2017-05-14 22:47:10 +02:00
Diederick C. Niehorster
2c780f6d4f Merge pull request #56 from rcmaniac25/bugfix/sf233_maximum_iconify_restore
Ensure "maximixed" is taken into account when updating window visibility on WM_SIZE
2017-05-14 22:42:45 +02:00
Rcmaniac25
5b8a164de1 Ensure "maximixed" is taken into account when updating window visibility on WM_SIZE 2017-05-13 01:48:32 -04:00
Diederick C. Niehorster
c02a76e393 Merge remote-tracking branch 'svn/trunk' into git_master 2017-04-26 10:46:11 +02:00
dcnieho
174bd48290 updated text on main website page regarding license of FreeGLUT
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1799 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-26 08:45:38 +00:00
dcnieho
474975bc41 CMake: include/GL/glut.h should only be installed when FREEGLUT_REPLACE_GLUT is ON
(cherry picked from commit a0b77bba49)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1798 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-26 08:45:32 +00:00
dcnieho
585d7bfdee Added templates
(cherry picked from commit a83772981f)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1797 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-26 08:45:26 +00:00
Diederick C. Niehorster
54f397d23b Merge pull request #55 from rcmaniac25/feature/github_templates
Added GitHub templates for issues and PRs
2017-04-26 10:37:00 +02:00
Rcmaniac25
a83772981f Added templates 2017-04-25 21:55:49 -04:00
Diederick C. Niehorster
a0b77bba49 CMake: include/GL/glut.h should only be installed when FREEGLUT_REPLACE_GLUT is ON 2017-04-22 23:00:22 +02:00
Diederick C. Niehorster
8e369de416 Merge remote-tracking branch 'svn/trunk' into git_master 2017-04-22 22:05:42 +02:00
dcnieho
18dffcc4b5 Correct spelling error
(cherry picked from commit fadb3bede9)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1796 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-22 20:05:18 +00:00
dcnieho
a7930a626e Fixed indentation characters in CMakeLists.txt
(cherry picked from commit c1efb69d4e)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1795 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-22 20:05:12 +00:00
dcnieho
2594b6d6c8 Fixed Cflags variable in pkgconfig file.
(cherry picked from commit bc5471a2f8)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1794 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-22 20:05:06 +00:00
dcnieho
c985322fc0 Added FREEGLUT_REPLACE_GLUT configure option for MS Windows.
It provides back compatibility with older (autotools based) freeglut versions.
Also it simplifies build rules for crossplatform programs: they may be linked
with -lglut regardless of the system and library type (shared/static).

Patch is originally prepared for MXE project (http://mxe.cc/).

(cherry picked from commit cd9ac605ec)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1793 7f0cb862-5218-0410-a997-914c9d46530a
2017-04-22 20:05:01 +00:00
Diederick C. Niehorster
0a695848a9 Merge pull request #48 from tehnick/fixes-from-mxe-project
Added FREEGLUT_REPLACE_GLUT configure option for MS Windows
2017-04-22 22:02:53 +02:00