-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.EXT.DisjointTimerQuery (
  -- * Extension Support
    gl_EXT_disjoint_timer_query

  -- * GL_EXT_disjoint_timer_query
  , glBeginQueryEXT
  , glDeleteQueriesEXT
  , glEndQueryEXT
  , glGenQueriesEXT
  , glGetQueryObjecti64vEXT
  , glGetQueryObjectivEXT
  , glGetQueryObjectui64vEXT
  , glGetQueryObjectuivEXT
  , glGetQueryivEXT
  , glIsQueryEXT
  , glQueryCounterEXT
  , pattern GL_CURRENT_QUERY_EXT
  , pattern GL_GPU_DISJOINT_EXT
  , pattern GL_QUERY_COUNTER_BITS_EXT
  , pattern GL_QUERY_RESULT_AVAILABLE_EXT
  , pattern GL_QUERY_RESULT_EXT
  , pattern GL_TIMESTAMP_EXT
  , pattern GL_TIME_ELAPSED_EXT
) 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.Internal.Shared
import Graphics.GL.Types
import System.IO.Unsafe

-- | Checks that the <https://www.khronos.org/registry/gles/extensions/EXT/EXT_disjoint_timer_query.txt GL_EXT_disjoint_timer_query> extension is available.

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

-- | Usage: @'glGetQueryObjectivEXT' id pname params@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetQueryObjectiv'.


glGetQueryObjectivEXT :: MonadIO m => GLuint -> GLenum -> Ptr GLint -> m ()
glGetQueryObjectivEXT :: GLuint -> GLuint -> Ptr GLint -> m ()
glGetQueryObjectivEXT = FunPtr (GLuint -> GLuint -> Ptr GLint -> IO ())
-> GLuint -> GLuint -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLuint -> Ptr GLint -> IO ())
-> GLuint -> GLuint -> Ptr GLint -> m ()
ffiuintenumPtrintIOV FunPtr (GLuint -> GLuint -> Ptr GLint -> IO ())
glGetQueryObjectivEXTFunPtr

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

{-# NOINLINE glGetQueryObjectivEXTFunPtr #-}

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


glQueryCounterEXT :: MonadIO m => GLuint -> GLenum -> m ()
glQueryCounterEXT :: GLuint -> GLuint -> m ()
glQueryCounterEXT = FunPtr (GLuint -> GLuint -> IO ()) -> GLuint -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLuint -> IO ()) -> GLuint -> GLuint -> m ()
ffiuintenumIOV FunPtr (GLuint -> GLuint -> IO ())
glQueryCounterEXTFunPtr

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

{-# NOINLINE glQueryCounterEXTFunPtr #-}

pattern $bGL_GPU_DISJOINT_EXT :: a
$mGL_GPU_DISJOINT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_GPU_DISJOINT_EXT = 0x8FBB

pattern $bGL_QUERY_COUNTER_BITS_EXT :: a
$mGL_QUERY_COUNTER_BITS_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_COUNTER_BITS_EXT = 0x8864

pattern $bGL_TIMESTAMP_EXT :: a
$mGL_TIMESTAMP_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_TIMESTAMP_EXT = 0x8E28