-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.ARB.OcclusionQuery (
  -- * Extension Support
    gl_ARB_occlusion_query

  -- * GL_ARB_occlusion_query
  , glBeginQueryARB
  , glDeleteQueriesARB
  , glEndQueryARB
  , glGenQueriesARB
  , glGetQueryObjectivARB
  , glGetQueryObjectuivARB
  , glGetQueryivARB
  , glIsQueryARB
  , pattern GL_CURRENT_QUERY_ARB
  , pattern GL_QUERY_COUNTER_BITS_ARB
  , pattern GL_QUERY_RESULT_ARB
  , pattern GL_QUERY_RESULT_AVAILABLE_ARB
  , pattern GL_SAMPLES_PASSED_ARB
) 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/ARB/occlusion_query.txt GL_ARB_occlusion_query> extension is available.

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

-- | Usage: @'glBeginQueryARB' target id@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glBeginQuery'.


glBeginQueryARB :: MonadIO m => GLenum -> GLuint -> m ()
glBeginQueryARB :: GLenum -> GLenum -> m ()
glBeginQueryARB = FunPtr (GLenum -> GLenum -> IO ()) -> GLenum -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> IO ()) -> GLenum -> GLenum -> m ()
ffienumuintIOV FunPtr (GLenum -> GLenum -> IO ())
glBeginQueryARBFunPtr

glBeginQueryARBFunPtr :: FunPtr (GLenum -> GLuint -> IO ())
glBeginQueryARBFunPtr :: FunPtr (GLenum -> GLenum -> IO ())
glBeginQueryARBFunPtr = IO (FunPtr (GLenum -> GLenum -> IO ()))
-> FunPtr (GLenum -> GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glBeginQueryARB")

{-# NOINLINE glBeginQueryARBFunPtr #-}

-- | Usage: @'glDeleteQueriesARB' n ids@
--
-- The length of @ids@ should be @n@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glDeleteQueries'.


glDeleteQueriesARB :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glDeleteQueriesARB :: GLsizei -> Ptr GLenum -> m ()
glDeleteQueriesARB = FunPtr (GLsizei -> Ptr GLenum -> IO ())
-> GLsizei -> Ptr GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLenum -> IO ())
-> GLsizei -> Ptr GLenum -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLenum -> IO ())
glDeleteQueriesARBFunPtr

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

{-# NOINLINE glDeleteQueriesARBFunPtr #-}

-- | Usage: @'glEndQueryARB' target@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glEndQuery'.


glEndQueryARB :: MonadIO m => GLenum -> m ()
glEndQueryARB :: GLenum -> m ()
glEndQueryARB = FunPtr (GLenum -> IO ()) -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> IO ()) -> GLenum -> m ()
ffienumIOV FunPtr (GLenum -> IO ())
glEndQueryARBFunPtr

glEndQueryARBFunPtr :: FunPtr (GLenum -> IO ())
glEndQueryARBFunPtr :: FunPtr (GLenum -> IO ())
glEndQueryARBFunPtr = IO (FunPtr (GLenum -> IO ())) -> FunPtr (GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glEndQueryARB")

{-# NOINLINE glEndQueryARBFunPtr #-}

-- | Usage: @'glGenQueriesARB' n ids@
--
-- The length of @ids@ should be @n@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGenQueries'.


glGenQueriesARB :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glGenQueriesARB :: GLsizei -> Ptr GLenum -> m ()
glGenQueriesARB = FunPtr (GLsizei -> Ptr GLenum -> IO ())
-> GLsizei -> Ptr GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLenum -> IO ())
-> GLsizei -> Ptr GLenum -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLenum -> IO ())
glGenQueriesARBFunPtr

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

{-# NOINLINE glGenQueriesARBFunPtr #-}

-- | Usage: @'glGetQueryObjectivARB' id pname params@
--
-- The length of @params@ should be @COMPSIZE(pname)@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetQueryObjectiv'.


glGetQueryObjectivARB :: MonadIO m => GLuint -> GLenum -> Ptr GLint -> m ()
glGetQueryObjectivARB :: GLenum -> GLenum -> Ptr GLsizei -> m ()
glGetQueryObjectivARB = FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
-> GLenum -> GLenum -> Ptr GLsizei -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
-> GLenum -> GLenum -> Ptr GLsizei -> m ()
ffiuintenumPtrintIOV FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
glGetQueryObjectivARBFunPtr

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

{-# NOINLINE glGetQueryObjectivARBFunPtr #-}

-- | Usage: @'glGetQueryObjectuivARB' id pname params@
--
-- The length of @params@ should be @COMPSIZE(pname)@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetQueryObjectuiv'.


glGetQueryObjectuivARB :: MonadIO m => GLuint -> GLenum -> Ptr GLuint -> m ()
glGetQueryObjectuivARB :: GLenum -> GLenum -> Ptr GLenum -> m ()
glGetQueryObjectuivARB = FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ())
-> GLenum -> GLenum -> Ptr GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ())
-> GLenum -> GLenum -> Ptr GLenum -> m ()
ffiuintenumPtruintIOV FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ())
glGetQueryObjectuivARBFunPtr

glGetQueryObjectuivARBFunPtr :: FunPtr (GLuint -> GLenum -> Ptr GLuint -> IO ())
glGetQueryObjectuivARBFunPtr :: FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ())
glGetQueryObjectuivARBFunPtr = IO (FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ()))
-> FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLenum -> Ptr GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGetQueryObjectuivARB")

{-# NOINLINE glGetQueryObjectuivARBFunPtr #-}

-- | Usage: @'glGetQueryivARB' target pname params@
--
-- The length of @params@ should be @COMPSIZE(pname)@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetQueryiv'.


glGetQueryivARB :: MonadIO m => GLenum -> GLenum -> Ptr GLint -> m ()
glGetQueryivARB :: GLenum -> GLenum -> Ptr GLsizei -> m ()
glGetQueryivARB = FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
-> GLenum -> GLenum -> Ptr GLsizei -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
-> GLenum -> GLenum -> Ptr GLsizei -> m ()
ffienumenumPtrintIOV FunPtr (GLenum -> GLenum -> Ptr GLsizei -> IO ())
glGetQueryivARBFunPtr

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

{-# NOINLINE glGetQueryivARBFunPtr #-}

-- | Usage: @'glIsQueryARB' id@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glIsQuery'.


glIsQueryARB :: MonadIO m => GLuint -> m GLboolean
glIsQueryARB :: GLenum -> m GLboolean
glIsQueryARB = FunPtr (GLenum -> IO GLboolean) -> GLenum -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> IO GLboolean) -> GLenum -> m GLboolean
ffiuintIOboolean FunPtr (GLenum -> IO GLboolean)
glIsQueryARBFunPtr

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

{-# NOINLINE glIsQueryARBFunPtr #-}

pattern $bGL_CURRENT_QUERY_ARB :: a
$mGL_CURRENT_QUERY_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_CURRENT_QUERY_ARB = 0x8865

pattern $bGL_QUERY_COUNTER_BITS_ARB :: a
$mGL_QUERY_COUNTER_BITS_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_COUNTER_BITS_ARB = 0x8864

pattern $bGL_QUERY_RESULT_ARB :: a
$mGL_QUERY_RESULT_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_RESULT_ARB = 0x8866

pattern $bGL_QUERY_RESULT_AVAILABLE_ARB :: a
$mGL_QUERY_RESULT_AVAILABLE_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867

pattern $bGL_SAMPLES_PASSED_ARB :: a
$mGL_SAMPLES_PASSED_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_SAMPLES_PASSED_ARB = 0x8914