-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.KHR.Robustness (
  -- * Extension Support
    gl_KHR_robustness

  -- * GL_KHR_robustness
  , glGetGraphicsResetStatus
  , glGetGraphicsResetStatusKHR
  , glGetnUniformfv
  , glGetnUniformfvKHR
  , glGetnUniformiv
  , glGetnUniformivKHR
  , glGetnUniformuiv
  , glGetnUniformuivKHR
  , glReadnPixels
  , glReadnPixelsKHR
  , pattern GL_CONTEXT_LOST
  , pattern GL_CONTEXT_LOST_KHR
  , pattern GL_CONTEXT_ROBUST_ACCESS
  , pattern GL_CONTEXT_ROBUST_ACCESS_KHR
  , pattern GL_GUILTY_CONTEXT_RESET
  , pattern GL_GUILTY_CONTEXT_RESET_KHR
  , pattern GL_INNOCENT_CONTEXT_RESET
  , pattern GL_INNOCENT_CONTEXT_RESET_KHR
  , pattern GL_LOSE_CONTEXT_ON_RESET
  , pattern GL_LOSE_CONTEXT_ON_RESET_KHR
  , pattern GL_NO_ERROR
  , pattern GL_NO_RESET_NOTIFICATION
  , pattern GL_NO_RESET_NOTIFICATION_KHR
  , pattern GL_RESET_NOTIFICATION_STRATEGY
  , pattern GL_RESET_NOTIFICATION_STRATEGY_KHR
  , pattern GL_UNKNOWN_CONTEXT_RESET
  , pattern GL_UNKNOWN_CONTEXT_RESET_KHR
) 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/KHR/robustness.txt GL_KHR_robustness> extension is available.

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

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


glGetGraphicsResetStatusKHR :: MonadIO m => m GLenum
glGetGraphicsResetStatusKHR :: m GLenum
glGetGraphicsResetStatusKHR = FunPtr (IO GLenum) -> m GLenum
forall (m :: * -> *). MonadIO m => FunPtr (IO GLenum) -> m GLenum
ffiIOenum FunPtr (IO GLenum)
glGetGraphicsResetStatusKHRFunPtr

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

