Scroll to navigation

GLUTTIMERFUNC(3) Library Functions Manual (local) GLUTTIMERFUNC(3)

NAME

glutTimerFuncSets the Timer callback for the current window.

LIBRARY

OpenGLUT - idletimer

SYNOPSIS

#include <openglut.h>

void
glutTimerFunc(unsigned int msec, void( *callback )( int data ), int data);

PARAMETERS


msec

Milliseconds till invocation.


callback

Client function for timer event.


data

Arbitrary data; passed to

callback

.

DESCRIPTION

After


at least


msec

milliseconds, OpenGLUT will call

callback

, passing in your user-supplied

data

parameter. OpenGLUT will call your function only once.

This callback is


not

bound to any window.

CAVEATS

Unlike most other callbacks, timers only occur once.

Unlike most other callbacks, you cannot deregister a timer callback.

Unlike most other callbacks, you can register an arbitrary number of timers.

SEE ALSO

glutIdleFunc(3) glutMainLoop(3) glutMainLoopEvent(3)