[][src]Function gvr_sys::gvr_swap_chain_create

pub unsafe extern "C" fn gvr_swap_chain_create(
    gvr: *mut gvr_context,
    buffers: *mut *const gvr_buffer_spec,
    count: i32
) -> *mut gvr_swap_chain

Creates a swap chain from the given buffer specifications. This is a potentially time-consuming operation. All frames within the swapchain will be allocated. Once rendering is stopped, call gvr_swap_chain_destroy() to free GPU resources. The passed gvr_context must not be destroyed until then.

Swap chains can have no buffers. This is useful when only displaying external surfaces. When count is zero, buffers must be null.

@param gvr GVR instance for which a swap chain will be created. @param buffers Array of pixel buffer specifications. Each frame in the swap chain will be composed of these buffers. @param count Number of buffer specifications in the array. @return Opaque handle to the newly created swap chain.