From 2693d0e46cf55c613e560d2eed8a2f762fe76bb5 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 6 Jul 2024 18:40:57 +1000 Subject: Allocate a max viewport so that re-creating images isn't needed. --- 3de.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '3de.c') diff --git a/3de.c b/3de.c index 8af3d18..fdfd7aa 100644 --- a/3de.c +++ b/3de.c @@ -68,7 +68,7 @@ int entrypoint(int argc, const char** argv, Arena* a) { app = new_app(&h, 640, 480, "3D Engine"); if (!app) return app->err; init_fps(&f, 20); - depth = heap_alloc(&h, 3000 * 3000 * sizeof *depth); + depth = heap_alloc(&h, max_vp_w * max_vp_h * sizeof *depth); if (!depth) { print_err("Out of memory.\n"); return error_out_of_memory; -- cgit v1.2.3-54-g00ecf