-- 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 = [Char] -> Set [Char] -> Bool
forall a. Ord a => a -> Set a -> Bool
member "GL_ARB_sparse_buffer" Set [Char]
extensions
{-# NOINLINE gl_ARB_sparse_buffer #-}

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


glBufferPageCommitmentARB :: MonadIO m => GLenum -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glBufferPageCommitmentARB :: 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 ([Char]
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glBufferPageCommitmentARB")

{-# NOINLINE glBufferPageCommitmentARBFunPtr #-}

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


glNamedBufferPageCommitmentARB :: MonadIO m => GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glNamedBufferPageCommitmentARB :: 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 ([Char]
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glNamedBufferPageCommitmentARB")

{-# NOINLINE glNamedBufferPageCommitmentARBFunPtr #-}

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


glNamedBufferPageCommitmentEXT :: MonadIO m => GLuint -> GLintptr -> GLsizeiptr -> GLboolean -> m ()
glNamedBufferPageCommitmentEXT :: 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 ([Char]
-> IO
     (FunPtr (GLenum -> GLintptr -> GLintptr -> GLboolean -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glNamedBufferPageCommitmentEXT")

{-# NOINLINE glNamedBufferPageCommitmentEXTFunPtr #-}

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

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