Commit Graph

1848 Commits

Author SHA1 Message Date
Rcmaniac25
b1401de9a9 Removed "hack" macro set 2017-06-10 01:16:01 -04: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
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
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
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
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
Diederick Niehorster
575feb52b0 Merge remote-tracking branch 'svn/trunk' into git_master 2015-12-14 17:23:27 +01: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
dcnieho
5a86d86eef Updated documentation in relation to GLUT_ALLOW_NEGATIVE_WINDOW_POSITION.
(cherry picked from commit 9fa5db9841)

(cherry picked from commit 9fa5db9841)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1777 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:31 +00:00
dcnieho
d8e364d053 Defined logic for glutCreateSubWindow when negative position is allowed
Added check for if fgCreateWindow cannot allocate a window, it will produce an error.

(cherry picked from commit 0ed05f6458)

(cherry picked from commit 0ed05f6458)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1776 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:25 +00:00
dcnieho
d898bfe4c6 Added GLUT_ALLOW_NEGATIVE_WINDOW_POSITION so windows can be created with negative position coordinates.
(cherry picked from commit e7f38b763f)

(cherry picked from commit e7f38b763f)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1775 7f0cb862-5218-0410-a997-914c9d46530a
2015-12-14 16:22:18 +00:00
Diederick C. Niehorster
49921da0d0 Merge pull request #40 from Tarnyko/git_master
Mention Wayland build requirements in documentation
2015-12-14 17:20:48 +01:00
Diederick C. Niehorster
8dd4743e55 Merge pull request #39 from rcmaniac25/feature/negative_window_coordinates
Support for negative window position coordinates
2015-12-14 17:20:39 +01:00
John Archdeacon
6b8552edbd 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.
2015-12-13 16:59:39 -05:00
Rcmaniac25
836fe46441 Additional clarification about GLUT_ALLOW_NEGATIVE_WINDOW_POSITION 2015-12-13 16:53:20 -05:00
Manuel Bachmann
18773bcc81 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>
2015-12-07 15:41:58 +01:00
Rcmaniac25
9fa5db9841 Updated documentation in relation to GLUT_ALLOW_NEGATIVE_WINDOW_POSITION. 2015-12-06 01:01:28 -05:00
Rcmaniac25
0ed05f6458 Defined logic for glutCreateSubWindow when negative position is allowed
Added check for if fgCreateWindow cannot allocate a window, it will produce an error.
2015-12-05 16:12:49 -05:00
Rcmaniac25
e7f38b763f Added GLUT_ALLOW_NEGATIVE_WINDOW_POSITION so windows can be created with negative position coordinates. 2015-12-05 16:12:49 -05:00
Diederick Niehorster
0d4a47137e Merge remote-tracking branch 'svn/trunk' into git_master 2015-10-24 12:41:53 +02:00
jtsiomb
f0facfc489 minor C89 conformity fixes in fg_window_egl.c
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1774 7f0cb862-5218-0410-a997-914c9d46530a
2015-10-20 04:35:28 +00:00
Diederick Niehorster
b7737a9c94 Merge remote-tracking branch 'svn/trunk' into git_master 2015-10-17 13:15:34 +02:00
dcnieho
008bc37708 Removed invalid PDB install
(cherry picked from commit 23a12a465b)

(cherry picked from commit 23a12a465b)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1773 7f0cb862-5218-0410-a997-914c9d46530a
2015-10-17 11:15:29 +00:00
Diederick C. Niehorster
785aaa8811 Merge pull request #36 from rcmaniac25/fix/pdb_install
Removed invalid PDB install
2015-10-17 13:14:20 +02:00
Rcmaniac25
23a12a465b Removed invalid PDB install 2015-10-17 00:38:22 -04:00
dcnieho
98695e579d Export relevant static compile flags on windows.
Use target_compile_definitions to populate the
INTERFACE_COMPILE_DEFINITIONS property on the freeglut_static target on
windows.

(cherry picked from commit ffc24cfb76)

(cherry picked from commit ffc24cfb76)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1772 7f0cb862-5218-0410-a997-914c9d46530a
2015-10-12 09:08:37 +00:00
Diederick Niehorster
bb46cf19d2 Merge remote-tracking branch 'svn/trunk' into git_master 2015-10-12 11:08:31 +02:00
Diederick C. Niehorster
3ca71acdab Merge pull request #35 from jzarl/fix_cmake_package_usage_requirements
Export relevant static compile flags on windows.
2015-10-12 11:01:22 +02:00
Johannes Zarl-Zierl
ffc24cfb76 Export relevant static compile flags on windows.
Use target_compile_definitions to populate the
INTERFACE_COMPILE_DEFINITIONS property on the freeglut_static target on
windows.
2015-10-10 23:31:14 +02:00
dcnieho
9825293425 Set public definitions in cmake package.
As with pkg-config, the cmake package now sets "-DFREEGLUT_GLES" when
appropriate.

(cherry picked from commit 792d805542)

(cherry picked from commit 792d805542)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1771 7f0cb862-5218-0410-a997-914c9d46530a
2015-07-11 21:27:03 +00:00
Diederick Niehorster
d3839cd975 Merge remote-tracking branch 'svn/trunk' into git_master 2015-07-11 23:26:59 +02:00
dcnieho
866f61ae9c Create cmake package using imported targets.
Create and install the necessary files so that cmake can find FreeGLUT
in config mode ("find_package(FreeGLUT CONFIG)").

This pushes cmake_minimum_required to 3.0.0.

(cherry picked from commit ba7326ce8d)

(cherry picked from commit ba7326ce8d)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1770 7f0cb862-5218-0410-a997-914c9d46530a
2015-07-11 21:26:56 +00:00
dcnieho
c751a9179d Fix compilation on Linux.
Commit ce15044f73 introduced an error
"undefined reference to `sball_initialized'" on non-Windows operating
systems.

(cherry picked from commit 989ceddc19)

(cherry picked from commit 989ceddc19)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1769 7f0cb862-5218-0410-a997-914c9d46530a
2015-07-11 21:26:48 +00:00
Diederick C. Niehorster
9f7338ebe5 Merge pull request #32 from jzarl/cmake-package
Cmake package
2015-07-11 23:25:29 +02:00
Diederick C. Niehorster
e55bfc05a7 Merge pull request #31 from jzarl/fix_compile_linux
Fix compilation on Linux.
2015-07-11 23:20:54 +02:00
Johannes Zarl
792d805542 Set public definitions in cmake package.
As with pkg-config, the cmake package now sets "-DFREEGLUT_GLES" when
appropriate.
2015-07-10 22:13:50 +02:00