Function gvr_sys::gvr_buffer_viewport_set_source_buffer_index [] [src]

pub unsafe extern "C" fn gvr_buffer_viewport_set_source_buffer_index(
    viewport: *mut gvr_buffer_viewport,
    buffer_index: i32
)

Sets the buffer from which the viewport reads its undistorted pixels.

To use the contents of the external surface as buffer contents, associate an external surface with the viewport by calling gvr_buffer_viewport_set_external_surface_id(), then call this function and pass GVR_BUFFER_INDEX_EXTERNAL_SURFACE.

@param viewport The buffer viewport. @param buffer_index The index of the source buffer. This is either an index in the list of buffer specs that was passed to gvr_swap_chain_create(), or GVR_BUFFER_INDEX_EXTERNAL_SURFACE.