pub struct SyncFence { /* private fields */ }Expand description
RAII wrapper around an OpenGL 3.2+ GPU fence sync object (GLsync).
Implementations§
Source§impl SyncFence
impl SyncFence
Sourcepub fn insert(ctx: &GlContext) -> Result<Self>
pub fn insert(ctx: &GlContext) -> Result<Self>
Inserts a GPU fence sync object into the OpenGL command stream (glFenceSync).
Sourcepub fn client_wait(
&self,
timeout_ns: u64,
flush: bool,
) -> Result<SyncWaitResult>
pub fn client_wait( &self, timeout_ns: u64, flush: bool, ) -> Result<SyncWaitResult>
Blocks the CPU until the fence is signaled or timeout_ns nanoseconds elapse.
When flush is true, passes GL_SYNC_FLUSH_COMMANDS_BIT to ensure queued
GPU commands are flushed before waiting.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SyncFence
impl !Send for SyncFence
impl !Sync for SyncFence
impl !UnwindSafe for SyncFence
impl Forget for SyncFence
impl Freeze for SyncFence
impl Move for SyncFence
impl Unpin for SyncFence
impl UnsafeUnpin for SyncFencewhere
*const RcInner<GlInner> is !null: UnsafeUnpin,
PhantomData<RcInner<GlInner>>: UnsafeUnpin,
*mut c_void: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more