meowy
This commit is contained in:
parent
206b331d19
commit
341260b2cd
3 changed files with 7 additions and 3 deletions
|
@ -36,6 +36,7 @@
|
|||
]) ++ (with pkgs; [
|
||||
shaderc
|
||||
]);
|
||||
SDL_VULKAN_LIBRARY = "${pkgs.vulkan-loader}/lib/libvulkan.so";
|
||||
};
|
||||
#devShell = pkgs.mkShell {
|
||||
# buildInputs = with haskellPackages; [
|
||||
|
|
|
@ -37,7 +37,7 @@ initEngine
|
|||
initEngine = do
|
||||
-- initialize SDL2 with all subsystems
|
||||
void $ allocate_
|
||||
SDL.initializeAll
|
||||
(SDL.initialize [ SDL.InitVideo ])
|
||||
(do
|
||||
putStrLn "This is the end!"
|
||||
SDL.quit
|
||||
|
|
|
@ -14,8 +14,9 @@ import qualified Vulkan.Zero as Vk
|
|||
|
||||
createInstance :: MonadResource m => SDL.Window -> m Vk.Instance
|
||||
createInstance window = do
|
||||
windowExtensions <- liftIO $ fmap (Vk.EXT_DEBUG_UTILS_EXTENSION_NAME :) $
|
||||
traverse BS.packCString =<< SDL.vkGetInstanceExtensions window
|
||||
windowExtensions <-
|
||||
(++) [Vk.KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, Vk.EXT_DEBUG_UTILS_EXTENSION_NAME] <$>
|
||||
((liftIO . mapM BS.packCString) =<< SDL.vkGetInstanceExtensions window)
|
||||
liftIO $ do
|
||||
putStrLn "activating followinfg extensions:"
|
||||
print windowExtensions
|
||||
|
@ -30,6 +31,8 @@ createInstance window = do
|
|||
, Vk.enabledLayerNames = V.singleton "VK_LAYER_KHRONOS_validation"
|
||||
}
|
||||
|
||||
SDL.vkLoadLibrary Nothing
|
||||
|
||||
(_, inst) <- allocate
|
||||
(Vk.createInstance createInfo Nothing)
|
||||
(\inst -> do
|
||||
|
|
Loading…
Reference in a new issue