diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-08 14:42:04 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-08 14:42:04 +1000 |
commit | 19a5fae08d7f1f85cb5448a5f2b19f0f9d342a0e (patch) | |
tree | 3958b9cd80999a46f711506c25fb759e02595922 /examples | |
parent | 037cb840dfb90264cd1bef36736cefb3cf7f2dd9 (diff) |
some more opengl work
Diffstat (limited to 'examples')
-rw-r--r-- | examples/triangle/ex_triangle.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/triangle/ex_triangle.c b/examples/triangle/ex_triangle.c index 5b6fbea..0191c18 100644 --- a/examples/triangle/ex_triangle.c +++ b/examples/triangle/ex_triangle.c @@ -35,8 +35,14 @@ int main() { gpu_renderpass_desc pass_description = {}; gpu_renderpass* renderpass = gpu_renderpass_create(&pass_description); - str8 vert_path = str8lit("build/linux/x86_64/debug/triangle.vert.spv"); - str8 frag_path = str8lit("build/linux/x86_64/debug/triangle.frag.spv"); + str8 vert_path, frag_path; +#ifdef CEL_REND_BACKEND_OPENGL + vert_path = str8lit("assets/shaders/triangle.vert"); + frag_path = str8lit("assets/shaders/triangle.frag"); +#else + vert_path = str8lit("build/linux/x86_64/debug/triangle.vert.spv"); + frag_path = str8lit("build/linux/x86_64/debug/triangle.frag.spv"); +#endif str8_opt vertex_shader = str8_from_file(&scratch, vert_path); str8_opt fragment_shader = str8_from_file(&scratch, frag_path); if (!vertex_shader.has_value || !fragment_shader.has_value) { |