summaryrefslogtreecommitdiff
path: root/examples/cube/ex_cube.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cube/ex_cube.c')
-rw-r--r--examples/cube/ex_cube.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/cube/ex_cube.c b/examples/cube/ex_cube.c
index b87071f..7b0ab48 100644
--- a/examples/cube/ex_cube.c
+++ b/examples/cube/ex_cube.c
@@ -68,8 +68,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/cube.vert.spv");
- str8 frag_path = str8lit("build/linux/x86_64/debug/cube.frag.spv");
+ str8 vert_path, frag_path;
+#ifdef CEL_REND_BACKEND_OPENGL
+ vert_path = str8lit("assets/shaders/blinn_phong.vert");
+ frag_path = str8lit("assets/shaders/blinn_phong.frag");
+#else
+ vert_path = str8lit("build/linux/x86_64/debug/cube.vert.spv");
+ frag_path = str8lit("build/linux/x86_64/debug/cube.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) {