{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUColorTargetState 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.Struct.WGPUChainedStruct
import WGPU.Raw.Generated.Struct.WGPUBlendState
data WGPUColorTargetState = WGPUColorTargetState {
WGPUColorTargetState -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUColorTargetState -> WGPUTextureFormat
format :: WGPUTextureFormat,
WGPUColorTargetState -> Ptr WGPUBlendState
blend :: Ptr (WGPUBlendState),
WGPUColorTargetState -> WGPUColorWriteMaskFlags
writeMask :: WGPUColorWriteMaskFlags
}
instance Storable WGPUColorTargetState where
sizeOf :: WGPUColorTargetState -> Int
sizeOf WGPUColorTargetState
_ = ((Int
32))
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUColorTargetState -> IO WGPUColorTargetState
peek Ptr WGPUColorTargetState
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUColorTargetState
hsc_ptr -> Ptr WGPUColorTargetState -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUColorTargetState
hsc_ptr Int
0)) Ptr WGPUColorTargetState
ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
blend <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
writeMask <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
pure $! WGPUColorTargetState{..}
poke :: Ptr WGPUColorTargetState -> WGPUColorTargetState -> IO ()
poke Ptr WGPUColorTargetState
ptr WGPUColorTargetState{WGPUColorWriteMaskFlags
Ptr WGPUChainedStruct
Ptr WGPUBlendState
WGPUTextureFormat
writeMask :: WGPUColorWriteMaskFlags
blend :: Ptr WGPUBlendState
format :: WGPUTextureFormat
nextInChain :: Ptr WGPUChainedStruct
writeMask :: WGPUColorTargetState -> WGPUColorWriteMaskFlags
blend :: WGPUColorTargetState -> Ptr WGPUBlendState
format :: WGPUColorTargetState -> WGPUTextureFormat
nextInChain :: WGPUColorTargetState -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUColorTargetState
hsc_ptr -> Ptr WGPUColorTargetState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUColorTargetState
hsc_ptr Int
0)) Ptr WGPUColorTargetState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr format
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr blend
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr writeMask