glview_register_frame_callback()
Register a callback that will be fired every time the app is expected to draw a frame.
Synopsis:
#include <glview/glview.h>
GLVIEW_API int glview_register_frame_callback(frame_callback frame_callback)
Arguments:
- frame_callback
-
The function to call after all events have been processed, and the app is expected to draw the frame.
Library:
libglviewDescription:
The display callback is initially set by the glview_initialize() function and is the only mandatory callback. An app can use this function to set a different display callback. A display callback must always be registered and valid. Setting the callback to NULL is invalid and will fail.
Returns:
GLVIEW_SUCCESS upon success, GLVIEW_FAILURE otherwise, with errno set to the following:
- EFAULT: Attempt to register a NULL display callback. In the event of GLVIEW_FAILURE, the previously registered frame_callback will remain.