From baf787b9eb742b0c52ecf8c9ae319dbfb4ea0f1b Mon Sep 17 00:00:00 2001 From: Omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Wed, 29 May 2024 14:50:49 +1000 Subject: opengl clear color working --- examples/cube/ex_cube.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/cube') 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) { -- cgit v1.2.3-70-g09d2