tools/hello: load shaders using the image path as a base

This commit is contained in:
Danny Robson 2019-03-03 16:55:53 +11:00
parent bbdc05eead
commit 96381b0d88

View File

@ -25,6 +25,7 @@
#include <cruft/util/log.hpp>
#include <cruft/util/colour.hpp>
#include <cruft/util/point.hpp>
#include <cruft/util/exe.hpp>
#include <atomic>
#include <mutex>
@ -501,8 +502,9 @@ main (void)
//-------------------------------------------------------------------------
auto vert_module = cruft::vk::make_owned<cruft::vk::shader_module> (ldevice, "./hello.vert.spv");
auto frag_module = cruft::vk::make_owned<cruft::vk::shader_module> (ldevice, "./hello.frag.spv");
auto const cwd = cruft::image_path ().parent_path ();
auto vert_module = cruft::vk::make_owned<cruft::vk::shader_module> (ldevice, cwd / "hello.vert.spv");
auto frag_module = cruft::vk::make_owned<cruft::vk::shader_module> (ldevice, cwd / "hello.frag.spv");
//-------------------------------------------------------------------------