{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- This file was generated by wgpu-raw-hs-codegen on:
--   2021-08-25T10:02:03.522705
-- Using wgpu-native git hash:
--   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)

module WGPU.Raw.Generated.Struct.WGPUOrigin3D where



import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))


data WGPUOrigin3D = WGPUOrigin3D {
  WGPUOrigin3D -> Word32
x :: Word32,
  WGPUOrigin3D -> Word32
y :: Word32,
  WGPUOrigin3D -> Word32
z :: Word32
}

instance Storable WGPUOrigin3D where
  sizeOf :: WGPUOrigin3D -> Int
sizeOf WGPUOrigin3D
_ = ((Int
12))
{-# LINE 30 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUOrigin3D -> Int
alignment = WGPUOrigin3D -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUOrigin3D -> IO WGPUOrigin3D
peek Ptr WGPUOrigin3D
ptr = do
    Word32
x <- ((\Ptr WGPUOrigin3D
hsc_ptr -> Ptr WGPUOrigin3D -> Int -> IO Word32
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUOrigin3D
hsc_ptr Int
0)) Ptr WGPUOrigin3D
ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
    y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
    z <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
    pure $! WGPUOrigin3D{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUOrigin3D -> WGPUOrigin3D -> IO ()
poke Ptr WGPUOrigin3D
ptr WGPUOrigin3D{Word32
z :: Word32
y :: Word32
x :: Word32
z :: WGPUOrigin3D -> Word32
y :: WGPUOrigin3D -> Word32
x :: WGPUOrigin3D -> Word32
..} = do
    ((\Ptr WGPUOrigin3D
hsc_ptr -> Ptr WGPUOrigin3D -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUOrigin3D
hsc_ptr Int
0)) Ptr WGPUOrigin3D
ptr Word32
x
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr z
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc" #-}
  {-# INLINABLE poke #-}