summaryrefslogtreecommitdiff
path: root/3de.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-07-06 18:40:57 +1000
committerquou <quou@disroot.org>2024-07-06 18:40:57 +1000
commit2693d0e46cf55c613e560d2eed8a2f762fe76bb5 (patch)
treeeda3c4571c16e24602e5adc3d59b2b99aef3e3cf /3de.c
parente6f8a3356a91e0304e9965c7b8bfc2f06a2b79cc (diff)
Allocate a max viewport so that re-creating images isn't needed.
Diffstat (limited to '3de.c')
-rw-r--r--3de.c2
1 files changed, 1 insertions, 1 deletions
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;