prepare mesh loading from obj
This commit is contained in:
parent
49ab3e49ed
commit
597870d957
4 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
packages.${packageName} = # (ref:haskell-package-def)
|
||||
haskellPackages.callCabal2nix packageName self rec {
|
||||
# Dependency overrides go here
|
||||
wavefront = jailbreakUnbreak haskellPackages.wavefront;
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.${packageName};
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
module Mesh where
|
||||
|
||||
import Codec.Wavefront
|
||||
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Trans.Resource
|
||||
|
||||
|
@ -65,3 +67,9 @@ uploadMesh vertices allocator = do
|
|||
release dataReleaseKey
|
||||
|
||||
return mesh
|
||||
|
||||
loadFromObj
|
||||
:: (MonadResource m, MonadFail m)
|
||||
=> FilePath
|
||||
-> m Mesh
|
||||
loadFromObj filepath = undefined
|
||||
|
|
|
@ -41,6 +41,7 @@ data EngineData = EngineData
|
|||
, engineImageAvailableSemaphore :: Vk.Semaphore
|
||||
, engineRenderFinishedSemaphore :: Vk.Semaphore
|
||||
, engineMesh :: Mesh
|
||||
, engineExternalMesh :: Mesh
|
||||
, engineAllocator :: VMA.Allocator
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ executable vulkan-tutorial
|
|||
, vulkan-api
|
||||
, vulkan-utils
|
||||
, VulkanMemoryAllocator
|
||||
, wavefront
|
||||
, linear
|
||||
, monad-loops
|
||||
, stm
|
||||
|
|
Loading…
Reference in a new issue