{-# language CPP #-}
module Vulkan.Core11.Enums.PointClippingBehavior  (PointClippingBehavior( POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES
                                                                        , POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
                                                                        , ..
                                                                        )) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
-- | VkPointClippingBehavior - Enum specifying the point clipping behavior
--
-- = See Also
--
-- 'Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.PhysicalDevicePointClippingProperties',
-- 'Vulkan.Core12.PhysicalDeviceVulkan11Properties'
newtype PointClippingBehavior = PointClippingBehavior Int32
  deriving newtype (PointClippingBehavior -> PointClippingBehavior -> Bool
(PointClippingBehavior -> PointClippingBehavior -> Bool)
-> (PointClippingBehavior -> PointClippingBehavior -> Bool)
-> Eq PointClippingBehavior
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c/= :: PointClippingBehavior -> PointClippingBehavior -> Bool
== :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c== :: PointClippingBehavior -> PointClippingBehavior -> Bool
Eq, Eq PointClippingBehavior
Eq PointClippingBehavior =>
(PointClippingBehavior -> PointClippingBehavior -> Ordering)
-> (PointClippingBehavior -> PointClippingBehavior -> Bool)
-> (PointClippingBehavior -> PointClippingBehavior -> Bool)
-> (PointClippingBehavior -> PointClippingBehavior -> Bool)
-> (PointClippingBehavior -> PointClippingBehavior -> Bool)
-> (PointClippingBehavior
    -> PointClippingBehavior -> PointClippingBehavior)
-> (PointClippingBehavior
    -> PointClippingBehavior -> PointClippingBehavior)
-> Ord PointClippingBehavior
PointClippingBehavior -> PointClippingBehavior -> Bool
PointClippingBehavior -> PointClippingBehavior -> Ordering
PointClippingBehavior
-> PointClippingBehavior -> PointClippingBehavior
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PointClippingBehavior
-> PointClippingBehavior -> PointClippingBehavior
$cmin :: PointClippingBehavior
-> PointClippingBehavior -> PointClippingBehavior
max :: PointClippingBehavior
-> PointClippingBehavior -> PointClippingBehavior
$cmax :: PointClippingBehavior
-> PointClippingBehavior -> PointClippingBehavior
>= :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c>= :: PointClippingBehavior -> PointClippingBehavior -> Bool
> :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c> :: PointClippingBehavior -> PointClippingBehavior -> Bool
<= :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c<= :: PointClippingBehavior -> PointClippingBehavior -> Bool
< :: PointClippingBehavior -> PointClippingBehavior -> Bool
$c< :: PointClippingBehavior -> PointClippingBehavior -> Bool
compare :: PointClippingBehavior -> PointClippingBehavior -> Ordering
$ccompare :: PointClippingBehavior -> PointClippingBehavior -> Ordering
$cp1Ord :: Eq PointClippingBehavior
Ord, Ptr b -> Int -> IO PointClippingBehavior
Ptr b -> Int -> PointClippingBehavior -> IO ()
Ptr PointClippingBehavior -> IO PointClippingBehavior
Ptr PointClippingBehavior -> Int -> IO PointClippingBehavior
Ptr PointClippingBehavior -> Int -> PointClippingBehavior -> IO ()
Ptr PointClippingBehavior -> PointClippingBehavior -> IO ()
PointClippingBehavior -> Int
(PointClippingBehavior -> Int)
-> (PointClippingBehavior -> Int)
-> (Ptr PointClippingBehavior -> Int -> IO PointClippingBehavior)
-> (Ptr PointClippingBehavior
    -> Int -> PointClippingBehavior -> IO ())
-> (forall b. Ptr b -> Int -> IO PointClippingBehavior)
-> (forall b. Ptr b -> Int -> PointClippingBehavior -> IO ())
-> (Ptr PointClippingBehavior -> IO PointClippingBehavior)
-> (Ptr PointClippingBehavior -> PointClippingBehavior -> IO ())
-> Storable PointClippingBehavior
forall b. Ptr b -> Int -> IO PointClippingBehavior
forall b. Ptr b -> Int -> PointClippingBehavior -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PointClippingBehavior -> PointClippingBehavior -> IO ()
$cpoke :: Ptr PointClippingBehavior -> PointClippingBehavior -> IO ()
peek :: Ptr PointClippingBehavior -> IO PointClippingBehavior
$cpeek :: Ptr PointClippingBehavior -> IO PointClippingBehavior
pokeByteOff :: Ptr b -> Int -> PointClippingBehavior -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PointClippingBehavior -> IO ()
peekByteOff :: Ptr b -> Int -> IO PointClippingBehavior
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PointClippingBehavior
pokeElemOff :: Ptr PointClippingBehavior -> Int -> PointClippingBehavior -> IO ()
$cpokeElemOff :: Ptr PointClippingBehavior -> Int -> PointClippingBehavior -> IO ()
peekElemOff :: Ptr PointClippingBehavior -> Int -> IO PointClippingBehavior
$cpeekElemOff :: Ptr PointClippingBehavior -> Int -> IO PointClippingBehavior
alignment :: PointClippingBehavior -> Int
$calignment :: PointClippingBehavior -> Int
sizeOf :: PointClippingBehavior -> Int
$csizeOf :: PointClippingBehavior -> Int
Storable, PointClippingBehavior
PointClippingBehavior -> Zero PointClippingBehavior
forall a. a -> Zero a
zero :: PointClippingBehavior
$czero :: PointClippingBehavior
Zero)

-- | 'POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES' specifies that the primitive
-- is discarded if the vertex lies outside any clip plane, including the
-- planes bounding the view volume.
pattern $bPOINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES :: PointClippingBehavior
$mPOINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES :: forall r.
PointClippingBehavior -> (Void# -> r) -> (Void# -> r) -> r
POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = PointClippingBehavior 0
-- | 'POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY' specifies that the
-- primitive is discarded only if the vertex lies outside any user clip
-- plane.
pattern $bPOINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY :: PointClippingBehavior
$mPOINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY :: forall r.
PointClippingBehavior -> (Void# -> r) -> (Void# -> r) -> r
POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = PointClippingBehavior 1
{-# complete POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
             POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY :: PointClippingBehavior #-}

instance Show PointClippingBehavior where
  showsPrec :: Int -> PointClippingBehavior -> ShowS
showsPrec p :: Int
p = \case
    POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES -> String -> ShowS
showString "POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES"
    POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY -> String -> ShowS
showString "POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY"
    PointClippingBehavior x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PointClippingBehavior " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read PointClippingBehavior where
  readPrec :: ReadPrec PointClippingBehavior
readPrec = ReadPrec PointClippingBehavior -> ReadPrec PointClippingBehavior
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PointClippingBehavior)]
-> ReadPrec PointClippingBehavior
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES", PointClippingBehavior -> ReadPrec PointClippingBehavior
forall (f :: * -> *) a. Applicative f => a -> f a
pure PointClippingBehavior
POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES)
                            , ("POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY", PointClippingBehavior -> ReadPrec PointClippingBehavior
forall (f :: * -> *) a. Applicative f => a -> f a
pure PointClippingBehavior
POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY)]
                     ReadPrec PointClippingBehavior
-> ReadPrec PointClippingBehavior -> ReadPrec PointClippingBehavior
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PointClippingBehavior -> ReadPrec PointClippingBehavior
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PointClippingBehavior")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       PointClippingBehavior -> ReadPrec PointClippingBehavior
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PointClippingBehavior
PointClippingBehavior Int32
v)))