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

  -- * GL_NV_polygon_mode
  , glPolygonModeNV
  , pattern GL_FILL_NV
  , pattern GL_LINE_NV
  , pattern GL_POINT_NV
  , pattern GL_POLYGON_MODE_NV
  , pattern GL_POLYGON_OFFSET_LINE_NV
  , pattern GL_POLYGON_OFFSET_POINT_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_polygon_mode.txt GL_NV_polygon_mode> extension is available.

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

-- | Usage: @'glPolygonModeNV' face mode@
--
-- The parameter @face@ is a @MaterialFace@, one of: 'Graphics.GL.Internal.Shared.GL_BACK', 'Graphics.GL.Internal.Shared.GL_FRONT', 'Graphics.GL.Internal.Shared.GL_FRONT_AND_BACK'.
--
-- The parameter @mode@ is a @PolygonMode@, one of: 'Graphics.GL.Internal.Shared.GL_FILL', 'Graphics.GL.Internal.Shared.GL_LINE', 'Graphics.GL.Internal.Shared.GL_POINT'.
--
-- This command is an alias for 'Graphics.GL.Internal.Shared.glPolygonMode'.


glPolygonModeNV :: MonadIO m => GLenum -> GLenum -> m ()
glPolygonModeNV :: GLenum -> GLenum -> m ()
glPolygonModeNV = FunPtr (GLenum -> GLenum -> IO ()) -> GLenum -> GLenum -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLenum -> GLenum -> IO ()) -> GLenum -> GLenum -> m ()
ffienumenumIOV FunPtr (GLenum -> GLenum -> IO ())
glPolygonModeNVFunPtr

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

{-# NOINLINE glPolygonModeNVFunPtr #-}

pattern $bGL_FILL_NV :: a
$mGL_FILL_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_FILL_NV = 0x1B02

pattern $bGL_LINE_NV :: a
$mGL_LINE_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_LINE_NV = 0x1B01

pattern $bGL_POINT_NV :: a
$mGL_POINT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_POINT_NV = 0x1B00

pattern $bGL_POLYGON_MODE_NV :: a
$mGL_POLYGON_MODE_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_POLYGON_MODE_NV = 0x0B40

pattern $bGL_POLYGON_OFFSET_LINE_NV :: a
$mGL_POLYGON_OFFSET_LINE_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_POLYGON_OFFSET_LINE_NV = 0x2A02

pattern $bGL_POLYGON_OFFSET_POINT_NV :: a
$mGL_POLYGON_OFFSET_POINT_NV :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_POLYGON_OFFSET_POINT_NV = 0x2A01