diff options
author | quou <quou@disroot.org> | 2024-07-06 18:40:57 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-07-06 18:40:57 +1000 |
commit | 2693d0e46cf55c613e560d2eed8a2f762fe76bb5 (patch) | |
tree | eda3c4571c16e24602e5adc3d59b2b99aef3e3cf /3de.c | |
parent | e6f8a3356a91e0304e9965c7b8bfc2f06a2b79cc (diff) |
Allocate a max viewport so that re-creating images isn't needed.
Diffstat (limited to '3de.c')
-rw-r--r-- | 3de.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |