{-# language CPP #-}
-- No documentation found for Chapter "CullModeFlagBits"
module Vulkan.Core10.Enums.CullModeFlagBits  ( CullModeFlags
                                             , CullModeFlagBits( CULL_MODE_NONE
                                                               , CULL_MODE_FRONT_BIT
                                                               , CULL_MODE_BACK_BIT
                                                               , CULL_MODE_FRONT_AND_BACK
                                                               , ..
                                                               )
                                             ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
type CullModeFlags = CullModeFlagBits

-- | VkCullModeFlagBits - Bitmask controlling triangle culling
--
-- = Description
--
-- Following culling, fragments are produced for any triangles which have
-- not been discarded.
--
-- = See Also
--
-- 'CullModeFlags'
newtype CullModeFlagBits = CullModeFlagBits Flags
  deriving newtype (CullModeFlagBits -> CullModeFlagBits -> Bool
(CullModeFlagBits -> CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> CullModeFlagBits -> Bool)
-> Eq CullModeFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c/= :: CullModeFlagBits -> CullModeFlagBits -> Bool
== :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c== :: CullModeFlagBits -> CullModeFlagBits -> Bool
Eq, Eq CullModeFlagBits
Eq CullModeFlagBits =>
(CullModeFlagBits -> CullModeFlagBits -> Ordering)
-> (CullModeFlagBits -> CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits)
-> (CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits)
-> Ord CullModeFlagBits
CullModeFlagBits -> CullModeFlagBits -> Bool
CullModeFlagBits -> CullModeFlagBits -> Ordering
CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
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 :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$cmin :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
max :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$cmax :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
>= :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c>= :: CullModeFlagBits -> CullModeFlagBits -> Bool
> :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c> :: CullModeFlagBits -> CullModeFlagBits -> Bool
<= :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c<= :: CullModeFlagBits -> CullModeFlagBits -> Bool
< :: CullModeFlagBits -> CullModeFlagBits -> Bool
$c< :: CullModeFlagBits -> CullModeFlagBits -> Bool
compare :: CullModeFlagBits -> CullModeFlagBits -> Ordering
$ccompare :: CullModeFlagBits -> CullModeFlagBits -> Ordering
$cp1Ord :: Eq CullModeFlagBits
Ord, Ptr b -> Int -> IO CullModeFlagBits
Ptr b -> Int -> CullModeFlagBits -> IO ()
Ptr CullModeFlagBits -> IO CullModeFlagBits
Ptr CullModeFlagBits -> Int -> IO CullModeFlagBits
Ptr CullModeFlagBits -> Int -> CullModeFlagBits -> IO ()
Ptr CullModeFlagBits -> CullModeFlagBits -> IO ()
CullModeFlagBits -> Int
(CullModeFlagBits -> Int)
-> (CullModeFlagBits -> Int)
-> (Ptr CullModeFlagBits -> Int -> IO CullModeFlagBits)
-> (Ptr CullModeFlagBits -> Int -> CullModeFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO CullModeFlagBits)
-> (forall b. Ptr b -> Int -> CullModeFlagBits -> IO ())
-> (Ptr CullModeFlagBits -> IO CullModeFlagBits)
-> (Ptr CullModeFlagBits -> CullModeFlagBits -> IO ())
-> Storable CullModeFlagBits
forall b. Ptr b -> Int -> IO CullModeFlagBits
forall b. Ptr b -> Int -> CullModeFlagBits -> 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 CullModeFlagBits -> CullModeFlagBits -> IO ()
$cpoke :: Ptr CullModeFlagBits -> CullModeFlagBits -> IO ()
peek :: Ptr CullModeFlagBits -> IO CullModeFlagBits
$cpeek :: Ptr CullModeFlagBits -> IO CullModeFlagBits
pokeByteOff :: Ptr b -> Int -> CullModeFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CullModeFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO CullModeFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CullModeFlagBits
pokeElemOff :: Ptr CullModeFlagBits -> Int -> CullModeFlagBits -> IO ()
$cpokeElemOff :: Ptr CullModeFlagBits -> Int -> CullModeFlagBits -> IO ()
peekElemOff :: Ptr CullModeFlagBits -> Int -> IO CullModeFlagBits
$cpeekElemOff :: Ptr CullModeFlagBits -> Int -> IO CullModeFlagBits
alignment :: CullModeFlagBits -> Int
$calignment :: CullModeFlagBits -> Int
sizeOf :: CullModeFlagBits -> Int
$csizeOf :: CullModeFlagBits -> Int
Storable, CullModeFlagBits
CullModeFlagBits -> Zero CullModeFlagBits
forall a. a -> Zero a
zero :: CullModeFlagBits
$czero :: CullModeFlagBits
Zero, Eq CullModeFlagBits
CullModeFlagBits
Eq CullModeFlagBits =>
(CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits)
-> (CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits)
-> (CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits)
-> (CullModeFlagBits -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> CullModeFlagBits
-> (Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> Bool)
-> (CullModeFlagBits -> Maybe Int)
-> (CullModeFlagBits -> Int)
-> (CullModeFlagBits -> Bool)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int -> CullModeFlagBits)
-> (CullModeFlagBits -> Int)
-> Bits CullModeFlagBits
Int -> CullModeFlagBits
CullModeFlagBits -> Bool
CullModeFlagBits -> Int
CullModeFlagBits -> Maybe Int
CullModeFlagBits -> CullModeFlagBits
CullModeFlagBits -> Int -> Bool
CullModeFlagBits -> Int -> CullModeFlagBits
CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: CullModeFlagBits -> Int
$cpopCount :: CullModeFlagBits -> Int
rotateR :: CullModeFlagBits -> Int -> CullModeFlagBits
$crotateR :: CullModeFlagBits -> Int -> CullModeFlagBits
rotateL :: CullModeFlagBits -> Int -> CullModeFlagBits
$crotateL :: CullModeFlagBits -> Int -> CullModeFlagBits
unsafeShiftR :: CullModeFlagBits -> Int -> CullModeFlagBits
$cunsafeShiftR :: CullModeFlagBits -> Int -> CullModeFlagBits
shiftR :: CullModeFlagBits -> Int -> CullModeFlagBits
$cshiftR :: CullModeFlagBits -> Int -> CullModeFlagBits
unsafeShiftL :: CullModeFlagBits -> Int -> CullModeFlagBits
$cunsafeShiftL :: CullModeFlagBits -> Int -> CullModeFlagBits
shiftL :: CullModeFlagBits -> Int -> CullModeFlagBits
$cshiftL :: CullModeFlagBits -> Int -> CullModeFlagBits
isSigned :: CullModeFlagBits -> Bool
$cisSigned :: CullModeFlagBits -> Bool
bitSize :: CullModeFlagBits -> Int
$cbitSize :: CullModeFlagBits -> Int
bitSizeMaybe :: CullModeFlagBits -> Maybe Int
$cbitSizeMaybe :: CullModeFlagBits -> Maybe Int
testBit :: CullModeFlagBits -> Int -> Bool
$ctestBit :: CullModeFlagBits -> Int -> Bool
complementBit :: CullModeFlagBits -> Int -> CullModeFlagBits
$ccomplementBit :: CullModeFlagBits -> Int -> CullModeFlagBits
clearBit :: CullModeFlagBits -> Int -> CullModeFlagBits
$cclearBit :: CullModeFlagBits -> Int -> CullModeFlagBits
setBit :: CullModeFlagBits -> Int -> CullModeFlagBits
$csetBit :: CullModeFlagBits -> Int -> CullModeFlagBits
bit :: Int -> CullModeFlagBits
$cbit :: Int -> CullModeFlagBits
zeroBits :: CullModeFlagBits
$czeroBits :: CullModeFlagBits
rotate :: CullModeFlagBits -> Int -> CullModeFlagBits
$crotate :: CullModeFlagBits -> Int -> CullModeFlagBits
shift :: CullModeFlagBits -> Int -> CullModeFlagBits
$cshift :: CullModeFlagBits -> Int -> CullModeFlagBits
complement :: CullModeFlagBits -> CullModeFlagBits
$ccomplement :: CullModeFlagBits -> CullModeFlagBits
xor :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$cxor :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
.|. :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$c.|. :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
.&. :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$c.&. :: CullModeFlagBits -> CullModeFlagBits -> CullModeFlagBits
$cp1Bits :: Eq CullModeFlagBits
Bits, Bits CullModeFlagBits
Bits CullModeFlagBits =>
(CullModeFlagBits -> Int)
-> (CullModeFlagBits -> Int)
-> (CullModeFlagBits -> Int)
-> FiniteBits CullModeFlagBits
CullModeFlagBits -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: CullModeFlagBits -> Int
$ccountTrailingZeros :: CullModeFlagBits -> Int
countLeadingZeros :: CullModeFlagBits -> Int
$ccountLeadingZeros :: CullModeFlagBits -> Int
finiteBitSize :: CullModeFlagBits -> Int
$cfiniteBitSize :: CullModeFlagBits -> Int
$cp1FiniteBits :: Bits CullModeFlagBits
FiniteBits)

-- | 'CULL_MODE_NONE' specifies that no triangles are discarded
pattern $bCULL_MODE_NONE :: CullModeFlagBits
$mCULL_MODE_NONE :: forall r. CullModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
CULL_MODE_NONE           = CullModeFlagBits 0x00000000
-- | 'CULL_MODE_FRONT_BIT' specifies that front-facing triangles are
-- discarded
pattern $bCULL_MODE_FRONT_BIT :: CullModeFlagBits
$mCULL_MODE_FRONT_BIT :: forall r. CullModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
CULL_MODE_FRONT_BIT      = CullModeFlagBits 0x00000001
-- | 'CULL_MODE_BACK_BIT' specifies that back-facing triangles are discarded
pattern $bCULL_MODE_BACK_BIT :: CullModeFlagBits
$mCULL_MODE_BACK_BIT :: forall r. CullModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
CULL_MODE_BACK_BIT       = CullModeFlagBits 0x00000002
-- | 'CULL_MODE_FRONT_AND_BACK' specifies that all triangles are discarded.
pattern $bCULL_MODE_FRONT_AND_BACK :: CullModeFlagBits
$mCULL_MODE_FRONT_AND_BACK :: forall r. CullModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
CULL_MODE_FRONT_AND_BACK = CullModeFlagBits 0x00000003

conNameCullModeFlagBits :: String
conNameCullModeFlagBits :: String
conNameCullModeFlagBits = "CullModeFlagBits"

enumPrefixCullModeFlagBits :: String
enumPrefixCullModeFlagBits :: String
enumPrefixCullModeFlagBits = "CULL_MODE_"

showTableCullModeFlagBits :: [(CullModeFlagBits, String)]
showTableCullModeFlagBits :: [(CullModeFlagBits, String)]
showTableCullModeFlagBits =
  [ (CullModeFlagBits
CULL_MODE_NONE          , "NONE")
  , (CullModeFlagBits
CULL_MODE_FRONT_BIT     , "FRONT_BIT")
  , (CullModeFlagBits
CULL_MODE_BACK_BIT      , "BACK_BIT")
  , (CullModeFlagBits
CULL_MODE_FRONT_AND_BACK, "FRONT_AND_BACK")
  ]

instance Show CullModeFlagBits where
  showsPrec :: Int -> CullModeFlagBits -> ShowS
showsPrec = String
-> [(CullModeFlagBits, String)]
-> String
-> (CullModeFlagBits -> Flags)
-> (Flags -> ShowS)
-> Int
-> CullModeFlagBits
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixCullModeFlagBits
                            [(CullModeFlagBits, String)]
showTableCullModeFlagBits
                            String
conNameCullModeFlagBits
                            (\(CullModeFlagBits x :: Flags
x) -> Flags
x)
                            (\x :: Flags
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read CullModeFlagBits where
  readPrec :: ReadPrec CullModeFlagBits
readPrec = String
-> [(CullModeFlagBits, String)]
-> String
-> (Flags -> CullModeFlagBits)
-> ReadPrec CullModeFlagBits
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixCullModeFlagBits [(CullModeFlagBits, String)]
showTableCullModeFlagBits String
conNameCullModeFlagBits Flags -> CullModeFlagBits
CullModeFlagBits