-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.NV.ConditionalRender (
  -- * Extension Support
    gl_NV_conditional_render

  -- * GL_NV_conditional_render
  , glBeginConditionalRenderNV
  , glEndConditionalRenderNV
  , pattern GL_QUERY_BY_REGION_NO_WAIT_NV
  , pattern GL_QUERY_BY_REGION_WAIT_NV
  , pattern GL_QUERY_NO_WAIT_NV
  , pattern GL_QUERY_WAIT_NV
) 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/NV/conditional_render.txt GL_NV_conditional_render> extension is available.

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

-- | Usage: @'glBeginConditionalRenderNV' id mode@
--
-- The parameter @mode@ is a @TypeEnum@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glBeginConditionalRender'.


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

glBeginConditionalRenderNVFunPtr :: FunPtr (GLuint -> GLenum -> IO ())
glBeginConditionalRenderNVFunPtr :: FunPtr (GLuint -> GLuint -> IO ())
glBeginConditionalRenderNVFunPtr = 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 "glBeginConditionalRenderNV")

{-# NOINLINE glBeginConditionalRenderNVFunPtr #-}

-- | Usage: @'glEndConditionalRenderNV'@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glEndConditionalRender'.


glEndConditionalRenderNV :: MonadIO m => m ()
glEndConditionalRenderNV :: m ()
glEndConditionalRenderNV = FunPtr (IO ()) -> m ()
forall (m :: * -> *). MonadIO m => FunPtr (IO ()) -> m ()
ffiIOV FunPtr (IO ())
glEndConditionalRenderNVFunPtr

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

{-# NOINLINE glEndConditionalRenderNVFunPtr #-}

pattern $bGL_QUERY_BY_REGION_NO_WAIT_NV :: a
$mGL_QUERY_BY_REGION_NO_WAIT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16

pattern $bGL_QUERY_BY_REGION_WAIT_NV :: a
$mGL_QUERY_BY_REGION_WAIT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_BY_REGION_WAIT_NV = 0x8E15

pattern $bGL_QUERY_NO_WAIT_NV :: a
$mGL_QUERY_NO_WAIT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_NO_WAIT_NV = 0x8E14

pattern $bGL_QUERY_WAIT_NV :: a
$mGL_QUERY_WAIT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_QUERY_WAIT_NV = 0x8E13