OpenGLEAN
OpenGLEAN User Support
Home page | Introduction | Documentation | Files | Examples | Proposals | Authors | Links


OpenGLEAN Development
Summary | CVS | (discussion via home page) | (contact via home page) | (suggestion box) | License | Todo | Bugs

Idle and Timer Callbacks
[OpenGLEAN API Reference]

Collaboration diagram for Idle and Timer Callbacks:


Functions

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

Function Documentation

void glutIdleFunc void(*)(void)  callback  ) 
 

Sets the global idle callback.

Parameters:
callback Client function for idle event.
When OpenGLEAN's glutMainLoop() is doing nothing else, it checks to see if an ``idle'' callback set. If so, OpenGLEAN invokes that callback.

This callback is not bound to any window.

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

Note:
There is at most one idle callback for your entire application.
See also:
glutTimerFunc(), glutMainLoop(), glutMainLoopEvent()

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

Sets the Timer callback for the current window.

Parameters:
msec Milliseconds till invocation.
callback Client function for timer event.
data Arbitrary data; passed to callback .
After at least msec milliseconds, OpenGLEAN will call callback , passing in your user-supplied data parameter. OpenGLEAN will call your function only once.

This callback is not bound to any window.

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

Note:
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(), glutMainLoop(), glutMainLoopEvent()




SourceForge.net Logo Supported in part by SourceForge.net.

Generated on Fri Sep 16 20:15:35 2005 for OpenGLEAN by doxygen 1.4.3
The OpenGLEAN project is hosted by olib.org and SourceForge.