-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.NV.ReadBuffer (
  -- * Extension Support
    gl_NV_read_buffer

  -- * GL_NV_read_buffer
  , glReadBufferNV
  , pattern GL_READ_BUFFER_NV
) 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/NV/NV_read_buffer.txt GL_NV_read_buffer> extension is available.

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

-- | Usage: @'glReadBufferNV' mode@


glReadBufferNV :: MonadIO m => GLenum -> m ()
glReadBufferNV :: GLenum -> m ()
glReadBufferNV = FunPtr (GLenum -> IO ()) -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> IO ()) -> GLenum -> m ()
ffienumIOV FunPtr (GLenum -> IO ())
glReadBufferNVFunPtr

glReadBufferNVFunPtr :: FunPtr (GLenum -> IO ())
glReadBufferNVFunPtr :: FunPtr (GLenum -> IO ())
glReadBufferNVFunPtr = IO (FunPtr (GLenum -> IO ())) -> FunPtr (GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glReadBufferNV")

{-# NOINLINE glReadBufferNVFunPtr #-}

pattern $bGL_READ_BUFFER_NV :: a
$mGL_READ_BUFFER_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_READ_BUFFER_NV = 0x0C02