From 131f0b370f52f70f3dc4a6341d543ef2329cc00e Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 29 Dec 2024 23:33:39 +1100 Subject: add a seperate update_cbuffers function to models to avoid doing it on every render --- c2.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'c2.cpp') diff --git a/c2.cpp b/c2.cpp index e88f12d..e36b1cd 100644 --- a/c2.cpp +++ b/c2.cpp @@ -215,22 +215,23 @@ extern "C" int entrypoint() { raxis )); monkey->update_transforms(); + monkey->update_cbuffers( + dev, + transform, + projection + ); ctx.debug_push("depth prepass"); monkey->render( dev, &frame_arena, - depth_prepass, - transform, - projection + depth_prepass ); ctx.debug_pop(); ctx.debug_push("forward"); monkey->render( dev, &frame_arena, - pass2, - transform, - projection + pass2 ); ctx.debug_pop(); -- cgit v1.2.3-54-g00ecf