it würgs

This commit is contained in:
nek0 2022-12-02 16:58:57 +01:00
parent d1b73ba36e
commit 2219355483
2 changed files with 9 additions and 9 deletions

View file

@ -21,9 +21,9 @@ initAllocator
-> Vk.Instance
-> m VMA.Allocator
initAllocator physicalDevice device instance' = do
instanceProcAddr <- liftIO $ peek $ castFunPtrToPtr $
let instanceProcAddr = castFunPtr $
Vk.pVkGetInstanceProcAddr ((Vk.instanceCmds :: Vk.Instance -> Vk.InstanceCmds) instance')
deviceProcAddr <- liftIO $ peek $ castFunPtrToPtr $
deviceProcAddr = castFunPtr $
Vk.pVkGetDeviceProcAddr ((Vk.deviceCmds :: Vk.Device -> Vk.DeviceCmds) device)
let allocatorInfo = Vk.zero
{ VMA.physicalDevice = Vk.physicalDeviceHandle physicalDevice

View file

@ -10,7 +10,7 @@ import qualified Data.Vector as V
import Foreign
import Linear (V3(..))
import Linear (V3(..), V4(..))
import qualified VulkanMemoryAllocator as VMA
import qualified Vulkan.Core10 as Vk
@ -24,9 +24,9 @@ loadMeshes
:: V.Vector Vertex
loadMeshes =
V.fromList
[ Vertex (V3 0.5 0.5 0) (V3 0 1 0) undefined
, Vertex (V3 (-0.5) 0.5 0) (V3 0 1 0) undefined
, Vertex (V3 0 (-0.5) 0) (V3 0 1 0) undefined
[ Vertex (V3 0.5 0.5 0) (V3 0 1 0) (V4 0 0 0 0)
, Vertex (V3 (-0.5) 0.5 0) (V3 0 1 0) (V4 0 0 0 0)
, Vertex (V3 0 (-0.5) 0) (V3 0 1 0) (V4 0 0 0 0)
]
uploadMesh
@ -36,7 +36,7 @@ uploadMesh
-> m Mesh
uploadMesh vertices allocator = do
let bufferCreateInfo = Vk.zero
{ Vk.size = fromIntegral $ sizeOf (undefined :: Vertex)
{ Vk.size = fromIntegral $ sizeOf (Vertex (V3 0 0 0) (V3 0 0 0 ) (V4 0 0 0 0))
, Vk.usage = Vk.BUFFER_USAGE_VERTEX_BUFFER_BIT
}
allocationCreateInfo = Vk.zero