{-# language CPP #-}
-- No documentation found for Chapter "SamplerMipmapMode"
module Vulkan.Core10.Enums.SamplerMipmapMode  (SamplerMipmapMode( SAMPLER_MIPMAP_MODE_NEAREST
                                                                , SAMPLER_MIPMAP_MODE_LINEAR
                                                                , ..
                                                                )) 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))

-- | VkSamplerMipmapMode - Specify mipmap mode used for texture lookups
--
-- = Description
--
-- These modes are described in detail in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-texel-filtering Texel Filtering>.
--
-- = See Also
--
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo'
newtype SamplerMipmapMode = SamplerMipmapMode Int32
  deriving newtype (SamplerMipmapMode -> SamplerMipmapMode -> Bool
(SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> (SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> Eq SamplerMipmapMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c/= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
== :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c== :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
Eq, Eq SamplerMipmapMode
Eq SamplerMipmapMode =>
(SamplerMipmapMode -> SamplerMipmapMode -> Ordering)
-> (SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> (SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> (SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> (SamplerMipmapMode -> SamplerMipmapMode -> Bool)
-> (SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode)
-> (SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode)
-> Ord SamplerMipmapMode
SamplerMipmapMode -> SamplerMipmapMode -> Bool
SamplerMipmapMode -> SamplerMipmapMode -> Ordering
SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode
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 :: SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode
$cmin :: SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode
max :: SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode
$cmax :: SamplerMipmapMode -> SamplerMipmapMode -> SamplerMipmapMode
>= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c>= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
> :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c> :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
<= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c<= :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
< :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
$c< :: SamplerMipmapMode -> SamplerMipmapMode -> Bool
compare :: SamplerMipmapMode -> SamplerMipmapMode -> Ordering
$ccompare :: SamplerMipmapMode -> SamplerMipmapMode -> Ordering
$cp1Ord :: Eq SamplerMipmapMode
Ord, Ptr b -> Int -> IO SamplerMipmapMode
Ptr b -> Int -> SamplerMipmapMode -> IO ()
Ptr SamplerMipmapMode -> IO SamplerMipmapMode
Ptr SamplerMipmapMode -> Int -> IO SamplerMipmapMode
Ptr SamplerMipmapMode -> Int -> SamplerMipmapMode -> IO ()
Ptr SamplerMipmapMode -> SamplerMipmapMode -> IO ()
SamplerMipmapMode -> Int
(SamplerMipmapMode -> Int)
-> (SamplerMipmapMode -> Int)
-> (Ptr SamplerMipmapMode -> Int -> IO SamplerMipmapMode)
-> (Ptr SamplerMipmapMode -> Int -> SamplerMipmapMode -> IO ())
-> (forall b. Ptr b -> Int -> IO SamplerMipmapMode)
-> (forall b. Ptr b -> Int -> SamplerMipmapMode -> IO ())
-> (Ptr SamplerMipmapMode -> IO SamplerMipmapMode)
-> (Ptr SamplerMipmapMode -> SamplerMipmapMode -> IO ())
-> Storable SamplerMipmapMode
forall b. Ptr b -> Int -> IO SamplerMipmapMode
forall b. Ptr b -> Int -> SamplerMipmapMode -> 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 SamplerMipmapMode -> SamplerMipmapMode -> IO ()
$cpoke :: Ptr SamplerMipmapMode -> SamplerMipmapMode -> IO ()
peek :: Ptr SamplerMipmapMode -> IO SamplerMipmapMode
$cpeek :: Ptr SamplerMipmapMode -> IO SamplerMipmapMode
pokeByteOff :: Ptr b -> Int -> SamplerMipmapMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerMipmapMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO SamplerMipmapMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerMipmapMode
pokeElemOff :: Ptr SamplerMipmapMode -> Int -> SamplerMipmapMode -> IO ()
$cpokeElemOff :: Ptr SamplerMipmapMode -> Int -> SamplerMipmapMode -> IO ()
peekElemOff :: Ptr SamplerMipmapMode -> Int -> IO SamplerMipmapMode
$cpeekElemOff :: Ptr SamplerMipmapMode -> Int -> IO SamplerMipmapMode
alignment :: SamplerMipmapMode -> Int
$calignment :: SamplerMipmapMode -> Int
sizeOf :: SamplerMipmapMode -> Int
$csizeOf :: SamplerMipmapMode -> Int
Storable, SamplerMipmapMode
SamplerMipmapMode -> Zero SamplerMipmapMode
forall a. a -> Zero a
zero :: SamplerMipmapMode
$czero :: SamplerMipmapMode
Zero)

-- | 'SAMPLER_MIPMAP_MODE_NEAREST' specifies nearest filtering.
pattern $bSAMPLER_MIPMAP_MODE_NEAREST :: SamplerMipmapMode
$mSAMPLER_MIPMAP_MODE_NEAREST :: forall r. SamplerMipmapMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_MIPMAP_MODE_NEAREST = SamplerMipmapMode 0
-- | 'SAMPLER_MIPMAP_MODE_LINEAR' specifies linear filtering.
pattern $bSAMPLER_MIPMAP_MODE_LINEAR :: SamplerMipmapMode
$mSAMPLER_MIPMAP_MODE_LINEAR :: forall r. SamplerMipmapMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_MIPMAP_MODE_LINEAR  = SamplerMipmapMode 1
{-# complete SAMPLER_MIPMAP_MODE_NEAREST,
             SAMPLER_MIPMAP_MODE_LINEAR :: SamplerMipmapMode #-}

conNameSamplerMipmapMode :: String
conNameSamplerMipmapMode :: String
conNameSamplerMipmapMode = "SamplerMipmapMode"

enumPrefixSamplerMipmapMode :: String
enumPrefixSamplerMipmapMode :: String
enumPrefixSamplerMipmapMode = "SAMPLER_MIPMAP_MODE_"

showTableSamplerMipmapMode :: [(SamplerMipmapMode, String)]
showTableSamplerMipmapMode :: [(SamplerMipmapMode, String)]
showTableSamplerMipmapMode = [(SamplerMipmapMode
SAMPLER_MIPMAP_MODE_NEAREST, "NEAREST"), (SamplerMipmapMode
SAMPLER_MIPMAP_MODE_LINEAR, "LINEAR")]

instance Show SamplerMipmapMode where
  showsPrec :: Int -> SamplerMipmapMode -> ShowS
showsPrec = String
-> [(SamplerMipmapMode, String)]
-> String
-> (SamplerMipmapMode -> Int32)
-> (Int32 -> ShowS)
-> Int
-> SamplerMipmapMode
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSamplerMipmapMode
                            [(SamplerMipmapMode, String)]
showTableSamplerMipmapMode
                            String
conNameSamplerMipmapMode
                            (\(SamplerMipmapMode x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read SamplerMipmapMode where
  readPrec :: ReadPrec SamplerMipmapMode
readPrec =
    String
-> [(SamplerMipmapMode, String)]
-> String
-> (Int32 -> SamplerMipmapMode)
-> ReadPrec SamplerMipmapMode
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSamplerMipmapMode [(SamplerMipmapMode, String)]
showTableSamplerMipmapMode String
conNameSamplerMipmapMode Int32 -> SamplerMipmapMode
SamplerMipmapMode