-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.EXT.BufferStorage (
  -- * Extension Support
    gl_EXT_buffer_storage

  -- * GL_EXT_buffer_storage
  , glBufferStorageEXT
  , pattern GL_BUFFER_IMMUTABLE_STORAGE_EXT
  , pattern GL_BUFFER_STORAGE_FLAGS_EXT
  , pattern GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT
  , pattern GL_CLIENT_STORAGE_BIT_EXT
  , pattern GL_DYNAMIC_STORAGE_BIT_EXT
  , pattern GL_MAP_COHERENT_BIT_EXT
  , pattern GL_MAP_PERSISTENT_BIT_EXT
  , pattern GL_MAP_READ_BIT
  , pattern GL_MAP_WRITE_BIT
) 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/EXT/EXT_buffer_storage.txt GL_EXT_buffer_storage> extension is available.

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

-- | Usage: @'glBufferStorageEXT' target size data flags@
--
-- The length of @data@ should be @size@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glBufferStorage'.


glBufferStorageEXT :: MonadIO m => GLenum -> GLsizeiptr -> Ptr () -> GLbitfield -> m ()
glBufferStorageEXT :: GLenum -> GLsizeiptr -> Ptr () -> GLenum -> m ()
glBufferStorageEXT = FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ())
-> GLenum -> GLsizeiptr -> Ptr () -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ())
-> GLenum -> GLsizeiptr -> Ptr () -> GLenum -> m ()
ffienumsizeiptrPtrVbitfieldIOV FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ())
glBufferStorageEXTFunPtr

glBufferStorageEXTFunPtr :: FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLbitfield -> IO ())
glBufferStorageEXTFunPtr :: FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ())
glBufferStorageEXTFunPtr = IO (FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ()))
-> FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char]
-> IO (FunPtr (GLenum -> GLsizeiptr -> Ptr () -> GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glBufferStorageEXT")

{-# NOINLINE glBufferStorageEXTFunPtr #-}

pattern $bGL_BUFFER_IMMUTABLE_STORAGE_EXT :: a
$mGL_BUFFER_IMMUTABLE_STORAGE_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_IMMUTABLE_STORAGE_EXT = 0x821F

pattern $bGL_BUFFER_STORAGE_FLAGS_EXT :: a
$mGL_BUFFER_STORAGE_FLAGS_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_STORAGE_FLAGS_EXT = 0x8220

pattern $bGL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT :: a
$mGL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT = 0x00004000

pattern $bGL_CLIENT_STORAGE_BIT_EXT :: a
$mGL_CLIENT_STORAGE_BIT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_CLIENT_STORAGE_BIT_EXT = 0x0200

pattern $bGL_DYNAMIC_STORAGE_BIT_EXT :: a
$mGL_DYNAMIC_STORAGE_BIT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_DYNAMIC_STORAGE_BIT_EXT = 0x0100

pattern $bGL_MAP_COHERENT_BIT_EXT :: a
$mGL_MAP_COHERENT_BIT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_MAP_COHERENT_BIT_EXT = 0x0080

pattern $bGL_MAP_PERSISTENT_BIT_EXT :: a
$mGL_MAP_PERSISTENT_BIT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_MAP_PERSISTENT_BIT_EXT = 0x0040