{-# language CPP #-}
-- No documentation found for Chapter "IndexType"
module Vulkan.Core10.Enums.IndexType  (IndexType( INDEX_TYPE_UINT16
                                                , INDEX_TYPE_UINT32
                                                , INDEX_TYPE_UINT8_EXT
                                                , INDEX_TYPE_NONE_KHR
                                                , ..
                                                )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Zero (Zero)
-- | VkIndexType - Type of index buffer indices
--
-- = See Also
--
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureGeometryTrianglesDataKHR',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.BindIndexBufferIndirectCommandNV',
-- 'Vulkan.Extensions.VK_NV_ray_tracing.GeometryTrianglesNV',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.IndirectCommandsLayoutTokenNV',
-- 'Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer'
newtype IndexType = IndexType Int32
  deriving newtype (IndexType -> IndexType -> Bool
(IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> Bool) -> Eq IndexType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexType -> IndexType -> Bool
$c/= :: IndexType -> IndexType -> Bool
== :: IndexType -> IndexType -> Bool
$c== :: IndexType -> IndexType -> Bool
Eq, Eq IndexType
Eq IndexType =>
(IndexType -> IndexType -> Ordering)
-> (IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> IndexType)
-> (IndexType -> IndexType -> IndexType)
-> Ord IndexType
IndexType -> IndexType -> Bool
IndexType -> IndexType -> Ordering
IndexType -> IndexType -> IndexType
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 :: IndexType -> IndexType -> IndexType
$cmin :: IndexType -> IndexType -> IndexType
max :: IndexType -> IndexType -> IndexType
$cmax :: IndexType -> IndexType -> IndexType
>= :: IndexType -> IndexType -> Bool
$c>= :: IndexType -> IndexType -> Bool
> :: IndexType -> IndexType -> Bool
$c> :: IndexType -> IndexType -> Bool
<= :: IndexType -> IndexType -> Bool
$c<= :: IndexType -> IndexType -> Bool
< :: IndexType -> IndexType -> Bool
$c< :: IndexType -> IndexType -> Bool
compare :: IndexType -> IndexType -> Ordering
$ccompare :: IndexType -> IndexType -> Ordering
$cp1Ord :: Eq IndexType
Ord, Ptr b -> Int -> IO IndexType
Ptr b -> Int -> IndexType -> IO ()
Ptr IndexType -> IO IndexType
Ptr IndexType -> Int -> IO IndexType
Ptr IndexType -> Int -> IndexType -> IO ()
Ptr IndexType -> IndexType -> IO ()
IndexType -> Int
(IndexType -> Int)
-> (IndexType -> Int)
-> (Ptr IndexType -> Int -> IO IndexType)
-> (Ptr IndexType -> Int -> IndexType -> IO ())
-> (forall b. Ptr b -> Int -> IO IndexType)
-> (forall b. Ptr b -> Int -> IndexType -> IO ())
-> (Ptr IndexType -> IO IndexType)
-> (Ptr IndexType -> IndexType -> IO ())
-> Storable IndexType
forall b. Ptr b -> Int -> IO IndexType
forall b. Ptr b -> Int -> IndexType -> 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 IndexType -> IndexType -> IO ()
$cpoke :: Ptr IndexType -> IndexType -> IO ()
peek :: Ptr IndexType -> IO IndexType
$cpeek :: Ptr IndexType -> IO IndexType
pokeByteOff :: Ptr b -> Int -> IndexType -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> IndexType -> IO ()
peekByteOff :: Ptr b -> Int -> IO IndexType
$cpeekByteOff :: forall b. Ptr b -> Int -> IO IndexType
pokeElemOff :: Ptr IndexType -> Int -> IndexType -> IO ()
$cpokeElemOff :: Ptr IndexType -> Int -> IndexType -> IO ()
peekElemOff :: Ptr IndexType -> Int -> IO IndexType
$cpeekElemOff :: Ptr IndexType -> Int -> IO IndexType
alignment :: IndexType -> Int
$calignment :: IndexType -> Int
sizeOf :: IndexType -> Int
$csizeOf :: IndexType -> Int
Storable, IndexType
IndexType -> Zero IndexType
forall a. a -> Zero a
zero :: IndexType
$czero :: IndexType
Zero)

-- | 'INDEX_TYPE_UINT16' specifies that indices are 16-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT16 :: IndexType
$mINDEX_TYPE_UINT16 :: forall r. IndexType -> (Void# -> r) -> (Void# -> r) -> r
INDEX_TYPE_UINT16    = IndexType 0
-- | 'INDEX_TYPE_UINT32' specifies that indices are 32-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT32 :: IndexType
$mINDEX_TYPE_UINT32 :: forall r. IndexType -> (Void# -> r) -> (Void# -> r) -> r
INDEX_TYPE_UINT32    = IndexType 1
-- | 'INDEX_TYPE_UINT8_EXT' specifies that indices are 8-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT8_EXT :: IndexType
$mINDEX_TYPE_UINT8_EXT :: forall r. IndexType -> (Void# -> r) -> (Void# -> r) -> r
INDEX_TYPE_UINT8_EXT = IndexType 1000265000
-- | 'INDEX_TYPE_NONE_KHR' specifies that no indices are provided.
pattern $bINDEX_TYPE_NONE_KHR :: IndexType
$mINDEX_TYPE_NONE_KHR :: forall r. IndexType -> (Void# -> r) -> (Void# -> r) -> r
INDEX_TYPE_NONE_KHR  = IndexType 1000165000
{-# complete INDEX_TYPE_UINT16,
             INDEX_TYPE_UINT32,
             INDEX_TYPE_UINT8_EXT,
             INDEX_TYPE_NONE_KHR :: IndexType #-}

conNameIndexType :: String
conNameIndexType :: String
conNameIndexType = "IndexType"

enumPrefixIndexType :: String
enumPrefixIndexType :: String
enumPrefixIndexType = "INDEX_TYPE_"

showTableIndexType :: [(IndexType, String)]
showTableIndexType :: [(IndexType, String)]
showTableIndexType =
  [ (IndexType
INDEX_TYPE_UINT16   , "UINT16")
  , (IndexType
INDEX_TYPE_UINT32   , "UINT32")
  , (IndexType
INDEX_TYPE_UINT8_EXT, "UINT8_EXT")
  , (IndexType
INDEX_TYPE_NONE_KHR , "NONE_KHR")
  ]

instance Show IndexType where
  showsPrec :: Int -> IndexType -> ShowS
showsPrec =
    String
-> [(IndexType, String)]
-> String
-> (IndexType -> Int32)
-> (Int32 -> ShowS)
-> Int
-> IndexType
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixIndexType [(IndexType, String)]
showTableIndexType String
conNameIndexType (\(IndexType x :: Int32
x) -> Int32
x) (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read IndexType where
  readPrec :: ReadPrec IndexType
readPrec = String
-> [(IndexType, String)]
-> String
-> (Int32 -> IndexType)
-> ReadPrec IndexType
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixIndexType [(IndexType, String)]
showTableIndexType String
conNameIndexType Int32 -> IndexType
IndexType