From f05ce66a8e6fd0742a8314661a8dc871a5a2c0c3 Mon Sep 17 00:00:00 2001 From: Omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Wed, 8 May 2024 10:37:18 +1000 Subject: finishing submission + presentation for triangle example --- examples/triangle/ex_triangle.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'examples/triangle/ex_triangle.c') diff --git a/examples/triangle/ex_triangle.c b/examples/triangle/ex_triangle.c index 1b6fc96..50f135a 100644 --- a/examples/triangle/ex_triangle.c +++ b/examples/triangle/ex_triangle.c @@ -52,7 +52,24 @@ int main() { static f64 x = 0.0; x += 0.01; - // insert work here + gpu_backend_begin_frame(); + gpu_cmd_encoder* enc = gpu_get_default_cmd_encoder(); + // begin recording + gpu_cmd_encoder_begin(*enc); + gpu_cmd_encoder_begin_render(enc, renderpass); + encode_bind_pipeline(enc, PIPELINE_GRAPHICS, gfx_pipeline); + encode_set_default_settings(enc); + + // Record draw calls + gpu_temp_draw(); + + // End recording + gpu_cmd_encoder_end_render(enc); + + gpu_cmd_buffer buf = gpu_cmd_encoder_finish(enc); + gpu_queue_submit(&buf); + // Submit + gpu_backend_end_frame(); render_frame_end(&core->renderer); glfwSwapBuffers(core->renderer.window); -- cgit v1.2.3-70-g09d2