-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.APPLE.ObjectPurgeable (
  -- * Extension Support
    gl_APPLE_object_purgeable

  -- * GL_APPLE_object_purgeable
  , glGetObjectParameterivAPPLE
  , glObjectPurgeableAPPLE
  , glObjectUnpurgeableAPPLE
  , pattern GL_BUFFER_OBJECT_APPLE
  , pattern GL_PURGEABLE_APPLE
  , pattern GL_RELEASED_APPLE
  , pattern GL_RETAINED_APPLE
  , pattern GL_UNDEFINED_APPLE
  , pattern GL_VOLATILE_APPLE
) 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/APPLE/object_purgeable.txt GL_APPLE_object_purgeable> extension is available.

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

-- | Usage: @'glGetObjectParameterivAPPLE' objectType name pname params@
--
-- The length of @params@ should be @COMPSIZE(pname)@.


glGetObjectParameterivAPPLE :: MonadIO m => GLenum -> GLuint -> GLenum -> Ptr GLint -> m ()
glGetObjectParameterivAPPLE :: GLenum -> GLenum -> GLenum -> Ptr GLint -> m ()
glGetObjectParameterivAPPLE = FunPtr (GLenum -> GLenum -> GLenum -> Ptr GLint -> IO ())
-> GLenum -> GLenum -> GLenum -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> GLenum -> Ptr GLint -> IO ())
-> GLenum -> GLenum -> GLenum -> Ptr GLint -> m ()
ffienumuintenumPtrintIOV FunPtr (GLenum -> GLenum -> GLenum -> Ptr GLint -> IO ())
glGetObjectParameterivAPPLEFunPtr

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

{-# NOINLINE glGetObjectParameterivAPPLEFunPtr #-}

-- | Usage: @'glObjectPurgeableAPPLE' objectType name option@


glObjectPurgeableAPPLE :: MonadIO m => GLenum -> GLuint -> GLenum -> m GLenum
glObjectPurgeableAPPLE :: GLenum -> GLenum -> GLenum -> m GLenum
glObjectPurgeableAPPLE = FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
-> GLenum -> GLenum -> GLenum -> m GLenum
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
-> GLenum -> GLenum -> GLenum -> m GLenum
ffienumuintenumIOenum FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
glObjectPurgeableAPPLEFunPtr

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

{-# NOINLINE glObjectPurgeableAPPLEFunPtr #-}

-- | Usage: @'glObjectUnpurgeableAPPLE' objectType name option@


glObjectUnpurgeableAPPLE :: MonadIO m => GLenum -> GLuint -> GLenum -> m GLenum
glObjectUnpurgeableAPPLE :: GLenum -> GLenum -> GLenum -> m GLenum
glObjectUnpurgeableAPPLE = FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
-> GLenum -> GLenum -> GLenum -> m GLenum
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
-> GLenum -> GLenum -> GLenum -> m GLenum
ffienumuintenumIOenum FunPtr (GLenum -> GLenum -> GLenum -> IO GLenum)
glObjectUnpurgeableAPPLEFunPtr

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

{-# NOINLINE glObjectUnpurgeableAPPLEFunPtr #-}

pattern $bGL_BUFFER_OBJECT_APPLE :: a
$mGL_BUFFER_OBJECT_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_OBJECT_APPLE = 0x85B3

pattern $bGL_PURGEABLE_APPLE :: a
$mGL_PURGEABLE_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_PURGEABLE_APPLE = 0x8A1D

pattern $bGL_RELEASED_APPLE :: a
$mGL_RELEASED_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_RELEASED_APPLE = 0x8A19

pattern $bGL_RETAINED_APPLE :: a
$mGL_RETAINED_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_RETAINED_APPLE = 0x8A1B

pattern $bGL_UNDEFINED_APPLE :: a
$mGL_UNDEFINED_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_UNDEFINED_APPLE = 0x8A1C

pattern $bGL_VOLATILE_APPLE :: a
$mGL_VOLATILE_APPLE :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_VOLATILE_APPLE = 0x8A1A