{-# NOINLINE glGetGraphicsResetStatusKHRFunPtr #-}

-- | Usage: @'glGetnUniformfvKHR' program location bufSize params@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetnUniformfv'.


glGetnUniformfvKHR :: MonadIO m => GLuint -> GLint -> GLsizei -> Ptr GLfloat -> m ()
glGetnUniformfvKHR :: GLenum -> GLint -> GLint -> Ptr GLfloat -> m ()
glGetnUniformfvKHR = FunPtr (GLenum -> GLint -> GLint -> Ptr GLfloat -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLfloat -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLint -> GLint -> Ptr GLfloat -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLfloat -> m ()
ffiuintintsizeiPtrfloatIOV FunPtr (GLenum -> GLint -> GLint -> Ptr GLfloat -> IO ())
glGetnUniformfvKHRFunPtr

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

{-# NOINLINE glGetnUniformfvKHRFunPtr #-}

-- | Usage: @'glGetnUniformivKHR' program location bufSize params@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetnUniformiv'.


glGetnUniformivKHR :: MonadIO m => GLuint -> GLint -> GLsizei -> Ptr GLint -> m ()
glGetnUniformivKHR :: GLenum -> GLint -> GLint -> Ptr GLint -> m ()
glGetnUniformivKHR = FunPtr (GLenum -> GLint -> GLint -> Ptr GLint -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLint -> GLint -> Ptr GLint -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLint -> m ()
ffiuintintsizeiPtrintIOV FunPtr (GLenum -> GLint -> GLint -> Ptr GLint -> IO ())
glGetnUniformivKHRFunPtr

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

{-# NOINLINE glGetnUniformivKHRFunPtr #-}

-- | Usage: @'glGetnUniformuivKHR' program location bufSize params@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetnUniformuiv'.


glGetnUniformuivKHR :: MonadIO m => GLuint -> GLint -> GLsizei -> Ptr GLuint -> m ()
glGetnUniformuivKHR :: GLenum -> GLint -> GLint -> Ptr GLenum -> m ()
glGetnUniformuivKHR = FunPtr (GLenum -> GLint -> GLint -> Ptr GLenum -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLint -> GLint -> Ptr GLenum -> IO ())
-> GLenum -> GLint -> GLint -> Ptr GLenum -> m ()
ffiuintintsizeiPtruintIOV FunPtr (GLenum -> GLint -> GLint -> Ptr GLenum -> IO ())
glGetnUniformuivKHRFunPtr

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

{-# NOINLINE glGetnUniformuivKHRFunPtr #-}

-- | Usage: @'glReadnPixelsKHR' x y width height format type bufSize data@
--
-- The parameter @x@ is a @WinCoord@.
--
-- The parameter @y@ is a @WinCoord@.
--
-- The parameter @format@ is a @PixelFormat@, one of: 'Graphics.GL.Ext.EXT.Abgr.GL_ABGR_EXT', 'Graphics.GL.Internal.Shared.GL_ALPHA', 'Graphics.GL.Internal.Shared.GL_BLUE', 'Graphics.GL.Ext.EXT.Cmyka.GL_CMYKA_EXT', 'Graphics.GL.Ext.EXT.Cmyka.GL_CMYK_EXT', 'Graphics.GL.Internal.Shared.GL_COLOR_INDEX', 'Graphics.GL.Internal.Shared.GL_DEPTH_COMPONENT', 'Graphics.GL.Internal.Shared.GL_GREEN', 'Graphics.GL.Internal.Shared.GL_LUMINANCE', 'Graphics.GL.Internal.Shared.GL_LUMINANCE_ALPHA', 'Graphics.GL.Internal.Shared.GL_RED', 'Graphics.GL.Ext.EXT.TextureRg.GL_RED_EXT', 'Graphics.GL.Internal.Shared.GL_RGB', 'Graphics.GL.Internal.Shared.GL_RGBA', 'Graphics.GL.Internal.Shared.GL_STENCIL_INDEX', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_INT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_SHORT', 'Graphics.GL.Ext.SGIX.Ycrcb.GL_YCRCB_422_SGIX', 'Graphics.GL.Ext.SGIX.Ycrcb.GL_YCRCB_444_SGIX'.
--
-- The parameter @type@ is a @PixelType@, one of: 'Graphics.GL.Internal.Shared.GL_BITMAP', 'Graphics.GL.Internal.Shared.GL_BYTE', 'Graphics.GL.Internal.Shared.GL_FLOAT', 'Graphics.GL.Internal.Shared.GL_INT', 'Graphics.GL.Internal.Shared.GL_SHORT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_BYTE', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_BYTE_3_3_2', 'Graphics.GL.Ext.EXT.PackedPixels.GL_UNSIGNED_BYTE_3_3_2_EXT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_INT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_INT_10_10_10_2', 'Graphics.GL.Ext.EXT.PackedPixels.GL_UNSIGNED_INT_10_10_10_2_EXT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_INT_8_8_8_8', 'Graphics.GL.Ext.EXT.PackedPixels.GL_UNSIGNED_INT_8_8_8_8_EXT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_SHORT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_SHORT_4_4_4_4', 'Graphics.GL.Ext.EXT.PackedPixels.GL_UNSIGNED_SHORT_4_4_4_4_EXT', 'Graphics.GL.Internal.Shared.GL_UNSIGNED_SHORT_5_5_5_1', 'Graphics.GL.Ext.EXT.PackedPixels.GL_UNSIGNED_SHORT_5_5_5_1_EXT'.
--
-- The length of @data@ should be @bufSize@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glReadnPixels'.


glReadnPixelsKHR :: MonadIO m => GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> GLsizei -> Ptr () -> m ()
glReadnPixelsKHR :: GLint
-> GLint
-> GLint
-> GLint
-> GLenum
-> GLenum
-> GLint
-> Ptr ()
-> m ()
glReadnPixelsKHR = FunPtr
  (GLint
   -> GLint
   -> GLint
   -> GLint
   -> GLenum
   -> GLenum
   -> GLint
   -> Ptr ()
   -> IO ())
-> GLint
-> GLint
-> GLint
-> GLint
-> GLenum
-> GLenum
-> GLint
-> Ptr ()
-> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr
  (GLint
   -> GLint
   -> GLint
   -> GLint
   -> GLenum
   -> GLenum
   -> GLint
   -> Ptr ()
   -> IO ())
-> GLint
-> GLint
-> GLint
-> GLint
-> GLenum
-> GLenum
-> GLint
-> Ptr ()
-> m ()
ffiintintsizeisizeienumenumsizeiPtrVIOV FunPtr
  (GLint
   -> GLint
   -> GLint
   -> GLint
   -> GLenum
   -> GLenum
   -> GLint
   -> Ptr ()
   -> IO ())
glReadnPixelsKHRFunPtr

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

{-# NOINLINE glReadnPixelsKHRFunPtr #-}

pattern $bGL_CONTEXT_LOST_KHR :: a
$mGL_CONTEXT_LOST_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_CONTEXT_LOST_KHR = 0x0507

pattern $bGL_CONTEXT_ROBUST_ACCESS_KHR :: a
$mGL_CONTEXT_ROBUST_ACCESS_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_CONTEXT_ROBUST_ACCESS_KHR = 0x90F3

pattern $bGL_GUILTY_CONTEXT_RESET_KHR :: a
$mGL_GUILTY_CONTEXT_RESET_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_GUILTY_CONTEXT_RESET_KHR = 0x8253

pattern $bGL_INNOCENT_CONTEXT_RESET_KHR :: a
$mGL_INNOCENT_CONTEXT_RESET_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_INNOCENT_CONTEXT_RESET_KHR = 0x8254

pattern $bGL_LOSE_CONTEXT_ON_RESET_KHR :: a
$mGL_LOSE_CONTEXT_ON_RESET_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_LOSE_CONTEXT_ON_RESET_KHR = 0x8252

pattern $bGL_NO_RESET_NOTIFICATION_KHR :: a
$mGL_NO_RESET_NOTIFICATION_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_NO_RESET_NOTIFICATION_KHR = 0x8261

pattern $bGL_RESET_NOTIFICATION_STRATEGY_KHR :: a
$mGL_RESET_NOTIFICATION_STRATEGY_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_RESET_NOTIFICATION_STRATEGY_KHR = 0x8256

pattern $bGL_UNKNOWN_CONTEXT_RESET_KHR :: a
$mGL_UNKNOWN_CONTEXT_RESET_KHR :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_UNKNOWN_CONTEXT_RESET_KHR = 0x8255