[][src]Function gvr_sys::gvr_swap_chain_acquire_frame

pub unsafe extern "C" fn gvr_swap_chain_acquire_frame(
    swap_chain: *mut gvr_swap_chain
) -> *mut gvr_frame

Acquires a frame from the swap chain for rendering. Buffers that are part of the frame can then be bound with gvr_frame_bind_buffer(). Once the frame is finished and all its constituent buffers are ready, call gvr_frame_submit() to display it while applying lens distortion.

When this is called, the current thread's GL context must be the same context that was current when gvr_initialize_gl() was called, or at least be in a share group with the initialization context.

@param swap_chain The swap chain. @return Handle to the acquired frame. NULL if the swap chain is invalid, or if acquire has already been called on this swap chain.