{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUBindGroupDescriptor 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
import WGPU.Raw.Generated.Struct.WGPUBindGroupEntry
data WGPUBindGroupDescriptor = WGPUBindGroupDescriptor {
WGPUBindGroupDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUBindGroupDescriptor -> Ptr CChar
label :: Ptr (CChar),
WGPUBindGroupDescriptor -> WGPUBindGroupLayout
layout :: WGPUBindGroupLayout,
WGPUBindGroupDescriptor -> Word32
entryCount :: Word32,
WGPUBindGroupDescriptor -> Ptr WGPUBindGroupEntry
entries :: Ptr (WGPUBindGroupEntry)
}
instance Storable WGPUBindGroupDescriptor where
sizeOf :: WGPUBindGroupDescriptor -> Int
sizeOf WGPUBindGroupDescriptor
_ = ((Int
40))
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUBindGroupDescriptor -> IO WGPUBindGroupDescriptor
peek Ptr WGPUBindGroupDescriptor
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUBindGroupDescriptor
hsc_ptr -> Ptr WGPUBindGroupDescriptor -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUBindGroupDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupDescriptor
ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
layout <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
entryCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
entries <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
pure $! WGPUBindGroupDescriptor{..}
poke :: Ptr WGPUBindGroupDescriptor -> WGPUBindGroupDescriptor -> IO ()
poke Ptr WGPUBindGroupDescriptor
ptr WGPUBindGroupDescriptor{Word32
Ptr CChar
Ptr WGPUChainedStruct
Ptr WGPUBindGroupEntry
WGPUBindGroupLayout
entries :: Ptr WGPUBindGroupEntry
entryCount :: Word32
layout :: WGPUBindGroupLayout
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
entries :: WGPUBindGroupDescriptor -> Ptr WGPUBindGroupEntry
entryCount :: WGPUBindGroupDescriptor -> Word32
layout :: WGPUBindGroupDescriptor -> WGPUBindGroupLayout
label :: WGPUBindGroupDescriptor -> Ptr CChar
nextInChain :: WGPUBindGroupDescriptor -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUBindGroupDescriptor
hsc_ptr -> Ptr WGPUBindGroupDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr layout
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr entryCount
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr entries