{-# language CPP #-}
-- No documentation found for Chapter "LineRasterizationMode"
module Vulkan.Core14.Enums.LineRasterizationMode  (LineRasterizationMode( LINE_RASTERIZATION_MODE_DEFAULT
                                                                        , LINE_RASTERIZATION_MODE_RECTANGULAR
                                                                        , LINE_RASTERIZATION_MODE_BRESENHAM
                                                                        , LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH
                                                                        , ..
                                                                        )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkLineRasterizationMode - Line rasterization modes
--
-- = Description
--
-- -   'LINE_RASTERIZATION_MODE_DEFAULT' is equivalent to
--     'LINE_RASTERIZATION_MODE_RECTANGULAR' if
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@strictLines@
--     is 'Vulkan.Core10.FundamentalTypes.TRUE', otherwise lines are drawn
--     as non-@strictLines@ parallelograms. Both of these modes are defined
--     in
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-lines-basic Basic Line Segment Rasterization>.
--
-- -   'LINE_RASTERIZATION_MODE_RECTANGULAR' specifies lines drawn as if
--     they were rectangles extruded from the line
--
-- -   'LINE_RASTERIZATION_MODE_BRESENHAM' specifies lines drawn by
--     determining which pixel diamonds the line intersects and exits, as
--     defined in
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-lines-bresenham Bresenham Line Segment Rasterization>.
--
-- -   'LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH' specifies lines drawn
--     if they were rectangles extruded from the line, with alpha falloff,
--     as defined in
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-lines-smooth Smooth Lines>.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_line_rasterization VK_EXT_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_4 VK_VERSION_1_4>,
-- 'Vulkan.Core14.Promoted_From_VK_KHR_line_rasterizationRoadmap.PipelineRasterizationLineStateCreateInfo',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state3.cmdSetLineRasterizationModeEXT'
newtype LineRasterizationMode = LineRasterizationMode Int32
  deriving newtype (LineRasterizationMode -> LineRasterizationMode -> Bool
(LineRasterizationMode -> LineRasterizationMode -> Bool)
-> (LineRasterizationMode -> LineRasterizationMode -> Bool)
-> Eq LineRasterizationMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LineRasterizationMode -> LineRasterizationMode -> Bool
== :: LineRasterizationMode -> LineRasterizationMode -> Bool
$c/= :: LineRasterizationMode -> LineRasterizationMode -> Bool
/= :: LineRasterizationMode -> LineRasterizationMode -> Bool
Eq, Eq LineRasterizationMode
Eq LineRasterizationMode =>
(LineRasterizationMode -> LineRasterizationMode -> Ordering)
-> (LineRasterizationMode -> LineRasterizationMode -> Bool)
-> (LineRasterizationMode -> LineRasterizationMode -> Bool)
-> (LineRasterizationMode -> LineRasterizationMode -> Bool)
-> (LineRasterizationMode -> LineRasterizationMode -> Bool)
-> (LineRasterizationMode
    -> LineRasterizationMode -> LineRasterizationMode)
-> (LineRasterizationMode
    -> LineRasterizationMode -> LineRasterizationMode)
-> Ord LineRasterizationMode
LineRasterizationMode -> LineRasterizationMode -> Bool
LineRasterizationMode -> LineRasterizationMode -> Ordering
LineRasterizationMode
-> LineRasterizationMode -> LineRasterizationMode
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
$ccompare :: LineRasterizationMode -> LineRasterizationMode -> Ordering
compare :: LineRasterizationMode -> LineRasterizationMode -> Ordering
$c< :: LineRasterizationMode -> LineRasterizationMode -> Bool
< :: LineRasterizationMode -> LineRasterizationMode -> Bool
$c<= :: LineRasterizationMode -> LineRasterizationMode -> Bool
<= :: LineRasterizationMode -> LineRasterizationMode -> Bool
$c> :: LineRasterizationMode -> LineRasterizationMode -> Bool
> :: LineRasterizationMode -> LineRasterizationMode -> Bool
$c>= :: LineRasterizationMode -> LineRasterizationMode -> Bool
>= :: LineRasterizationMode -> LineRasterizationMode -> Bool
$cmax :: LineRasterizationMode
-> LineRasterizationMode -> LineRasterizationMode
max :: LineRasterizationMode
-> LineRasterizationMode -> LineRasterizationMode
$cmin :: LineRasterizationMode
-> LineRasterizationMode -> LineRasterizationMode
min :: LineRasterizationMode
-> LineRasterizationMode -> LineRasterizationMode
Ord, Ptr LineRasterizationMode -> IO LineRasterizationMode
Ptr LineRasterizationMode -> Int -> IO LineRasterizationMode
Ptr LineRasterizationMode -> Int -> LineRasterizationMode -> IO ()
Ptr LineRasterizationMode -> LineRasterizationMode -> IO ()
LineRasterizationMode -> Int
(LineRasterizationMode -> Int)
-> (LineRasterizationMode -> Int)
-> (Ptr LineRasterizationMode -> Int -> IO LineRasterizationMode)
-> (Ptr LineRasterizationMode
    -> Int -> LineRasterizationMode -> IO ())
-> (forall b. Ptr b -> Int -> IO LineRasterizationMode)
-> (forall b. Ptr b -> Int -> LineRasterizationMode -> IO ())
-> (Ptr LineRasterizationMode -> IO LineRasterizationMode)
-> (Ptr LineRasterizationMode -> LineRasterizationMode -> IO ())
-> Storable LineRasterizationMode
forall b. Ptr b -> Int -> IO LineRasterizationMode
forall b. Ptr b -> Int -> LineRasterizationMode -> 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
$csizeOf :: LineRasterizationMode -> Int
sizeOf :: LineRasterizationMode -> Int
$calignment :: LineRasterizationMode -> Int
alignment :: LineRasterizationMode -> Int
$cpeekElemOff :: Ptr LineRasterizationMode -> Int -> IO LineRasterizationMode
peekElemOff :: Ptr LineRasterizationMode -> Int -> IO LineRasterizationMode
$cpokeElemOff :: Ptr LineRasterizationMode -> Int -> LineRasterizationMode -> IO ()
pokeElemOff :: Ptr LineRasterizationMode -> Int -> LineRasterizationMode -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO LineRasterizationMode
peekByteOff :: forall b. Ptr b -> Int -> IO LineRasterizationMode
$cpokeByteOff :: forall b. Ptr b -> Int -> LineRasterizationMode -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> LineRasterizationMode -> IO ()
$cpeek :: Ptr LineRasterizationMode -> IO LineRasterizationMode
peek :: Ptr LineRasterizationMode -> IO LineRasterizationMode
$cpoke :: Ptr LineRasterizationMode -> LineRasterizationMode -> IO ()
poke :: Ptr LineRasterizationMode -> LineRasterizationMode -> IO ()
Storable, LineRasterizationMode
LineRasterizationMode -> Zero LineRasterizationMode
forall a. a -> Zero a
$czero :: LineRasterizationMode
zero :: LineRasterizationMode
Zero)

-- No documentation found for Nested "VkLineRasterizationMode" "VK_LINE_RASTERIZATION_MODE_DEFAULT"
pattern $mLINE_RASTERIZATION_MODE_DEFAULT :: forall {r}.
LineRasterizationMode -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_DEFAULT :: LineRasterizationMode
LINE_RASTERIZATION_MODE_DEFAULT = LineRasterizationMode 0

-- No documentation found for Nested "VkLineRasterizationMode" "VK_LINE_RASTERIZATION_MODE_RECTANGULAR"
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR :: forall {r}.
LineRasterizationMode -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR :: LineRasterizationMode
LINE_RASTERIZATION_MODE_RECTANGULAR = LineRasterizationMode 1

-- No documentation found for Nested "VkLineRasterizationMode" "VK_LINE_RASTERIZATION_MODE_BRESENHAM"
pattern $mLINE_RASTERIZATION_MODE_BRESENHAM :: forall {r}.
LineRasterizationMode -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_BRESENHAM :: LineRasterizationMode
LINE_RASTERIZATION_MODE_BRESENHAM = LineRasterizationMode 2

-- No documentation found for Nested "VkLineRasterizationMode" "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH"
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH :: forall {r}.
LineRasterizationMode -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH :: LineRasterizationMode
LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = LineRasterizationMode 3

{-# COMPLETE
  LINE_RASTERIZATION_MODE_DEFAULT
  , LINE_RASTERIZATION_MODE_RECTANGULAR
  , LINE_RASTERIZATION_MODE_BRESENHAM
  , LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH ::
    LineRasterizationMode
  #-}

conNameLineRasterizationMode :: String
conNameLineRasterizationMode :: String
conNameLineRasterizationMode = String
"LineRasterizationMode"

enumPrefixLineRasterizationMode :: String
enumPrefixLineRasterizationMode :: String
enumPrefixLineRasterizationMode = String
"LINE_RASTERIZATION_MODE_"

showTableLineRasterizationMode :: [(LineRasterizationMode, String)]
showTableLineRasterizationMode :: [(LineRasterizationMode, String)]
showTableLineRasterizationMode =
  [ (LineRasterizationMode
LINE_RASTERIZATION_MODE_DEFAULT, String
"DEFAULT")
  ,
    ( LineRasterizationMode
LINE_RASTERIZATION_MODE_RECTANGULAR
    , String
"RECTANGULAR"
    )
  ,
    ( LineRasterizationMode
LINE_RASTERIZATION_MODE_BRESENHAM
    , String
"BRESENHAM"
    )
  ,
    ( LineRasterizationMode
LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH
    , String
"RECTANGULAR_SMOOTH"
    )
  ]

instance Show LineRasterizationMode where
  showsPrec :: Int -> LineRasterizationMode -> ShowS
showsPrec =
    String
-> [(LineRasterizationMode, String)]
-> String
-> (LineRasterizationMode -> Int32)
-> (Int32 -> ShowS)
-> Int
-> LineRasterizationMode
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixLineRasterizationMode
      [(LineRasterizationMode, String)]
showTableLineRasterizationMode
      String
conNameLineRasterizationMode
      (\(LineRasterizationMode Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read LineRasterizationMode where
  readPrec :: ReadPrec LineRasterizationMode
readPrec =
    String
-> [(LineRasterizationMode, String)]
-> String
-> (Int32 -> LineRasterizationMode)
-> ReadPrec LineRasterizationMode
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixLineRasterizationMode
      [(LineRasterizationMode, String)]
showTableLineRasterizationMode
      String
conNameLineRasterizationMode
      Int32 -> LineRasterizationMode
LineRasterizationMode