wgpu-raw-hs-0.1.0.0: src/WGPU/Raw/Generated/Struct/WGPUPrimitiveState.hsc
{-# 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.WGPUPrimitiveState 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.WGPUPrimitiveTopology
import WGPU.Raw.Generated.Enum.WGPUIndexFormat
import WGPU.Raw.Generated.Enum.WGPUFrontFace
import WGPU.Raw.Generated.Enum.WGPUCullMode
import WGPU.Raw.Generated.Struct.WGPUChainedStruct
data WGPUPrimitiveState = WGPUPrimitiveState {
nextInChain :: Ptr (WGPUChainedStruct),
topology :: WGPUPrimitiveTopology,
stripIndexFormat :: WGPUIndexFormat,
frontFace :: WGPUFrontFace,
cullMode :: WGPUCullMode
}
instance Storable WGPUPrimitiveState where
sizeOf _ = (#size WGPUPrimitiveState)
alignment = sizeOf
peek ptr = do
nextInChain <- (#peek WGPUPrimitiveState, nextInChain) ptr
topology <- (#peek WGPUPrimitiveState, topology) ptr
stripIndexFormat <- (#peek WGPUPrimitiveState, stripIndexFormat) ptr
frontFace <- (#peek WGPUPrimitiveState, frontFace) ptr
cullMode <- (#peek WGPUPrimitiveState, cullMode) ptr
pure $! WGPUPrimitiveState{..}
poke ptr WGPUPrimitiveState{..} = do
(#poke WGPUPrimitiveState, nextInChain) ptr nextInChain
(#poke WGPUPrimitiveState, topology) ptr topology
(#poke WGPUPrimitiveState, stripIndexFormat) ptr stripIndexFormat
(#poke WGPUPrimitiveState, frontFace) ptr frontFace
(#poke WGPUPrimitiveState, cullMode) ptr cullMode