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/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, 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)); } } diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index 37d75e5..9cfeacd 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

+ +

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

+

12.18 glutButtonBoxFunc

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"; ?> -