{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- This file was generated by wgpu-raw-hs-codegen on:
--   2021-08-25T10:02:03.522705
-- Using wgpu-native git hash:
--   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)

module WGPU.Raw.Generated.Struct.WGPUDepthStencilState where



import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))
import WGPU.Raw.Generated.Enum.WGPUTextureFormat
import WGPU.Raw.Generated.Enum.WGPUCompareFunction
import WGPU.Raw.Generated.Struct.WGPUChainedStruct
import WGPU.Raw.Generated.Struct.WGPUStencilFaceState
import WGPU.Raw.Generated.Struct.WGPUStencilFaceState

data WGPUDepthStencilState = WGPUDepthStencilState {
  WGPUDepthStencilState -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPUDepthStencilState -> WGPUTextureFormat
format :: WGPUTextureFormat,
  WGPUDepthStencilState -> CBool
depthWriteEnabled :: CBool,
  WGPUDepthStencilState -> WGPUCompareFunction
depthCompare :: WGPUCompareFunction,
  WGPUDepthStencilState -> WGPUStencilFaceState
stencilFront :: WGPUStencilFaceState,
  WGPUDepthStencilState -> WGPUStencilFaceState
stencilBack :: WGPUStencilFaceState,
  WGPUDepthStencilState -> Word32
stencilReadMask :: Word32,
  WGPUDepthStencilState -> Word32
stencilWriteMask :: Word32,
  WGPUDepthStencilState -> Int32
depthBias :: Int32,
  WGPUDepthStencilState -> CFloat
depthBiasSlopeScale :: CFloat,
  WGPUDepthStencilState -> CFloat
depthBiasClamp :: CFloat
}

instance Storable WGPUDepthStencilState where
  sizeOf :: WGPUDepthStencilState -> Int
sizeOf WGPUDepthStencilState
_ = ((Int
72))
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUDepthStencilState -> Int
alignment = WGPUDepthStencilState -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUDepthStencilState -> IO WGPUDepthStencilState
peek Ptr WGPUDepthStencilState
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUDepthStencilState
hsc_ptr -> Ptr WGPUDepthStencilState -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUDepthStencilState
hsc_ptr Int
0)) Ptr WGPUDepthStencilState
ptr
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    format <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 48 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    depthWriteEnabled <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 49 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    depthCompare <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 50 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    stencilFront <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 51 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    stencilBack <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 52 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    stencilReadMask <- ((\hsc_ptr -> peekByteOff hsc_ptr 52)) ptr
{-# LINE 53 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    stencilWriteMask <- ((\hsc_ptr -> peekByteOff hsc_ptr 56)) ptr
{-# LINE 54 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    depthBias <- ((\hsc_ptr -> peekByteOff hsc_ptr 60)) ptr
{-# LINE 55 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    depthBiasSlopeScale <- ((\hsc_ptr -> peekByteOff hsc_ptr 64)) ptr
{-# LINE 56 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    depthBiasClamp <- ((\hsc_ptr -> peekByteOff hsc_ptr 68)) ptr
{-# LINE 57 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    pure $! WGPUDepthStencilState{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUDepthStencilState -> WGPUDepthStencilState -> IO ()
poke Ptr WGPUDepthStencilState
ptr WGPUDepthStencilState{Int32
Word32
Ptr WGPUChainedStruct
CBool
CFloat
WGPUCompareFunction
WGPUTextureFormat
WGPUStencilFaceState
depthBiasClamp :: CFloat
depthBiasSlopeScale :: CFloat
depthBias :: Int32
stencilWriteMask :: Word32
stencilReadMask :: Word32
stencilBack :: WGPUStencilFaceState
stencilFront :: WGPUStencilFaceState
depthCompare :: WGPUCompareFunction
depthWriteEnabled :: CBool
format :: WGPUTextureFormat
nextInChain :: Ptr WGPUChainedStruct
depthBiasClamp :: WGPUDepthStencilState -> CFloat
depthBiasSlopeScale :: WGPUDepthStencilState -> CFloat
depthBias :: WGPUDepthStencilState -> Int32
stencilWriteMask :: WGPUDepthStencilState -> Word32
stencilReadMask :: WGPUDepthStencilState -> Word32
stencilBack :: WGPUDepthStencilState -> WGPUStencilFaceState
stencilFront :: WGPUDepthStencilState -> WGPUStencilFaceState
depthCompare :: WGPUDepthStencilState -> WGPUCompareFunction
depthWriteEnabled :: WGPUDepthStencilState -> CBool
format :: WGPUDepthStencilState -> WGPUTextureFormat
nextInChain :: WGPUDepthStencilState -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPUDepthStencilState
hsc_ptr -> Ptr WGPUDepthStencilState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUDepthStencilState
hsc_ptr Int
0)) Ptr WGPUDepthStencilState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 61 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr format
{-# LINE 62 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr depthWriteEnabled
{-# LINE 63 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr depthCompare
{-# LINE 64 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr stencilFront
{-# LINE 65 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr stencilBack
{-# LINE 66 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 52)) ptr stencilReadMask
{-# LINE 67 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 56)) ptr stencilWriteMask
{-# LINE 68 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 60)) ptr depthBias
{-# LINE 69 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 64)) ptr depthBiasSlopeScale
{-# LINE 70 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 68)) ptr depthBiasClamp
{-# LINE 71 "src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc" #-}
  {-# INLINABLE poke #-}