caramia-0.5.0.0: Less painful OpenGL 3.3 rendering

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.

Synopsis

Operations

fence :: (MonadIO m, MonadMask 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

data Fence Source

Instances