Skip to content

Commit

Permalink
fix shader loading after file structure move
Browse files Browse the repository at this point in the history
  • Loading branch information
WinteryFox committed Nov 9, 2023
1 parent 8e70cb3 commit 6fd787e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engine/gl/test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ int main() {
window.center();
window.setVisible(true);

std::ifstream vertexStream("../../editor/shaders/triangle.vert");
std::ifstream vertexStream("../../src/editor/shaders/triangle.vert");
std::string vertexSource((std::istreambuf_iterator<char>(vertexStream)), std::istreambuf_iterator<char>());
auto vertexModule = std::make_shared<Vixen::Gl::GlShaderModule>(Vixen::ShaderModule::Stage::VERTEX, vertexSource);

std::ifstream fragmentStream("../../editor/shaders/triangle.frag");
std::ifstream fragmentStream("../../src/editor/shaders/triangle.frag");
std::string fragmentSource((std::istreambuf_iterator<char>(fragmentStream)), std::istreambuf_iterator<char>());
auto fragmentModule = std::make_shared<Vixen::Gl::GlShaderModule>(Vixen::ShaderModule::Stage::FRAGMENT,
fragmentSource);
Expand Down
4 changes: 2 additions & 2 deletions src/engine/vk/test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ int main() {
.location = 1,
.offset = offsetof(Vertex, color),
})
.compileFromFile(vixen.device, "../../editor/shaders/triangle.vert");
.compileFromFile(vixen.device, "../../src/editor/shaders/triangle.vert");
auto fragment = Vixen::Vk::VkShaderModule::Builder()
.setStage(Vixen::ShaderModule::Stage::FRAGMENT)
.compileFromFile(vixen.device, "../../editor/shaders/triangle.frag");
.compileFromFile(vixen.device, "../../src/editor/shaders/triangle.frag");
auto program = Vixen::Vk::VkShaderProgram(vertex, fragment);

int width;
Expand Down

0 comments on commit 6fd787e

Please sign in to comment.