caramia-0.2.0.1: 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 :: IO Fence Source

Create a fence.

waitFence Source

Arguments

:: Int

Number of microseconds to wait.

-> Fence 
-> IO 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 :: Fence -> IO Bool Source

Checks if a fence has been signalled.

 isFenceSignalled = waitFence 0

Types

data Fence Source

Instances