From dc4f2d3847b55401721b40b47582cde53a474b54 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:04 +0000 Subject: [PATCH 1/9] update comments of WCB_SpaceXXX in fg_internal.h (cherry picked from commit 1091f89cf64d255a1fae5c331e556ec52dd6aa3c) (cherry picked from commit 1091f89cf64d255a1fae5c331e556ec52dd6aa3c) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1783 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/fg_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freeglut/freeglut/src/fg_internal.h b/freeglut/freeglut/src/fg_internal.h index af226c4..2cecf71 100644 --- a/freeglut/freeglut/src/fg_internal.h +++ b/freeglut/freeglut/src/fg_internal.h @@ -632,9 +632,9 @@ enum /* Presently ignored */ WCB_Select, WCB_OverlayDisplay, - WCB_SpaceMotion, /* presently implemented only on UNIX/X11 */ - WCB_SpaceRotation, /* presently implemented only on UNIX/X11 */ - WCB_SpaceButton, /* presently implemented only on UNIX/X11 */ + WCB_SpaceMotion, /* presently implemented only on UNIX/X11 and Windows */ + WCB_SpaceRotation, /* presently implemented only on UNIX/X11 and Windows */ + WCB_SpaceButton, /* presently implemented only on UNIX/X11 and Windows */ WCB_Dials, WCB_ButtonBox, WCB_TabletMotion, From 09c97585c9b6ddc3405930c811a65fac76cfd39c Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:11 +0000 Subject: [PATCH 2/9] Added API macros for Spaceball buttons. (cherry picked from commit 472bc2bf627cd9a607ac6d59c8e6cb36e72e3aaf) (cherry picked from commit 472bc2bf627cd9a607ac6d59c8e6cb36e72e3aaf) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1784 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/include/GL/freeglut_std.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/freeglut/freeglut/include/GL/freeglut_std.h b/freeglut/freeglut/include/GL/freeglut_std.h index a658c7c..5ffc5a0 100644 --- a/freeglut/freeglut/include/GL/freeglut_std.h +++ b/freeglut/freeglut/include/GL/freeglut_std.h @@ -407,6 +407,13 @@ #define GLUT_GAME_MODE_REFRESH_RATE 0x0005 #define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006 +/* + * GLUT API macro definitions -- Spaceball button definitions + */ + +#define GLUT_SPACEBALL_BUTTON_A 0x0001 +#define GLUT_SPACEBALL_BUTTON_B 0x0002 + /* * Initialization functions, see fglut_init.c */ From 2e7a973056e5bdc585550609da6a23365994a151 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:18 +0000 Subject: [PATCH 3/9] fixed php syntax error, unexpected end of file in template.php: replaced pair with short open tag (cherry picked from commit f4bc97b6d55db9d69b5a488d427f39d4a8c4ef03) (cherry picked from commit f4bc97b6d55db9d69b5a488d427f39d4a8c4ef03) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1785 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/web-src/template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freeglut/web-src/template.php b/freeglut/web-src/template.php index 2669407..ad101bd 100644 --- a/freeglut/web-src/template.php +++ b/freeglut/web-src/template.php @@ -40,7 +40,7 @@ function generateHeader($self) <? echo $title ?> - - freeglut logo
The Free OpenGL Utility Toolkit

-View PHP Source"; ?> - Date: Wed, 20 Jan 2016 19:48:25 +0000 Subject: [PATCH 4/9] Added API macros for additional Spaceball buttons. (cherry picked from commit 1a24699b9a502be238d813e97449214b6acdc863) (cherry picked from commit 1a24699b9a502be238d813e97449214b6acdc863) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1786 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/include/GL/freeglut_std.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freeglut/freeglut/include/GL/freeglut_std.h b/freeglut/freeglut/include/GL/freeglut_std.h index 5ffc5a0..37d29be 100644 --- a/freeglut/freeglut/include/GL/freeglut_std.h +++ b/freeglut/freeglut/include/GL/freeglut_std.h @@ -413,6 +413,9 @@ #define GLUT_SPACEBALL_BUTTON_A 0x0001 #define GLUT_SPACEBALL_BUTTON_B 0x0002 +#define GLUT_SPACEBALL_BUTTON_C 0x0004 +#define GLUT_SPACEBALL_BUTTON_D 0x0008 +#define GLUT_SPACEBALL_BUTTON_E 0x0010 /* * Initialization functions, see fglut_init.c From 8503b82e20ca125c31cbd263c44f3e8ce757a7ae Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:32 +0000 Subject: [PATCH 5/9] Added API documentation for glutSpaceballXXX functions. (cherry picked from commit 21cccdf7f36e75e4f365ce314fdbdd75ea54498a) (cherry picked from commit 21cccdf7f36e75e4f365ce314fdbdd75ea54498a) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1787 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/web-src/docs/api.php | 38 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index 37d75e5..ffece5d 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -1326,46 +1326,53 @@ as mouse buttons.

