{-# 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" #-}
{-# INLINABLE sizeOf #-}
alignment :: WGPUPrimitiveDepthClampingState -> Int
alignment = WGPUPrimitiveDepthClampingState -> Int
forall a. Storable a => a -> Int
sizeOf
{-# INLINABLE alignment #-}
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 34 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
clampDepth <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
pure $! WGPUPrimitiveDepthClampingState{..}
{-# INLINABLE peek #-}
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 39 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr clampDepth
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc" #-}
{-# INLINABLE poke #-}