{-# 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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
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
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'CullModeFlags'
newtype CullModeFlagBits = CullModeFlagBits Flags
  deriving newtype (CullModeFlagBits -> CullModeFlagBits -> Bool
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
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
Ord, Ptr CullModeFlagBits -> IO CullModeFlagBits
Ptr CullModeFlagBits -> Int -> IO CullModeFlagBits
Ptr CullModeFlagBits -> Int -> CullModeFlagBits -> IO ()
Ptr CullModeFlagBits -> CullModeFlagBits -> IO ()
CullModeFlagBits -> Int
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 :: forall b. Ptr b -> Int -> CullModeFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CullModeFlagBits -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: CullModeFlagBits
$czero :: CullModeFlagBits
Zero, Eq CullModeFlagBits
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
Bits, Bits 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
FiniteBits)

-- | 'CULL_MODE_NONE' specifies that no triangles are discarded
pattern $bCULL_MODE_NONE :: CullModeFlagBits
$mCULL_MODE_NONE :: forall {r}. CullModeFlagBits -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> r) -> r
CULL_MODE_FRONT_AND_BACK = CullModeFlagBits 0x00000003

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

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

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

instance Show CullModeFlagBits where
  showsPrec :: Int -> CullModeFlagBits -> ShowS
showsPrec =
    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 Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

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