add_swap_buffers_callback


Description:

[ Deprecated ( since = "1.14" ) ]
public uint add_swap_buffers_callback (SwapBuffersNotify callback)

Warning: add_swap_buffers_callback is deprecated.

Installs a callback function that should be called whenever a swap buffers request (made using swap_buffers) for the given this completes.

Note:

Use add_frame_callback instead

<note>Applications should check for the cogl_feature_id_swap_buffers_event feature before using this API. It's currently undefined when and if registered callbacks will be called if this feature is not supported.</note >

We recommend using this mechanism when available to manually throttle your applications (in conjunction with set_swap_throttled) so your application will be able to avoid long blocks in the driver caused by throttling when you request to swap buffers too quickly.

Parameters:

this

A Onscreen framebuffer

callback

A callback function to call when a swap has completed

user_data

A private pointer to be passed to callback

Returns:

a unique identifier that can be used to remove to remove the callback later.