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

  -- * GL_EXT_multiview_draw_buffers
  , glDrawBuffersIndexedEXT
  , glGetIntegeri_vEXT
  , glReadBufferIndexedEXT
  , pattern GL_COLOR_ATTACHMENT_EXT
  , pattern GL_DRAW_BUFFER_EXT
  , pattern GL_MAX_MULTIVIEW_BUFFERS_EXT
  , pattern GL_MULTIVIEW_EXT
  , pattern GL_READ_BUFFER_EXT
) 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/EXT/EXT_multiview_draw_buffers.txt GL_EXT_multiview_draw_buffers> extension is available.

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

-- | Usage: @'glDrawBuffersIndexedEXT' n location indices@
--
-- The length of @location@ should be @n@.
--
-- The length of @indices@ should be @n@.


glDrawBuffersIndexedEXT :: MonadIO m => GLint -> Ptr GLenum -> Ptr GLint -> m ()
glDrawBuffersIndexedEXT :: GLint -> Ptr GLenum -> Ptr GLint -> m ()
glDrawBuffersIndexedEXT = FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
-> GLint -> Ptr GLenum -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
-> GLint -> Ptr GLenum -> Ptr GLint -> m ()
ffiintPtrenumPtrintIOV FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
glDrawBuffersIndexedEXTFunPtr

glDrawBuffersIndexedEXTFunPtr :: FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
glDrawBuffersIndexedEXTFunPtr :: FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
glDrawBuffersIndexedEXTFunPtr = IO (FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ()))
-> FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLint -> Ptr GLenum -> Ptr GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glDrawBuffersIndexedEXT")

{-# NOINLINE glDrawBuffersIndexedEXTFunPtr #-}

-- | Usage: @'glGetIntegeri_vEXT' target index data@


glGetIntegeri_vEXT :: MonadIO m => GLenum -> GLuint -> Ptr GLint -> m ()
glGetIntegeri_vEXT :: GLenum -> GLenum -> Ptr GLint -> m ()
glGetIntegeri_vEXT = FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
-> GLenum -> GLenum -> Ptr GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
-> GLenum -> GLenum -> Ptr GLint -> m ()
ffienumuintPtrintIOV FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
glGetIntegeri_vEXTFunPtr

glGetIntegeri_vEXTFunPtr :: FunPtr (GLenum -> GLuint -> Ptr GLint -> IO ())
glGetIntegeri_vEXTFunPtr :: FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
glGetIntegeri_vEXTFunPtr = IO (FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ()))
-> FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glGetIntegeri_vEXT")

{-# NOINLINE glGetIntegeri_vEXTFunPtr #-}

-- | Usage: @'glReadBufferIndexedEXT' src index@


glReadBufferIndexedEXT :: MonadIO m => GLenum -> GLint -> m ()
glReadBufferIndexedEXT :: GLenum -> GLint -> m ()
glReadBufferIndexedEXT = FunPtr (GLenum -> GLint -> IO ()) -> GLenum -> GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLint -> IO ()) -> GLenum -> GLint -> m ()
ffienumintIOV FunPtr (GLenum -> GLint -> IO ())
glReadBufferIndexedEXTFunPtr

glReadBufferIndexedEXTFunPtr :: FunPtr (GLenum -> GLint -> IO ())
glReadBufferIndexedEXTFunPtr :: FunPtr (GLenum -> GLint -> IO ())
glReadBufferIndexedEXTFunPtr = IO (FunPtr (GLenum -> GLint -> IO ()))
-> FunPtr (GLenum -> GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glReadBufferIndexedEXT")

{-# NOINLINE glReadBufferIndexedEXTFunPtr #-}

pattern $bGL_COLOR_ATTACHMENT_EXT :: a
$mGL_COLOR_ATTACHMENT_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_COLOR_ATTACHMENT_EXT = 0x90F0

pattern $bGL_DRAW_BUFFER_EXT :: a
$mGL_DRAW_BUFFER_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_DRAW_BUFFER_EXT = 0x0C01

pattern $bGL_MAX_MULTIVIEW_BUFFERS_EXT :: a
$mGL_MAX_MULTIVIEW_BUFFERS_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_MAX_MULTIVIEW_BUFFERS_EXT = 0x90F2

pattern $bGL_MULTIVIEW_EXT :: a
$mGL_MULTIVIEW_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_MULTIVIEW_EXT = 0x90F1

pattern $bGL_READ_BUFFER_EXT :: a
$mGL_READ_BUFFER_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_READ_BUFFER_EXT = 0x0C02