-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.APPLE.Fence (
  -- * Extension Support
    gl_APPLE_fence

  -- * GL_APPLE_fence
  , glDeleteFencesAPPLE
  , glFinishFenceAPPLE
  , glFinishObjectAPPLE
  , glGenFencesAPPLE
  , glIsFenceAPPLE
  , glSetFenceAPPLE
  , glTestFenceAPPLE
  , glTestObjectAPPLE
  , pattern GL_DRAW_PIXELS_APPLE
  , pattern GL_FENCE_APPLE
) where

import Control.Monad.IO.Class
import Data.Set
import Foreign.Ptr
import Graphics.GL.Internal.FFI
import Graphics.GL.Internal.Proc
import Graphics.GL.Types
import System.IO.Unsafe

-- | Checks that the <https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/specs/APPLE/fence.txt GL_APPLE_fence> extension is available.

gl_APPLE_fence :: Bool
gl_APPLE_fence :: Bool
gl_APPLE_fence = [Char] -> Set [Char] -> Bool
forall a. Ord a => a -> Set a -> Bool
member "GL_APPLE_fence" Set [Char]
extensions
{-# NOINLINE gl_APPLE_fence #-}

-- | Usage: @'glDeleteFencesAPPLE' n fences@
--
-- The parameter @fences@ is a @FenceNV@.
--
-- The length of @fences@ should be @n@.


glDeleteFencesAPPLE :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glDeleteFencesAPPLE :: GLsizei -> Ptr GLuint -> m ()
glDeleteFencesAPPLE = FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteFencesAPPLEFunPtr

glDeleteFencesAPPLEFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteFencesAPPLEFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteFencesAPPLEFunPtr = IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
-> FunPtr (GLsizei -> Ptr GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glDeleteFencesAPPLE")

{-# NOINLINE glDeleteFencesAPPLEFunPtr #-}

-- | Usage: @'glFinishFenceAPPLE' fence@
--
-- The parameter @fence@ is a @FenceNV@.


glFinishFenceAPPLE :: MonadIO m => GLuint -> m ()
glFinishFenceAPPLE :: GLuint -> m ()
glFinishFenceAPPLE = FunPtr (GLuint -> IO ()) -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO ()) -> GLuint -> m ()
ffiuintIOV FunPtr (GLuint -> IO ())
glFinishFenceAPPLEFunPtr

glFinishFenceAPPLEFunPtr :: FunPtr (GLuint -> IO ())
glFinishFenceAPPLEFunPtr :: FunPtr (GLuint -> IO ())
glFinishFenceAPPLEFunPtr = IO (FunPtr (GLuint -> IO ())) -> FunPtr (GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glFinishFenceAPPLE")

{-# NOINLINE glFinishFenceAPPLEFunPtr #-}

-- | Usage: @'glFinishObjectAPPLE' object name@
--
-- The parameter @object@ is a @ObjectTypeAPPLE@.


glFinishObjectAPPLE :: MonadIO m => GLenum -> GLint -> m ()
glFinishObjectAPPLE :: GLuint -> GLsizei -> m ()
glFinishObjectAPPLE = FunPtr (GLuint -> GLsizei -> IO ()) -> GLuint -> GLsizei -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLsizei -> IO ()) -> GLuint -> GLsizei -> m ()
ffienumintIOV FunPtr (GLuint -> GLsizei -> IO ())
glFinishObjectAPPLEFunPtr

glFinishObjectAPPLEFunPtr :: FunPtr (GLenum -> GLint -> IO ())
glFinishObjectAPPLEFunPtr :: FunPtr (GLuint -> GLsizei -> IO ())
glFinishObjectAPPLEFunPtr = IO (FunPtr (GLuint -> GLsizei -> IO ()))
-> FunPtr (GLuint -> GLsizei -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> GLsizei -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glFinishObjectAPPLE")

{-# NOINLINE glFinishObjectAPPLEFunPtr #-}

-- | Usage: @'glGenFencesAPPLE' n fences@
--
-- The parameter @fences@ is a @FenceNV@.
--
-- The length of @fences@ should be @n@.


glGenFencesAPPLE :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glGenFencesAPPLE :: GLsizei -> Ptr GLuint -> m ()
glGenFencesAPPLE = FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenFencesAPPLEFunPtr

glGenFencesAPPLEFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenFencesAPPLEFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenFencesAPPLEFunPtr = IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
-> FunPtr (GLsizei -> Ptr GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGenFencesAPPLE")

{-# NOINLINE glGenFencesAPPLEFunPtr #-}

-- | Usage: @'glIsFenceAPPLE' fence@
--
-- The parameter @fence@ is a @FenceNV@.


glIsFenceAPPLE :: MonadIO m => GLuint -> m GLboolean
glIsFenceAPPLE :: GLuint -> m GLboolean
glIsFenceAPPLE = FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
ffiuintIOboolean FunPtr (GLuint -> IO GLboolean)
glIsFenceAPPLEFunPtr

glIsFenceAPPLEFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsFenceAPPLEFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsFenceAPPLEFunPtr = IO (FunPtr (GLuint -> IO GLboolean))
-> FunPtr (GLuint -> IO GLboolean)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO GLboolean))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glIsFenceAPPLE")

{-# NOINLINE glIsFenceAPPLEFunPtr #-}

-- | Usage: @'glSetFenceAPPLE' fence@
--
-- The parameter @fence@ is a @FenceNV@.


glSetFenceAPPLE :: MonadIO m => GLuint -> m ()
glSetFenceAPPLE :: GLuint -> m ()
glSetFenceAPPLE = FunPtr (GLuint -> IO ()) -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO ()) -> GLuint -> m ()
ffiuintIOV FunPtr (GLuint -> IO ())
glSetFenceAPPLEFunPtr

glSetFenceAPPLEFunPtr :: FunPtr (GLuint -> IO ())
glSetFenceAPPLEFunPtr :: FunPtr (GLuint -> IO ())
glSetFenceAPPLEFunPtr = IO (FunPtr (GLuint -> IO ())) -> FunPtr (GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glSetFenceAPPLE")

{-# NOINLINE glSetFenceAPPLEFunPtr #-}

-- | Usage: @'glTestFenceAPPLE' fence@
--
-- The parameter @fence@ is a @FenceNV@.


glTestFenceAPPLE :: MonadIO m => GLuint -> m GLboolean
glTestFenceAPPLE :: GLuint -> m GLboolean
glTestFenceAPPLE = FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
ffiuintIOboolean FunPtr (GLuint -> IO GLboolean)
glTestFenceAPPLEFunPtr

glTestFenceAPPLEFunPtr :: FunPtr (GLuint -> IO GLboolean)
glTestFenceAPPLEFunPtr :: FunPtr (GLuint -> IO GLboolean)
glTestFenceAPPLEFunPtr = IO (FunPtr (GLuint -> IO GLboolean))
-> FunPtr (GLuint -> IO GLboolean)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO GLboolean))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glTestFenceAPPLE")

{-# NOINLINE glTestFenceAPPLEFunPtr #-}

-- | Usage: @'glTestObjectAPPLE' object name@
--
-- The parameter @object@ is a @ObjectTypeAPPLE@.


glTestObjectAPPLE :: MonadIO m => GLenum -> GLuint -> m GLboolean
glTestObjectAPPLE :: GLuint -> GLuint -> m GLboolean
glTestObjectAPPLE = FunPtr (GLuint -> GLuint -> IO GLboolean)
-> GLuint -> GLuint -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLuint -> IO GLboolean)
-> GLuint -> GLuint -> m GLboolean
ffienumuintIOboolean FunPtr (GLuint -> GLuint -> IO GLboolean)
glTestObjectAPPLEFunPtr

glTestObjectAPPLEFunPtr :: FunPtr (GLenum -> GLuint -> IO GLboolean)
glTestObjectAPPLEFunPtr :: FunPtr (GLuint -> GLuint -> IO GLboolean)
glTestObjectAPPLEFunPtr = IO (FunPtr (GLuint -> GLuint -> IO GLboolean))
-> FunPtr (GLuint -> GLuint -> IO GLboolean)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> GLuint -> IO GLboolean))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glTestObjectAPPLE")

{-# NOINLINE glTestObjectAPPLEFunPtr #-}

pattern $bGL_DRAW_PIXELS_APPLE :: a
$mGL_DRAW_PIXELS_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_DRAW_PIXELS_APPLE = 0x8A0A

pattern $bGL_FENCE_APPLE :: a
$mGL_FENCE_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_FENCE_APPLE = 0x8A0B