| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Graphics.OpenGLES.Sync
Documentation
getSync :: Maybe Word64 -> IO Sync Source
Obtain new Sync with or without timeout in nanoseconds.
 Fence sync objects are used to wait for partial completion of the GL
 command stream, as a more flexible form of glFinish.
-- Sync objects can be used many times sync1 <- getSync (Just 16000) sync2 <- getSync Nothing
For each frame:
glFence sync1 $ \isTimedOut -> do
  {- modify buffers, textures, etc -}
glFence sync2 $ \isTimedOut -> do
  {- modify buffers, textures, etc -}
endFrameGLglFence :: Sync -> (Bool -> GL a) -> GL a Source
Block and wait for GPU commands issued here complete.
 Better glFinish for ES 3+.
 Block and wait for a Sync object to become signaled, then run specified block.
glFenceInGpu :: Sync -> GL a -> GL a Source
Blocks on GPU until GL commands issued here complete.
 Better glFlush for ES 3+. Sync timeout is ignored.
 Instruct the GL server to block (on the GPU) until the previous call of
 glFence* with specified Sync object becomes finished on the GL server,
 then run specified block.
createFence :: Sync -> GL () Source
waitFenceAtGpu :: Sync -> GL () Source
glFlushCommandQ :: GL () Source
Same as glFlush. This operation is expensive, so frequent use should be avoided as far as possible.
glWaitComplete :: GL () Source
Same as glFinish. This operation is expensive, so frequent use should be avoided as far as possible.