-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.SGIX.Async (
  -- * Extension Support
    gl_SGIX_async

  -- * GL_SGIX_async
  , glAsyncMarkerSGIX
  , glDeleteAsyncMarkersSGIX
  , glFinishAsyncSGIX
  , glGenAsyncMarkersSGIX
  , glIsAsyncMarkerSGIX
  , glPollAsyncSGIX
  , pattern GL_ASYNC_MARKER_SGIX
) 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/SGIX/async.txt GL_SGIX_async> extension is available.

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

-- | Usage: @'glAsyncMarkerSGIX' marker@


glAsyncMarkerSGIX :: MonadIO m => GLuint -> m ()
glAsyncMarkerSGIX :: GLuint -> m ()
glAsyncMarkerSGIX = FunPtr (GLuint -> IO ()) -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO ()) -> GLuint -> m ()
ffiuintIOV FunPtr (GLuint -> IO ())
glAsyncMarkerSGIXFunPtr

glAsyncMarkerSGIXFunPtr :: FunPtr (GLuint -> IO ())
glAsyncMarkerSGIXFunPtr :: FunPtr (GLuint -> IO ())
glAsyncMarkerSGIXFunPtr = 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 "glAsyncMarkerSGIX")

{-# NOINLINE glAsyncMarkerSGIXFunPtr #-}

-- | Usage: @'glDeleteAsyncMarkersSGIX' marker range@


glDeleteAsyncMarkersSGIX :: MonadIO m => GLuint -> GLsizei -> m ()
glDeleteAsyncMarkersSGIX :: GLuint -> GLsizei -> m ()
glDeleteAsyncMarkersSGIX = FunPtr (GLuint -> GLsizei -> IO ()) -> GLuint -> GLsizei -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLsizei -> IO ()) -> GLuint -> GLsizei -> m ()
ffiuintsizeiIOV FunPtr (GLuint -> GLsizei -> IO ())
glDeleteAsyncMarkersSGIXFunPtr

glDeleteAsyncMarkersSGIXFunPtr :: FunPtr (GLuint -> GLsizei -> IO ())
glDeleteAsyncMarkersSGIXFunPtr :: FunPtr (GLuint -> GLsizei -> IO ())
glDeleteAsyncMarkersSGIXFunPtr = 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 "glDeleteAsyncMarkersSGIX")

{-# NOINLINE glDeleteAsyncMarkersSGIXFunPtr #-}

-- | Usage: @'glFinishAsyncSGIX' markerp@
--
-- The length of @markerp@ should be @1@.


glFinishAsyncSGIX :: MonadIO m => Ptr GLuint -> m GLint
glFinishAsyncSGIX :: Ptr GLuint -> m GLsizei
glFinishAsyncSGIX = FunPtr (Ptr GLuint -> IO GLsizei) -> Ptr GLuint -> m GLsizei
forall (m :: * -> *).
MonadIO m =>
FunPtr (Ptr GLuint -> IO GLsizei) -> Ptr GLuint -> m GLsizei
ffiPtruintIOint FunPtr (Ptr GLuint -> IO GLsizei)
glFinishAsyncSGIXFunPtr

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

{-# NOINLINE glFinishAsyncSGIXFunPtr #-}

-- | Usage: @'glGenAsyncMarkersSGIX' range@


glGenAsyncMarkersSGIX :: MonadIO m => GLsizei -> m GLuint
glGenAsyncMarkersSGIX :: GLsizei -> m GLuint
glGenAsyncMarkersSGIX = FunPtr (GLsizei -> IO GLuint) -> GLsizei -> m GLuint
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> IO GLuint) -> GLsizei -> m GLuint
ffisizeiIOuint FunPtr (GLsizei -> IO GLuint)
glGenAsyncMarkersSGIXFunPtr

glGenAsyncMarkersSGIXFunPtr :: FunPtr (GLsizei -> IO GLuint)
glGenAsyncMarkersSGIXFunPtr :: FunPtr (GLsizei -> IO GLuint)
glGenAsyncMarkersSGIXFunPtr = IO (FunPtr (GLsizei -> IO GLuint)) -> FunPtr (GLsizei -> IO GLuint)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLsizei -> IO GLuint))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGenAsyncMarkersSGIX")

{-# NOINLINE glGenAsyncMarkersSGIXFunPtr #-}

-- | Usage: @'glIsAsyncMarkerSGIX' marker@


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

glIsAsyncMarkerSGIXFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsAsyncMarkerSGIXFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsAsyncMarkerSGIXFunPtr = 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 "glIsAsyncMarkerSGIX")

{-# NOINLINE glIsAsyncMarkerSGIXFunPtr #-}

-- | Usage: @'glPollAsyncSGIX' markerp@
--
-- The length of @markerp@ should be @1@.


glPollAsyncSGIX :: MonadIO m => Ptr GLuint -> m GLint
glPollAsyncSGIX :: Ptr GLuint -> m GLsizei
glPollAsyncSGIX = FunPtr (Ptr GLuint -> IO GLsizei) -> Ptr GLuint -> m GLsizei
forall (m :: * -> *).
MonadIO m =>
FunPtr (Ptr GLuint -> IO GLsizei) -> Ptr GLuint -> m GLsizei
ffiPtruintIOint FunPtr (Ptr GLuint -> IO GLsizei)
glPollAsyncSGIXFunPtr

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

{-# NOINLINE glPollAsyncSGIXFunPtr #-}

pattern $bGL_ASYNC_MARKER_SGIX :: a
$mGL_ASYNC_MARKER_SGIX :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_ASYNC_MARKER_SGIX = 0x8329