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

  -- * GL_EXT_discard_framebuffer
  , glDiscardFramebufferEXT
  , pattern GL_COLOR_EXT
  , pattern GL_DEPTH_EXT
  , pattern GL_STENCIL_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_discard_framebuffer.txt GL_EXT_discard_framebuffer> extension is available.

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

-- | Usage: @'glDiscardFramebufferEXT' target numAttachments attachments@
--
-- The length of @attachments@ should be @numAttachments@.


glDiscardFramebufferEXT :: MonadIO m => GLenum -> GLsizei -> Ptr GLenum -> m ()
glDiscardFramebufferEXT :: GLenum -> GLsizei -> Ptr GLenum -> m ()
glDiscardFramebufferEXT = FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
-> GLenum -> GLsizei -> Ptr GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
-> GLenum -> GLsizei -> Ptr GLenum -> m ()
ffienumsizeiPtrenumIOV FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
glDiscardFramebufferEXTFunPtr

glDiscardFramebufferEXTFunPtr :: FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
glDiscardFramebufferEXTFunPtr :: FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
glDiscardFramebufferEXTFunPtr = IO (FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ()))
-> FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLenum -> GLsizei -> Ptr GLenum -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glDiscardFramebufferEXT")

{-# NOINLINE glDiscardFramebufferEXTFunPtr #-}

pattern $bGL_COLOR_EXT :: a
$mGL_COLOR_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_COLOR_EXT = 0x1800

pattern $bGL_DEPTH_EXT :: a
$mGL_DEPTH_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_DEPTH_EXT = 0x1801

pattern $bGL_STENCIL_EXT :: a
$mGL_STENCIL_EXT :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_STENCIL_EXT = 0x1802