glview_display_once()

Provide a callback that will be called to draw a single frame.

Synopsis:

#include <glview/glview.h>
 
GLVIEW_API int glview_display_once(display_once_callback display_once_callback)

Arguments:

display_once_callback

The callback that will be fired to draw a single frame. This is the callback_data specified during the call to glview_set_callback_data().

Library:

libglview

Description:

When the app has been put into the background (due to idle timeout, or by user action) rendering no longer occurs in the glview execution loop. This function allows the app to draw a pause screen (or anything else the app wishes to display). The callback will be invoked immediately, and once the function completes glview will swap the buffers to immediately display what was drawn.

There are other common scenarios that may use this function:
  • Whenever the app wishes to display something prior to entering the glview_loop()function.
  • To dislay some kind of loading indicator while the app's thread is performing a long-running operation.

Returns:

GLVIEW_SUCCESS upon success, GLVIEW_FAILURE otherwise, with errno set to the following:

Last modified: 2013-12-21

comments powered by Disqus