From 455124021f455ebca9734cf9cddef4d68905fd05 Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 12 May 2023 14:56:02 +0200 Subject: [PATCH] fix it by transposing the model matrix --- src/CommandBuffer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandBuffer.hs b/src/CommandBuffer.hs index 6b671d3..1748988 100644 --- a/src/CommandBuffer.hs +++ b/src/CommandBuffer.hs @@ -323,10 +323,10 @@ pokeData frame frameNumber sceneParameters cameraParameters = do V.mapM_ (\(index, obj) -> do - let modelMatrix = GPUObjectData (objectMatrix obj) + let modelMatrix = GPUObjectData (transpose $ objectMatrix obj) liftIO $ poke - (objectPointer `plusPtr` (index * sizeOf (undefined :: GPUObjectData))) + (castPtr objectPointer `plusPtr` (index * sizeOf (undefined :: GPUObjectData))) modelMatrix ) (V.zip