The glutSpaceballMotionFunc function is implemented in -freeglut on X11 only. On other platforms, function stubs are +freeglut on X11 and Windows only. On other platforms, function stubs are provided so that GLUT-based programs can compile and link against freeglut without modification.

+

The glutSpaceballMotionFunc function sets the window's Spaceball motion callback. Freeglut invokes this callback when the user push/pull Spaceball cap in x, y, and z directions. +

Usage

-

void glutSpaceballMotionFunc ( void -(* callback)( int x, int y, int z ) );

+

void glutSpaceballMotionFunc ( void (* callback)( int x, int y, int z ) );

Description

-

TODO

+

The x, y, and z arguments indicate the amount of translation in integer along x, y, and z axis respectively.

+

The x, y, and z axes form a common OpenGL right-handed coordinate system. A positive value of x, y, or z indicates movement along the positive direction of the respective axis, while the negative one denotes movement along negative direction.

12.16 glutSpaceballRotateFunc

The glutSpaceballRotateFunc function is implemented in -freeglut on X11 only. On other platforms, function stubs are +freeglut on X11 and Windows only. On other platforms, function stubs are provided so that GLUT-based programs can compile and link against freeglut without modification.

+

The glutSpaceballRotateFunc function sets the window's Spaceball rotation callback. Freeglut invokes this callback when the user rotates/twists Spaceball cap. +

Usage

-

void glutSpaceballRotateFunc ( void -(* callback)( int x, int y, int z ) );

+

void glutSpaceballRotateFunc ( void (* callback)( int rx, int ry, int rz ) );

Description

-

TODO

+

The rx, ry, and rz arguments indicate the amount of rotation in integer with respect to x, y, and z axis respectively.

+

The x, y, and z axes form a common OpenGL right-handed coordinate system. Positive value of rx, ry, or rz indicates counter-clock wise rotation along the respective axis, while negative one denotes clock wise rotation.

12.17 glutSpaceballButtonFunc

The glutSpaceballButtonFunc function is implemented in -freeglut on X11 only. On other platforms, function stubs are +freeglut on X11 and Windows only. On other platforms, function stubs are provided so that GLUT-based programs can compile and link against freeglut without modification.

+

+The glutSpaceballButtonFunc function sets the window's Spaceball button callback. Freeglut invokes this callback when the user presses/releases one of the Spaceball buttons. +

Usage

@@ -1374,7 +1381,18 @@ provided so that GLUT-based programs can compile and link against

Description

-

TODO

+

The button argument may take one of the following defined constant values

+
    +
  • + GLUT_SPACEBALL_BUTTON_A, GLUT_SPACEBALL_BUTTON_B,..., GLUT_SPACEBALL_BUTTON_E +
  • +
+

The updown argument may take one of the two defined constant values

+
    +
  • + GLUT_DOWN, GLUT_UP indicating if button is pressed or released. +
  • +

12.18 glutButtonBoxFunc

