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

  -- * GL_OES_vertex_array_object
  , glBindVertexArrayOES
  , glDeleteVertexArraysOES
  , glGenVertexArraysOES
  , glIsVertexArrayOES
  , pattern GL_VERTEX_ARRAY_BINDING_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_vertex_array_object.txt GL_OES_vertex_array_object> extension is available.

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

-- | Usage: @'glBindVertexArrayOES' array@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glBindVertexArray'.


glBindVertexArrayOES :: MonadIO m => GLuint -> m ()
glBindVertexArrayOES :: GLuint -> m ()
glBindVertexArrayOES = FunPtr (GLuint -> IO ()) -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO ()) -> GLuint -> m ()
ffiuintIOV FunPtr (GLuint -> IO ())
glBindVertexArrayOESFunPtr

glBindVertexArrayOESFunPtr :: FunPtr (GLuint -> IO ())
glBindVertexArrayOESFunPtr :: FunPtr (GLuint -> IO ())
glBindVertexArrayOESFunPtr = IO (FunPtr (GLuint -> IO ())) -> FunPtr (GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glBindVertexArrayOES")

{-# NOINLINE glBindVertexArrayOESFunPtr #-}

-- | Usage: @'glDeleteVertexArraysOES' n arrays@
--
-- The length of @arrays@ should be @n@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glDeleteVertexArrays'.


glDeleteVertexArraysOES :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glDeleteVertexArraysOES :: GLsizei -> Ptr GLuint -> m ()
glDeleteVertexArraysOES = FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteVertexArraysOESFunPtr

glDeleteVertexArraysOESFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteVertexArraysOESFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glDeleteVertexArraysOESFunPtr = IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
-> FunPtr (GLsizei -> Ptr GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glDeleteVertexArraysOES")

{-# NOINLINE glDeleteVertexArraysOESFunPtr #-}

-- | Usage: @'glGenVertexArraysOES' n arrays@
--
-- The length of @arrays@ should be @n@.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glGenVertexArrays'.


glGenVertexArraysOES :: MonadIO m => GLsizei -> Ptr GLuint -> m ()
glGenVertexArraysOES :: GLsizei -> Ptr GLuint -> m ()
glGenVertexArraysOES = FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLsizei -> Ptr GLuint -> IO ())
-> GLsizei -> Ptr GLuint -> m ()
ffisizeiPtruintIOV FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenVertexArraysOESFunPtr

glGenVertexArraysOESFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenVertexArraysOESFunPtr :: FunPtr (GLsizei -> Ptr GLuint -> IO ())
glGenVertexArraysOESFunPtr = IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
-> FunPtr (GLsizei -> Ptr GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLsizei -> Ptr GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGenVertexArraysOES")

{-# NOINLINE glGenVertexArraysOESFunPtr #-}

-- | Usage: @'glIsVertexArrayOES' array@
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glIsVertexArray'.


glIsVertexArrayOES :: MonadIO m => GLuint -> m GLboolean
glIsVertexArrayOES :: GLuint -> m GLboolean
glIsVertexArrayOES = FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO GLboolean) -> GLuint -> m GLboolean
ffiuintIOboolean FunPtr (GLuint -> IO GLboolean)
glIsVertexArrayOESFunPtr

glIsVertexArrayOESFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsVertexArrayOESFunPtr :: FunPtr (GLuint -> IO GLboolean)
glIsVertexArrayOESFunPtr = IO (FunPtr (GLuint -> IO GLboolean))
-> FunPtr (GLuint -> IO GLboolean)
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO GLboolean))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glIsVertexArrayOES")

{-# NOINLINE glIsVertexArrayOESFunPtr #-}

pattern $bGL_VERTEX_ARRAY_BINDING_OES :: a
$mGL_VERTEX_ARRAY_BINDING_OES :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_VERTEX_ARRAY_BINDING_OES = 0x85B5