{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPURenderPassColorAttachment 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.WGPULoadOp
import WGPU.Raw.Generated.Enum.WGPUStoreOp
import WGPU.Raw.Generated.Struct.WGPUColor
data WGPURenderPassColorAttachment = WGPURenderPassColorAttachment {
WGPURenderPassColorAttachment -> WGPUTextureView
view :: WGPUTextureView,
WGPURenderPassColorAttachment -> WGPUTextureView
resolveTarget :: WGPUTextureView,
WGPURenderPassColorAttachment -> WGPULoadOp
loadOp :: WGPULoadOp,
WGPURenderPassColorAttachment -> WGPUStoreOp
storeOp :: WGPUStoreOp,
WGPURenderPassColorAttachment -> WGPUColor
clearColor :: WGPUColor
}
instance Storable WGPURenderPassColorAttachment where
sizeOf :: WGPURenderPassColorAttachment -> Int
sizeOf WGPURenderPassColorAttachment
_ = ((Int
56))
{-# LINE 34 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPURenderPassColorAttachment
-> IO WGPURenderPassColorAttachment
peek Ptr WGPURenderPassColorAttachment
ptr = do
WGPUTextureView
view <- ((\Ptr WGPURenderPassColorAttachment
hsc_ptr -> Ptr WGPURenderPassColorAttachment -> Int -> IO WGPUTextureView
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPURenderPassColorAttachment
hsc_ptr Int
0)) Ptr WGPURenderPassColorAttachment
ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
resolveTarget <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
loadOp <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
storeOp <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
clearColor <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
pure $! WGPURenderPassColorAttachment{..}
poke :: Ptr WGPURenderPassColorAttachment
-> WGPURenderPassColorAttachment -> IO ()
poke Ptr WGPURenderPassColorAttachment
ptr WGPURenderPassColorAttachment{WGPULoadOp
WGPUStoreOp
WGPUTextureView
WGPUColor
clearColor :: WGPUColor
storeOp :: WGPUStoreOp
loadOp :: WGPULoadOp
resolveTarget :: WGPUTextureView
view :: WGPUTextureView
clearColor :: WGPURenderPassColorAttachment -> WGPUColor
storeOp :: WGPURenderPassColorAttachment -> WGPUStoreOp
loadOp :: WGPURenderPassColorAttachment -> WGPULoadOp
resolveTarget :: WGPURenderPassColorAttachment -> WGPUTextureView
view :: WGPURenderPassColorAttachment -> WGPUTextureView
..} = do
((\Ptr WGPURenderPassColorAttachment
hsc_ptr -> Ptr WGPURenderPassColorAttachment
-> Int -> WGPUTextureView -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURenderPassColorAttachment
hsc_ptr Int
0)) Ptr WGPURenderPassColorAttachment
ptr WGPUTextureView
view
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr resolveTarget
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr loadOp
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr storeOp
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr clearColor