glutJoystickFunc - Man Page

Reports joystick state for the current window.

Library

OpenGLUT - input

Synopsis

#include <openglut.h>

void
glutJoystickFunc(void( *callback )( unsigned int buttons, int xaxis, int yaxis, int zaxis ), int pollInterval);

Parameters


callback

Client function for joystick events


pollInterval

Approximate (minimum) millisecond interval

Description

The callback is called roughly every


pollinterval

milliseconds, and will give the joystick status.

The


buttons

bitmask is a bit-wise


OR

of:
- GLUT_JOYSTICK_BUTTON_A
- GLUT_JOYSTICK_BUTTON_B
- GLUT_JOYSTICK_BUTTON_C
- GLUT_JOYSTICK_BUTTON_D

The axis values are in the range [-1000,1000].

Referenced By

glutForceJoystickFunc(3).