From be5e4ec604a3c9158c2c68bf437b4d09ecf6d56d Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:39 +0000 Subject: [PATCH 6/9] moved spaceball macros from freeglut_std.h to freeglut_ext.h (cherry picked from commit 13e6cf15916b12166fb98aaac6f3360c2e044f01) (cherry picked from commit 13e6cf15916b12166fb98aaac6f3360c2e044f01) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1788 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/include/GL/freeglut_ext.h | 10 ++++++++++ freeglut/freeglut/include/GL/freeglut_std.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/freeglut/freeglut/include/GL/freeglut_ext.h b/freeglut/freeglut/include/GL/freeglut_ext.h index 4fc33ec..2ef96c2 100644 --- a/freeglut/freeglut/include/GL/freeglut_ext.h +++ b/freeglut/freeglut/include/GL/freeglut_ext.h @@ -126,6 +126,16 @@ #define GLUT_CORE_PROFILE 0x0001 #define GLUT_COMPATIBILITY_PROFILE 0x0002 +/* +* GLUT API Extension macro definitions -- Spaceball button definitions +*/ + +#define GLUT_SPACEBALL_BUTTON_A 0x0001 +#define GLUT_SPACEBALL_BUTTON_B 0x0002 +#define GLUT_SPACEBALL_BUTTON_C 0x0004 +#define GLUT_SPACEBALL_BUTTON_D 0x0008 +#define GLUT_SPACEBALL_BUTTON_E 0x0010 + /* * Process loop function, see fg_main.c */ diff --git a/freeglut/freeglut/include/GL/freeglut_std.h b/freeglut/freeglut/include/GL/freeglut_std.h index 37d29be..a658c7c 100644 --- a/freeglut/freeglut/include/GL/freeglut_std.h +++ b/freeglut/freeglut/include/GL/freeglut_std.h @@ -407,16 +407,6 @@ #define GLUT_GAME_MODE_REFRESH_RATE 0x0005 #define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006 -/* - * GLUT API macro definitions -- Spaceball button definitions - */ - -#define GLUT_SPACEBALL_BUTTON_A 0x0001 -#define GLUT_SPACEBALL_BUTTON_B 0x0002 -#define GLUT_SPACEBALL_BUTTON_C 0x0004 -#define GLUT_SPACEBALL_BUTTON_D 0x0008 -#define GLUT_SPACEBALL_BUTTON_E 0x0010 - /* * Initialization functions, see fglut_init.c */ From 6f764746e1c6af45e26e3985f7f7176763513309 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:49 +0000 Subject: [PATCH 7/9] bug fix (cherry picked from commit 9dfba8b7de677ee4deaeb1b64d4a426ca7a24260) (cherry picked from commit 9dfba8b7de677ee4deaeb1b64d4a426ca7a24260) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1789 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/mswin/fg_spaceball_mswin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/src/mswin/fg_spaceball_mswin.c b/freeglut/freeglut/src/mswin/fg_spaceball_mswin.c index 00e42f6..0dfa3e9 100644 --- a/freeglut/freeglut/src/mswin/fg_spaceball_mswin.c +++ b/freeglut/freeglut/src/mswin/fg_spaceball_mswin.c @@ -184,9 +184,9 @@ void fgSpaceballHandleWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam) unsigned long stateNow = dwKeystate&(1 << i); if (stateBefore && !stateNow) - INVOKE_WCB(*window, SpaceButton, (stateBefore, GLUT_DOWN)); + INVOKE_WCB(*window, SpaceButton, (stateBefore, GLUT_UP)); if (!stateBefore && stateNow) - INVOKE_WCB(*window, SpaceButton, (stateNow, GLUT_UP)); + INVOKE_WCB(*window, SpaceButton, (stateNow, GLUT_DOWN)); } } From 7e16d00e49c121380cce348659a6b7083439cd5c Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:48:55 +0000 Subject: [PATCH 8/9] Noted the numerical value for spaceball button macro (cherry picked from commit 5f6e4fbe6895104f092267307495b3e2887d6d9e) (cherry picked from commit 5f6e4fbe6895104f092267307495b3e2887d6d9e) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1790 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/web-src/docs/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index ffece5d..9cfeacd 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -1384,7 +1384,7 @@ The glutSpaceballButtonFunc function sets the window's Spaceball button

The button argument may take one of the following defined constant values

  • - GLUT_SPACEBALL_BUTTON_A, GLUT_SPACEBALL_BUTTON_B,..., GLUT_SPACEBALL_BUTTON_E + GLUT_SPACEBALL_BUTTON_A(0x00000001), GLUT_SPACEBALL_BUTTON_B(0x00000002),..., GLUT_SPACEBALL_BUTTON_E(0x00000010)

The updown argument may take one of the two defined constant values

From 3bed0feb38b20125db302bdba86e2d1090d2edf7 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 20 Jan 2016 19:49:02 +0000 Subject: [PATCH 9/9] fixing up some docs regarding spaceball buttons (cherry picked from commit c9442fa1197d293f86884dc67d462ac7e55a02a4) (cherry picked from commit c9442fa1197d293f86884dc67d462ac7e55a02a4) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1791 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/web-src/docs/api.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index 9cfeacd..1b5a08b 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -1381,19 +1381,31 @@ The glutSpaceballButtonFunc function sets the window's Spaceball button

Description

-

The button argument may take one of the following defined constant values

+

The button argument may take one of the following defined +constant values:

    -
  • - GLUT_SPACEBALL_BUTTON_A(0x00000001), GLUT_SPACEBALL_BUTTON_B(0x00000002),..., GLUT_SPACEBALL_BUTTON_E(0x00000010) -
  • +
  • GLUT_SPACEBALL_BUTTON_A (0x00000001)
  • +
  • GLUT_SPACEBALL_BUTTON_B (0x00000002)
  • +
  • GLUT_SPACEBALL_BUTTON_C (0x00000004)
  • +
  • GLUT_SPACEBALL_BUTTON_D (0x00000008)
  • +
  • GLUT_SPACEBALL_BUTTON_E (0x00000010)
-

The updown argument may take one of the two defined constant values

+

The updown argument may take one of the two defined constant +values:

  • GLUT_DOWN, GLUT_UP indicating if button is pressed or released.
+

Changes From GLUT

+ +

+The GLUT_SPACEBALL_BUTTON_ defines for the button argument of +the callback are not provided by GLUT, but the numerical values returned +are the same. +

+

12.18 glutButtonBoxFunc