{-# OPTIONS_GHC -Wno-unused-imports #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} -- This file was generated by wgpu-raw-hs-codegen on: -- 2021-08-15T08:56:06.968390 -- Using wgpu-native git hash: -- b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2) module WGPU.Raw.Generated.Struct.WGPUTextureDescriptor where #include "wgpu.h" 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.WGPUTextureDimension import WGPU.Raw.Generated.Enum.WGPUTextureFormat import WGPU.Raw.Generated.Struct.WGPUChainedStruct import WGPU.Raw.Generated.Struct.WGPUExtent3D data WGPUTextureDescriptor = WGPUTextureDescriptor { nextInChain :: Ptr (WGPUChainedStruct), label :: Ptr (CChar), usage :: WGPUTextureUsageFlags, dimension :: WGPUTextureDimension, size :: WGPUExtent3D, format :: WGPUTextureFormat, mipLevelCount :: Word32, sampleCount :: Word32 } instance Storable WGPUTextureDescriptor where sizeOf _ = (#size WGPUTextureDescriptor) alignment = sizeOf peek ptr = do nextInChain <- (#peek WGPUTextureDescriptor, nextInChain) ptr label <- (#peek WGPUTextureDescriptor, label) ptr usage <- (#peek WGPUTextureDescriptor, usage) ptr dimension <- (#peek WGPUTextureDescriptor, dimension) ptr size <- (#peek WGPUTextureDescriptor, size) ptr format <- (#peek WGPUTextureDescriptor, format) ptr mipLevelCount <- (#peek WGPUTextureDescriptor, mipLevelCount) ptr sampleCount <- (#peek WGPUTextureDescriptor, sampleCount) ptr pure $! WGPUTextureDescriptor{..} poke ptr WGPUTextureDescriptor{..} = do (#poke WGPUTextureDescriptor, nextInChain) ptr nextInChain (#poke WGPUTextureDescriptor, label) ptr label (#poke WGPUTextureDescriptor, usage) ptr usage (#poke WGPUTextureDescriptor, dimension) ptr dimension (#poke WGPUTextureDescriptor, size) ptr size (#poke WGPUTextureDescriptor, format) ptr format (#poke WGPUTextureDescriptor, mipLevelCount) ptr mipLevelCount (#poke WGPUTextureDescriptor, sampleCount) ptr sampleCount