From 19a5fae08d7f1f85cb5448a5f2b19f0f9d342a0e Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:42:04 +1000 Subject: some more opengl work --- examples/triangle/ex_triangle.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/triangle/ex_triangle.c') 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) { -- cgit v1.2.3-70-g09d2