{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUPrimitiveDepthClampingState 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.Struct.WGPUChainedStruct
data WGPUPrimitiveDepthClampingState = WGPUPrimitiveDepthClampingState {
WGPUPrimitiveDepthClampingState -> WGPUChainedStruct
chain :: WGPUChainedStruct,
WGPUPrimitiveDepthClampingState -> CBool
clampDepth :: CBool
}
instance Storable WGPUPrimitiveDepthClampingState where
sizeOf :: WGPUPrimitiveDepthClampingState -> Int
sizeOf WGPUPrimitiveDepthClampingState
_ = ((Int
24))
{-# LINE 29 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUPrimitiveDepthClampingState
-> IO WGPUPrimitiveDepthClampingState
peek Ptr WGPUPrimitiveDepthClampingState
ptr = do
WGPUChainedStruct
chain <- ((\Ptr WGPUPrimitiveDepthClampingState
hsc_ptr -> Ptr WGPUPrimitiveDepthClampingState -> Int -> IO WGPUChainedStruct
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUPrimitiveDepthClampingState
hsc_ptr Int
0)) Ptr WGPUPrimitiveDepthClampingState
ptr
{-# LINE 32 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
clampDepth <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
pure $! WGPUPrimitiveDepthClampingState{..}
poke :: Ptr WGPUPrimitiveDepthClampingState
-> WGPUPrimitiveDepthClampingState -> IO ()
poke Ptr WGPUPrimitiveDepthClampingState
ptr WGPUPrimitiveDepthClampingState{CBool
WGPUChainedStruct
clampDepth :: CBool
chain :: WGPUChainedStruct
clampDepth :: WGPUPrimitiveDepthClampingState -> CBool
chain :: WGPUPrimitiveDepthClampingState -> WGPUChainedStruct
..} = do
((\Ptr WGPUPrimitiveDepthClampingState
hsc_ptr -> Ptr WGPUPrimitiveDepthClampingState
-> Int -> WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUPrimitiveDepthClampingState
hsc_ptr Int
0)) Ptr WGPUPrimitiveDepthClampingState
ptr WGPUChainedStruct
chain
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr clampDepth