Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_swap_buffers(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_create_double_buffered_window(3)

xil_get_active_buffer(3)

xil_set_active_buffer(3)

xil_swap_buffers(3)

NAME

xil_swap_buffers - move the contents of the back buffer to the front buffer for a double-buffered device image

SYNOPSIS

#include <xil/xil.h>

void xil_swap_buffers ( XilImage image);

DESCRIPTION

This function moves the contents of the back buffer of a double-buffered device image to the front buffer. After the swap, the contents of the back buffer are undefined and must set before the next call to xil_swap_buffers (). If the image does not represent a double-buffered device, an error is generated.

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

    XilSystemState State;
    XilImage display_image;
    XilImage image0, image1;
    Display∗ display;
    Window window;
     /∗ Create an XIL display image from existing X display and window ∗/
    if(display_image = xil_create_double_buffered_window(State,
                                              display,window) == NULL) {
 
        /∗ return with error ∗/
    }
     /∗ We know that this device image is double buffered ∗/
     /∗ Copy image0 to the back buffer of display ∗/
    xil_copy(image0, display_image);
     /∗ Move the back buffers contents to the front buffer ∗/
    xil_swap_buffers(display_image);
     /∗ refill the back buffer with a new image ∗/
    xil_copy(image1, display_image);

NOTES

xil_swap_buffers () always moves the contents of the back buffer to the front buffer. There is no way to swap the contents of the front buffer to the back buffer.

SEE ALSO

xil_create_double_buffered_window(3), xil_get_active_buffer(3), xil_set_active_buffer(3). 

SunOS 5.6  —  Last change: 24 February 1997

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026