-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.OES.Mapbuffer (
  -- * Extension Support
    gl_OES_mapbuffer

  -- * GL_OES_mapbuffer
  , glGetBufferPointervOES
  , glMapBufferOES
  , glUnmapBufferOES
  , pattern GL_BUFFER_ACCESS_OES
  , pattern GL_BUFFER_MAPPED_OES
  , pattern GL_BUFFER_MAP_POINTER_OES
  , pattern GL_WRITE_ONLY_OES
) 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://www.khronos.org/registry/gles/extensions/OES/OES_mapbuffer.txt GL_OES_mapbuffer> extension is available.

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

-- | Usage: @'glGetBufferPointervOES' target pname params@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGetBufferPointerv'.


glGetBufferPointervOES :: MonadIO m => GLenum -> GLenum -> Ptr (Ptr ()) -> m ()
glGetBufferPointervOES :: GLenum -> GLenum -> Ptr (Ptr ()) -> m ()
glGetBufferPointervOES = FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
-> GLenum -> GLenum -> Ptr (Ptr ()) -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
-> GLenum -> GLenum -> Ptr (Ptr ()) -> m ()
ffienumenumPtrPtrVIOV FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
glGetBufferPointervOESFunPtr

glGetBufferPointervOESFunPtr :: FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
glGetBufferPointervOESFunPtr :: FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
glGetBufferPointervOESFunPtr = IO (FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ()))
-> FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLenum -> Ptr (Ptr ()) -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGetBufferPointervOES")

{-# NOINLINE glGetBufferPointervOESFunPtr #-}

-- | Usage: @'glMapBufferOES' target access@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glMapBuffer'.


glMapBufferOES :: MonadIO m => GLenum -> GLenum -> m (Ptr ())
glMapBufferOES :: GLenum -> GLenum -> m (Ptr ())
glMapBufferOES = FunPtr (GLenum -> GLenum -> IO (Ptr ()))
-> GLenum -> GLenum -> m (Ptr ())
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> IO (Ptr ()))
-> GLenum -> GLenum -> m (Ptr ())
ffienumenumIOPtrV FunPtr (GLenum -> GLenum -> IO (Ptr ()))
glMapBufferOESFunPtr

glMapBufferOESFunPtr :: FunPtr (GLenum -> GLenum -> IO (Ptr ()))
glMapBufferOESFunPtr :: FunPtr (GLenum -> GLenum -> IO (Ptr ()))
glMapBufferOESFunPtr = IO (FunPtr (GLenum -> GLenum -> IO (Ptr ())))
-> FunPtr (GLenum -> GLenum -> IO (Ptr ()))
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLenum -> IO (Ptr ())))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glMapBufferOES")

{-# NOINLINE glMapBufferOESFunPtr #-}

-- | Usage: @'glUnmapBufferOES' target@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glUnmapBuffer'.


glUnmapBufferOES :: MonadIO m => GLenum -> m GLboolean
glUnmapBufferOES :: GLenum -> m GLboolean
glUnmapBufferOES = FunPtr (GLenum -> IO GLboolean) -> GLenum -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> IO GLboolean) -> GLenum -> m GLboolean
ffienumIOboolean FunPtr (GLenum -> IO GLboolean)
glUnmapBufferOESFunPtr

glUnmapBufferOESFunPtr :: FunPtr (GLenum -> IO GLboolean)
glUnmapBufferOESFunPtr :: FunPtr (GLenum -> IO GLboolean)
glUnmapBufferOESFunPtr = IO (FunPtr (GLenum -> IO GLboolean))
-> FunPtr (GLenum -> IO GLboolean)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> IO GLboolean))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glUnmapBufferOES")

{-# NOINLINE glUnmapBufferOESFunPtr #-}

pattern $bGL_BUFFER_ACCESS_OES :: a
$mGL_BUFFER_ACCESS_OES :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_ACCESS_OES = 0x88BB

pattern $bGL_BUFFER_MAPPED_OES :: a
$mGL_BUFFER_MAPPED_OES :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_MAPPED_OES = 0x88BC

pattern $bGL_BUFFER_MAP_POINTER_OES :: a
$mGL_BUFFER_MAP_POINTER_OES :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_BUFFER_MAP_POINTER_OES = 0x88BD

pattern $bGL_WRITE_ONLY_OES :: a
$mGL_WRITE_ONLY_OES :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_WRITE_ONLY_OES = 0x88B9