Commit Graph

1721 Commits

Author SHA1 Message Date
Thomas Klausner
0b64b227b5 Do not define HAVE_USBHID_H manually, cmake does it for us.
(cherry picked from commit 78b19bfc9709d5c4175a7866059a42c478272071)
2017-07-12 22:29:31 +02: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
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
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
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
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
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
dcnieho
979c5ce24d XParseGeometry will always be needed for Windows, no need for cmake to figure this out.
(cherry picked from commit 55e4430113)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1792 7f0cb862-5218-0410-a997-914c9d46530a
2016-02-21 20:40:10 +00:00
Rcmaniac25
a8621ad942 Moved as many callback setters as possible to macro function generators
Moved macro function generators to fg_callback_macros.h
2016-02-07 15:16:01 -05:00
Rcmaniac25
682d4d096a Updated documentation to mention and discuss user-data callbacks. 2016-02-04 21:14:40 -05:00
Rcmaniac25
666b80843a Fixed bug where, under c89 mode, callback macros wouldn't work
Under c89 (only applies to GCC-like compilers), the variadic macro version would be used and compilation would fail.
2016-01-21 21:15:59 -05:00
Rcmaniac25
363ed17d99 Removed unneeded line optimization for INVOKE_WCB macro 2016-01-21 06:22:03 -05:00
dcnieho
3bed0feb38 fixing up some docs regarding spaceball buttons
(cherry picked from commit c9442fa119)

(cherry picked from commit c9442fa119)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1791 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:49:02 +00:00
dcnieho
7e16d00e49 Noted the numerical value for spaceball button macro
(cherry picked from commit 5f6e4fbe68)

(cherry picked from commit 5f6e4fbe68)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1790 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:55 +00:00
dcnieho
6f764746e1 bug fix
(cherry picked from commit 9dfba8b7de)

(cherry picked from commit 9dfba8b7de)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1789 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:49 +00:00
dcnieho
be5e4ec604 moved spaceball macros from freeglut_std.h to freeglut_ext.h
(cherry picked from commit 13e6cf1591)

(cherry picked from commit 13e6cf1591)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1788 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:39 +00:00
dcnieho
8503b82e20 Added API documentation for glutSpaceballXXX functions.
(cherry picked from commit 21cccdf7f3)

(cherry picked from commit 21cccdf7f3)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1787 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:32 +00:00
dcnieho
6dc4eb9dc2 Added API macros for additional Spaceball buttons.
(cherry picked from commit 1a24699b9a)

(cherry picked from commit 1a24699b9a)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1786 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:25 +00:00
dcnieho
2e7a973056 fixed php syntax error, unexpected end of file in template.php: replaced <?php ?> pair with short open tag <? ?>
(cherry picked from commit f4bc97b6d5)

(cherry picked from commit f4bc97b6d5)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1785 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:18 +00:00
dcnieho
09c97585c9 Added API macros for Spaceball buttons.
(cherry picked from commit 472bc2bf62)

(cherry picked from commit 472bc2bf62)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1784 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:11 +00:00
dcnieho
dc4f2d3847 update comments of WCB_SpaceXXX in fg_internal.h
(cherry picked from commit 1091f89cf6)

(cherry picked from commit 1091f89cf6)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1783 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-20 19:48:04 +00:00
Rcmaniac25
60a437b3b8 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
2016-01-18 22:15:24 -05:00
dcnieho
8b07b11dc8 fixed up wrong comment
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1782 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-17 23:53:11 +00:00
Rcmaniac25
55fd60f288 Added compiler feature detection for __VA_ARGS__ and GCC ##__VA_ARGS__
Made macro names more explicit to prevent name conflicts
2016-01-17 00:50:49 -05:00
Rcmaniac25
874ed4d328 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.
2016-01-16 23:00:00 -05:00
Rcmaniac25
c911286579 Bug fix for GCC compiler usage
Removed old/original GCC implementation of EXPAND_WCB
2016-01-16 14:36:33 -05:00
Rcmaniac25
33f75e0b89 Initial refactoring of callback macros to make sure all compilers are supported 2016-01-16 14:30:47 -05:00
Rcmaniac25
38364b1952 More explicit argument list for INVOKE_WCB callbacks 2016-01-16 13:17:07 -05:00
dcnieho
a2f7cd975f Emit the correct LIBNAME to .pc files
Irrespective of "FREEGLUT_REPLACE_GLUT" being set to "No" or being on
Win32 where this variable does not even exist, the .pc file contained
Libs: -L${libdir} -lglut

Instead, emit the correct value.

(cherry picked from commit d06589f55c)

(cherry picked from commit d06589f55c)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1781 7f0cb862-5218-0410-a997-914c9d46530a
2016-01-12 21:09:00 +00:00
Rcmaniac25
fd9fa6745d 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
2016-01-03 00:09:28 -05:00
Rcmaniac25
ea5b9552fb 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).
2015-12-28 23:46:38 -05:00
Rcmaniac25
2a5af16426 Initial work on callbacks with user data parameters.
-glutCreateMenuUcall
-glutTimerFuncUcall
-glutIdleFuncUcall
2015-12-28 23:45:50 -05:00
dcnieho
1026c5e915 Mention Wayland build requirements in documentation
Following https://github.com/dcnieho/FreeGLUT/issues/38 ;
mention Wayland support in README, Wayland build
instructions and requirements in README.cmake.

Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>

(cherry picked from commit 18773bcc81)

(cherry picked from commit 18773bcc81)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1780 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:51 +00:00
dcnieho
012736d296 Fixed C2275 compiler error in fg_spaceball_mswin.c
- Known to only affect Visual Studio 2010. Visual Studio 2013 and up may have relaxed the error.

(cherry picked from commit 6b8552edbd)

(cherry picked from commit 6b8552edbd)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1779 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:44 +00:00
dcnieho
f812349a8f Additional clarification about GLUT_ALLOW_NEGATIVE_WINDOW_POSITION
(cherry picked from commit 836fe46441)

(cherry picked from commit 836fe46441)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1778 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:38 +00:00