Misc fixes in preparation for multithreading refactor #10

Merged
EmaMaker merged 10 commits from multithread-refactor into main 2023-10-03 22:55:28 +02:00

10 Commits (main)

Author SHA1 Message Date
EmaMaker 3adb061057 Merge branch 'main' into multithread-refactor 2023-10-03 22:53:42 +02:00
EmaMaker 1a50d1fb84 chunkmgr: span chunk indices in a cube around the player, not a sphere 2023-10-03 22:45:09 +02:00
EmaMaker 60bbc85682 chunk: store index in chunk itself 2023-10-03 22:45:09 +02:00
EmaMaker 490f207e39 chunk/mgr: calculate index belongs to chunk namespace 2023-10-03 22:45:09 +02:00
EmaMaker c6d00c4200 fix type mismatch in chunk index/coordinates
typedef an appropriate chunk_index_t and chunk_intcoord_t
2023-10-03 22:45:09 +02:00
EmaMaker 2a57796ed2 move input handling from main into dedicated file 2023-10-03 22:45:09 +02:00
EmaMaker ca043bac68 threads: allow for proper shutdown
using `if` instead of `while` avoids the need to wait for the queue to empty to shutdown the thread
2023-10-03 22:44:55 +02:00
EmaMaker f6f4057109 update player debug variables in main instead of chunkmgr 2023-10-03 22:09:03 +02:00
EmaMaker 353ef37186 renderer: perform frustum culling only if chunk has vertices 2023-10-03 22:08:40 +02:00
EmaMaker 880c634be0 camera: set atomic position at startup
this avoids the first few chunk update loops recognizing the camera as being positioned at (0,0,0), which in turns avoids wastefully generating chunks out of view at startup
2023-10-03 22:08:40 +02:00