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

  -- * GL_ARB_sparse_buffer
  , glBufferPageCommitmentARB
  , glNamedBufferPageCommitmentARB
  , glNamedBufferPageCommitmentEXT
  , pattern GL_SPARSE_BUFFER_PAGE_SIZE_ARB
  , pattern GL_SPARSE_STORAGE_BIT_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/sparse_buffer.txt GL_ARB_sparse_buffer> extension is available.

gl_ARB_sparse_buffer :: Bool
gl_ARB_sparse_buffer :: Bool
gl_ARB_sparse_buffer = String -> Set String -> Bool
forall a. Ord a => a -> Set a -> Bool
member String
"GL_ARB_sparse_buffer" Set String
extensions
{-# NOINLINE gl_ARB_sparse_buffer #-}

-- | Usage: @'glBufferPageCommitmentARB' target offset size commit@


glBufferPageCommitmentARB :: MonadIO m => GLenum -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glBufferPageCommitmentARB :: forall (m :: * -> *).
MonadIO m =>
GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
glBufferPageCommitmentARB = FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
ffienumintptrsizeiptrbooleanIOV FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glBufferPageCommitmentARBFunPtr

glBufferPageCommitmentARBFunPtr :: FunPtr (GLenum -> GLintptr -> GLsizeiptr -> GLboolean -> IO ())
glBufferPageCommitmentARBFunPtr :: FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glBufferPageCommitmentARBFunPtr = IO (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
-> FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
forall a. IO a -> a
unsafePerformIO (String
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. String -> IO (FunPtr a)
getProcAddress String
"glBufferPageCommitmentARB")

{-# NOINLINE glBufferPageCommitmentARBFunPtr #-}

-- | Usage: @'glNamedBufferPageCommitmentARB' buffer offset size commit@


glNamedBufferPageCommitmentARB :: MonadIO m => GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glNamedBufferPageCommitmentARB :: forall (m :: * -> *).
MonadIO m =>
GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
glNamedBufferPageCommitmentARB = FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
ffiuintintptrsizeiptrbooleanIOV FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentARBFunPtr

glNamedBufferPageCommitmentARBFunPtr :: FunPtr (GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentARBFunPtr :: FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentARBFunPtr = IO (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
-> FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
forall a. IO a -> a
unsafePerformIO (String
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. String -> IO (FunPtr a)
getProcAddress String
"glNamedBufferPageCommitmentARB")

{-# NOINLINE glNamedBufferPageCommitmentARBFunPtr #-}

-- | Usage: @'glNamedBufferPageCommitmentEXT' buffer offset size commit@


glNamedBufferPageCommitmentEXT :: MonadIO m => GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glNamedBufferPageCommitmentEXT :: forall (m :: * -> *).
MonadIO m =>
GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
glNamedBufferPageCommitmentEXT = FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
-> GLenum -> GLintptr -> GLintptr -> GLboolean -> m ()
ffiuintintptrsizeiptrbooleanIOV FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentEXTFunPtr

glNamedBufferPageCommitmentEXTFunPtr :: FunPtr (GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentEXTFunPtr :: FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
glNamedBufferPageCommitmentEXTFunPtr = IO (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
-> FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ())
forall a. IO a -> a
unsafePerformIO (String
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. String -> IO (FunPtr a)
getProcAddress String
"glNamedBufferPageCommitmentEXT")

{-# NOINLINE glNamedBufferPageCommitmentEXTFunPtr #-}

pattern GL_SPARSE_BUFFER_PAGE_SIZE_ARB  :: (Eq a, Num a) => a

pattern $mGL_SPARSE_BUFFER_PAGE_SIZE_ARB :: forall {r} {a}.
(Eq a, Num a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bGL_SPARSE_BUFFER_PAGE_SIZE_ARB :: forall a. (Eq a, Num a) => a
GL_SPARSE_BUFFER_PAGE_SIZE_ARB = 0x82F8

pattern GL_SPARSE_STORAGE_BIT_ARB  :: (Eq a, Num a) => a

pattern $mGL_SPARSE_STORAGE_BIT_ARB :: forall {r} {a}.
(Eq a, Num a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bGL_SPARSE_STORAGE_BIT_ARB :: forall a. (Eq a, Num a) => a
GL_SPARSE_STORAGE_BIT_ARB = 0x0400