-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.ATI.SeparateStencil (
  -- * Extension Support
    gl_ATI_separate_stencil

  -- * GL_ATI_separate_stencil
  , glStencilFuncSeparateATI
  , glStencilOpSeparateATI
  , pattern GL_STENCIL_BACK_FAIL_ATI
  , pattern GL_STENCIL_BACK_FUNC_ATI
  , pattern GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI
  , pattern GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI
) 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://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/specs/ATI/separate_stencil.txt GL_ATI_separate_stencil> extension is available.

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

-- | Usage: @'glStencilFuncSeparateATI' frontfunc backfunc ref mask@
--
-- The parameter @frontfunc@ is a @StencilFunction@, one of: 'Graphics.GL.Internal.Shared.GL_ALWAYS', 'Graphics.GL.Internal.Shared.GL_EQUAL', 'Graphics.GL.Internal.Shared.GL_GEQUAL', 'Graphics.GL.Internal.Shared.GL_GREATER', 'Graphics.GL.Internal.Shared.GL_LEQUAL', 'Graphics.GL.Internal.Shared.GL_LESS', 'Graphics.GL.Internal.Shared.GL_NEVER', 'Graphics.GL.Internal.Shared.GL_NOTEQUAL'.
--
-- The parameter @backfunc@ is a @StencilFunction@, one of: 'Graphics.GL.Internal.Shared.GL_ALWAYS', 'Graphics.GL.Internal.Shared.GL_EQUAL', 'Graphics.GL.Internal.Shared.GL_GEQUAL', 'Graphics.GL.Internal.Shared.GL_GREATER', 'Graphics.GL.Internal.Shared.GL_LEQUAL', 'Graphics.GL.Internal.Shared.GL_LESS', 'Graphics.GL.Internal.Shared.GL_NEVER', 'Graphics.GL.Internal.Shared.GL_NOTEQUAL'.
--
-- The parameter @ref@ is a @ClampedStencilValue@.
--
-- The parameter @mask@ is a @MaskedStencilValue@.


glStencilFuncSeparateATI :: MonadIO m => GLenum -> GLenum -> GLint -> GLuint -> m ()
glStencilFuncSeparateATI :: GLenum -> GLenum -> GLint -> GLenum -> m ()
glStencilFuncSeparateATI = FunPtr (GLenum -> GLenum -> GLint -> GLenum -> IO ())
-> GLenum -> GLenum -> GLint -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> GLint -> GLenum -> IO ())
-> GLenum -> GLenum -> GLint -> GLenum -> m ()
ffienumenumintuintIOV FunPtr (GLenum -> GLenum -> GLint -> GLenum -> IO ())
glStencilFuncSeparateATIFunPtr

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

{-# NOINLINE glStencilFuncSeparateATIFunPtr #-}

-- | Usage: @'glStencilOpSeparateATI' face sfail dpfail dppass@
--
-- The parameter @face@ is a @StencilFaceDirection@.
--
-- The parameter @sfail@ is a @StencilOp@, one of: 'Graphics.GL.Internal.Shared.GL_DECR', 'Graphics.GL.Internal.Shared.GL_INCR', 'Graphics.GL.Internal.Shared.GL_INVERT', 'Graphics.GL.Internal.Shared.GL_KEEP', 'Graphics.GL.Internal.Shared.GL_REPLACE', 'Graphics.GL.Internal.Shared.GL_ZERO'.
--
-- The parameter @dpfail@ is a @StencilOp@, one of: 'Graphics.GL.Internal.Shared.GL_DECR', 'Graphics.GL.Internal.Shared.GL_INCR', 'Graphics.GL.Internal.Shared.GL_INVERT', 'Graphics.GL.Internal.Shared.GL_KEEP', 'Graphics.GL.Internal.Shared.GL_REPLACE', 'Graphics.GL.Internal.Shared.GL_ZERO'.
--
-- The parameter @dppass@ is a @StencilOp@, one of: 'Graphics.GL.Internal.Shared.GL_DECR', 'Graphics.GL.Internal.Shared.GL_INCR', 'Graphics.GL.Internal.Shared.GL_INVERT', 'Graphics.GL.Internal.Shared.GL_KEEP', 'Graphics.GL.Internal.Shared.GL_REPLACE', 'Graphics.GL.Internal.Shared.GL_ZERO'.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glStencilOpSeparate'.


glStencilOpSeparateATI :: MonadIO m => GLenum -> GLenum -> GLenum -> GLenum -> m ()
glStencilOpSeparateATI :: GLenum -> GLenum -> GLenum -> GLenum -> m ()
glStencilOpSeparateATI = FunPtr (GLenum -> GLenum -> GLenum -> GLenum -> IO ())
-> GLenum -> GLenum -> GLenum -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> GLenum -> GLenum -> IO ())
-> GLenum -> GLenum -> GLenum -> GLenum -> m ()
ffienumenumenumenumIOV FunPtr (GLenum -> GLenum -> GLenum -> GLenum -> IO ())
glStencilOpSeparateATIFunPtr

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

{-# NOINLINE glStencilOpSeparateATIFunPtr #-}

pattern $bGL_STENCIL_BACK_FAIL_ATI :: a
$mGL_STENCIL_BACK_FAIL_ATI :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_STENCIL_BACK_FAIL_ATI = 0x8801

pattern $bGL_STENCIL_BACK_FUNC_ATI :: a
$mGL_STENCIL_BACK_FUNC_ATI :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_STENCIL_BACK_FUNC_ATI = 0x8800

pattern $bGL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI :: a
$mGL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802

pattern $bGL_STENCIL_BACK_PASS_DEPTH_PASS_ATI :: a
$mGL_STENCIL_BACK_PASS_DEPTH_PASS_ATI :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803