glutSpaceballButtonFunc man page

glutSpaceballButtonFunc ā€” Sets a spaceball button callback.

Library

OpenGLUT - input

Synopsis

#include <openglut.h>

void
glutSpaceballButtonFunc(void( *callback )( int button, int state ));

Parameters

callback

Client spaceball button hook.

Description

This function registers a callback for a spaceball to report buttons. A spaceball has six axes of freedom (three of motion and three of orientation), plus buttons. The spaceball has glutDeviceGet(

GLUT_NUM_SPACEBALL_BUTTONS)

and numbers them from 1. Button state is either

GLUT_UP

or

GLUT_DOWN.

The callback is bound to the
current window

.

Caveats

OpenGLUT does not implement spaceball support.

In contrast, mouse buttons are numbered from 0 in the GLUT API. This is a wrinkle.

See Also

glutSpaceballRotateFunc(3) glutSpaceballMotiononFunc,(3)

Info

August 9, 2018