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

  -- * GL_SGIX_instruments
  , glGetInstrumentsSGIX
  , glInstrumentsBufferSGIX
  , glPollInstrumentsSGIX
  , glReadInstrumentsSGIX
  , glStartInstrumentsSGIX
  , glStopInstrumentsSGIX
  , pattern GL_INSTRUMENT_BUFFER_POINTER_SGIX
  , pattern GL_INSTRUMENT_MEASUREMENTS_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/instruments.txt GL_SGIX_instruments> extension is available.

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

-- | Usage: @'glGetInstrumentsSGIX'@


glGetInstrumentsSGIX :: MonadIO m => m GLint
glGetInstrumentsSGIX :: m GLint
glGetInstrumentsSGIX = FunPtr (IO GLint) -> m GLint
forall (m :: * -> *). MonadIO m => FunPtr (IO GLint) -> m GLint
ffiIOint FunPtr (IO GLint)
glGetInstrumentsSGIXFunPtr

glGetInstrumentsSGIXFunPtr :: FunPtr (IO GLint)
glGetInstrumentsSGIXFunPtr :: FunPtr (IO GLint)
glGetInstrumentsSGIXFunPtr = IO (FunPtr (IO GLint)) -> FunPtr (IO GLint)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (IO GLint))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGetInstrumentsSGIX")

{-# NOINLINE glGetInstrumentsSGIXFunPtr #-}

-- | Usage: @'glInstrumentsBufferSGIX' size buffer@
--
-- The length of @buffer@ should be @size@.


glInstrumentsBufferSGIX :: MonadIO m => GLsizei -> Ptr GLint -> m ()
glInstrumentsBufferSGIX :: GLint -> Ptr GLint -> m ()
glInstrumentsBufferSGIX = FunPtr (GLint -> Ptr GLint -> IO ()) -> GLint -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLint -> Ptr GLint -> IO ()) -> GLint -> Ptr GLint -> m ()
ffisizeiPtrintIOV FunPtr (GLint -> Ptr GLint -> IO ())
glInstrumentsBufferSGIXFunPtr

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

{-# NOINLINE glInstrumentsBufferSGIXFunPtr #-}

-- | Usage: @'glPollInstrumentsSGIX' marker_p@
--
-- The length of @marker_p@ should be @1@.


glPollInstrumentsSGIX :: MonadIO m => Ptr GLint -> m GLint
glPollInstrumentsSGIX :: Ptr GLint -> m GLint
glPollInstrumentsSGIX = FunPtr (Ptr GLint -> IO GLint) -> Ptr GLint -> m GLint
forall (m :: * -> *).
MonadIO m =>
FunPtr (Ptr GLint -> IO GLint) -> Ptr GLint -> m GLint
ffiPtrintIOint FunPtr (Ptr GLint -> IO GLint)
glPollInstrumentsSGIXFunPtr

glPollInstrumentsSGIXFunPtr :: FunPtr (Ptr GLint -> IO GLint)
glPollInstrumentsSGIXFunPtr :: FunPtr (Ptr GLint -> IO GLint)
glPollInstrumentsSGIXFunPtr = IO (FunPtr (Ptr GLint -> IO GLint))
-> FunPtr (Ptr GLint -> IO GLint)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (Ptr GLint -> IO GLint))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glPollInstrumentsSGIX")

{-# NOINLINE glPollInstrumentsSGIXFunPtr #-}

-- | Usage: @'glReadInstrumentsSGIX' marker@


glReadInstrumentsSGIX :: MonadIO m => GLint -> m ()
glReadInstrumentsSGIX :: GLint -> m ()
glReadInstrumentsSGIX = FunPtr (GLint -> IO ()) -> GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLint -> IO ()) -> GLint -> m ()
ffiintIOV FunPtr (GLint -> IO ())
glReadInstrumentsSGIXFunPtr

glReadInstrumentsSGIXFunPtr :: FunPtr (GLint -> IO ())
glReadInstrumentsSGIXFunPtr :: FunPtr (GLint -> IO ())
glReadInstrumentsSGIXFunPtr = IO (FunPtr (GLint -> IO ())) -> FunPtr (GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glReadInstrumentsSGIX")

{-# NOINLINE glReadInstrumentsSGIXFunPtr #-}

-- | Usage: @'glStartInstrumentsSGIX'@


glStartInstrumentsSGIX :: MonadIO m => m ()
glStartInstrumentsSGIX :: m ()
glStartInstrumentsSGIX = FunPtr (IO ()) -> m ()
forall (m :: * -> *). MonadIO m => FunPtr (IO ()) -> m ()
ffiIOV FunPtr (IO ())
glStartInstrumentsSGIXFunPtr

glStartInstrumentsSGIXFunPtr :: FunPtr (IO ())
glStartInstrumentsSGIXFunPtr :: FunPtr (IO ())
glStartInstrumentsSGIXFunPtr = IO (FunPtr (IO ())) -> FunPtr (IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glStartInstrumentsSGIX")

{-# NOINLINE glStartInstrumentsSGIXFunPtr #-}

-- | Usage: @'glStopInstrumentsSGIX' marker@


glStopInstrumentsSGIX :: MonadIO m => GLint -> m ()
glStopInstrumentsSGIX :: GLint -> m ()
glStopInstrumentsSGIX = FunPtr (GLint -> IO ()) -> GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLint -> IO ()) -> GLint -> m ()
ffiintIOV FunPtr (GLint -> IO ())
glStopInstrumentsSGIXFunPtr

glStopInstrumentsSGIXFunPtr :: FunPtr (GLint -> IO ())
glStopInstrumentsSGIXFunPtr :: FunPtr (GLint -> IO ())
glStopInstrumentsSGIXFunPtr = IO (FunPtr (GLint -> IO ())) -> FunPtr (GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glStopInstrumentsSGIX")

{-# NOINLINE glStopInstrumentsSGIXFunPtr #-}

pattern $bGL_INSTRUMENT_BUFFER_POINTER_SGIX :: a
$mGL_INSTRUMENT_BUFFER_POINTER_SGIX :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180

pattern $bGL_INSTRUMENT_MEASUREMENTS_SGIX :: a
$mGL_INSTRUMENT_MEASUREMENTS_SGIX :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_INSTRUMENT_MEASUREMENTS_SGIX = 0x8181