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)
|
packages.${packageName} = # (ref:haskell-package-def)
|
||||||
haskellPackages.callCabal2nix packageName self rec {
|
haskellPackages.callCabal2nix packageName self rec {
|
||||||
# Dependency overrides go here
|
# Dependency overrides go here
|
||||||
|
wavefront = jailbreakUnbreak haskellPackages.wavefront;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackage = self.packages.${system}.${packageName};
|
defaultPackage = self.packages.${system}.${packageName};
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
{-# LANGUAGE DataKinds #-}
|
{-# LANGUAGE DataKinds #-}
|
||||||
module Mesh where
|
module Mesh where
|
||||||
|
|
||||||
|
import Codec.Wavefront
|
||||||
|
|
||||||
import Control.Monad.IO.Class
|
import Control.Monad.IO.Class
|
||||||
import Control.Monad.Trans.Resource
|
import Control.Monad.Trans.Resource
|
||||||
|
|
||||||
|
@ -65,3 +67,9 @@ uploadMesh vertices allocator = do
|
||||||
release dataReleaseKey
|
release dataReleaseKey
|
||||||
|
|
||||||
return mesh
|
return mesh
|
||||||
|
|
||||||
|
loadFromObj
|
||||||
|
:: (MonadResource m, MonadFail m)
|
||||||
|
=> FilePath
|
||||||
|
-> m Mesh
|
||||||
|
loadFromObj filepath = undefined
|
||||||
|
|
|
@ -41,6 +41,7 @@ data EngineData = EngineData
|
||||||
, engineImageAvailableSemaphore :: Vk.Semaphore
|
, engineImageAvailableSemaphore :: Vk.Semaphore
|
||||||
, engineRenderFinishedSemaphore :: Vk.Semaphore
|
, engineRenderFinishedSemaphore :: Vk.Semaphore
|
||||||
, engineMesh :: Mesh
|
, engineMesh :: Mesh
|
||||||
|
, engineExternalMesh :: Mesh
|
||||||
, engineAllocator :: VMA.Allocator
|
, engineAllocator :: VMA.Allocator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ executable vulkan-tutorial
|
||||||
, vulkan-api
|
, vulkan-api
|
||||||
, vulkan-utils
|
, vulkan-utils
|
||||||
, VulkanMemoryAllocator
|
, VulkanMemoryAllocator
|
||||||
|
, wavefront
|
||||||
, linear
|
, linear
|
||||||
, monad-loops
|
, monad-loops
|
||||||
, stm
|
, stm
|
||||||
|
|
Loading…
Reference in a new issue