{-# language CPP #-}
module Graphics.Vulkan.Core11.Enums.TessellationDomainOrigin (TessellationDomainOrigin( TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT
, TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT
, ..
)) 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 Graphics.Vulkan.Zero (Zero)
newtype TessellationDomainOrigin = TessellationDomainOrigin Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = TessellationDomainOrigin 0
pattern TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = TessellationDomainOrigin 1
{-# complete TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT :: TessellationDomainOrigin #-}
instance Show TessellationDomainOrigin where
showsPrec p = \case
TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT -> showString "TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT"
TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT -> showString "TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT"
TessellationDomainOrigin x -> showParen (p >= 11) (showString "TessellationDomainOrigin " . showsPrec 11 x)
instance Read TessellationDomainOrigin where
readPrec = parens (choose [("TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT", pure TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT)
, ("TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT", pure TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT)]
+++
prec 10 (do
expectP (Ident "TessellationDomainOrigin")
v <- step readPrec
pure (TessellationDomainOrigin v)))