caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.Sync

Contents

Description

Synchronization primitives.

This module implements fence synchronization objects. They can be used to check when a GPU operation has been done.

At the moment, the only place where these objects are useful in Caramia is unsynchronized buffer mapping.

Operations in this module require GL_ARB_sync extension or OpenGL 3.2.

Synopsis

Operations

fence :: MonadIO m => m Fence Source

Create a fence.

waitFence Source

Arguments

:: MonadIO m 
=> Int

Number of microseconds to wait.

-> Fence 
-> m Bool

True if the fence was signalled, False if waiting timed out.

Waits for a fence to signal.

IMPORTANT: this is not interruptible by asynchronous exceptions.

isFenceSignalled :: MonadIO m => Fence -> m Bool Source

Checks if a fence has been signalled.

 isFenceSignalled = waitFence 0

Types