Updated: October 28, 2024 |
Acquire the next available render buffer
#include <screen/screen.h>
int screen_dequeue_window_render_buffer(screen_buffer_t *pbuf, screen_window_t win, int flags)
Function Type: Immediate Execution
This function should be used instead of SCREEN_PROPERTY_RENDER_BUFFERS when screen_post_window() is called with the SCREEN_DONT_BLOCK flag. SCREEN_PROPERTY_RENDER_BUFFERS is not updated when screen_post_window() is called with the SCREEN_DONT_BLOCK flag. This function takes a buffer from the render buffers. The buffer will not be available as a render buffer again until the buffer producer calls screen_post_window() for the buffer and all consumers call screen_release_buffer().
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).