diff options
author | x2048 <codeforsmile@gmail.com> | 2023-01-06 22:31:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 22:31:06 +0100 |
commit | 2715cc8bf68a2cc8cd583cd5b0bb732ee13a1b49 (patch) | |
tree | cd9c735604cc8ca5c7b6a84cdf5e44058a9d0e11 /src/client/clientmap.h | |
parent | 059f62d7d60b0aab9af47740f5d5101aa25b7077 (diff) | |
download | minetest-2715cc8bf68a2cc8cd583cd5b0bb732ee13a1b49.tar.xz |
Occlusion culling algorithm based on recursive descend (#13104)
Co-authored-by: DS <vorunbekannt75@web.de>
Diffstat (limited to 'src/client/clientmap.h')
-rw-r--r-- | src/client/clientmap.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/clientmap.h b/src/client/clientmap.h index f5e02d6d0..cc68c1c15 100644 --- a/src/client/clientmap.h +++ b/src/client/clientmap.h @@ -76,7 +76,7 @@ public: s32 id ); - virtual ~ClientMap() = default; + virtual ~ClientMap(); bool maySaveBlocks() override { @@ -116,6 +116,8 @@ public: void getBlocksInViewRange(v3s16 cam_pos_nodes, v3s16 *p_blocks_min, v3s16 *p_blocks_max, float range=-1.0f); void updateDrawList(); + // @brief Calculate statistics about the map and keep the blocks alive + void touchMapBlocks(); void updateDrawListShadow(v3f shadow_light_pos, v3f shadow_light_dir, float radius, float length); // Returns true if draw list needs updating before drawing the next frame. bool needsUpdateDrawList() { return m_needs_update_drawlist; } @@ -136,11 +138,14 @@ public: f32 getWantedRange() const { return m_control.wanted_range; } f32 getCameraFov() const { return m_camera_fov; } + void onSettingChanged(const std::string &name); + private: // update the vertex order in transparent mesh buffers void updateTransparentMeshBuffers(); + // Orders blocks by distance to the camera class MapBlockComparer { @@ -205,4 +210,7 @@ private: bool m_cache_bilinear_filter; bool m_cache_anistropic_filter; u16 m_cache_transparency_sorting_distance; + + bool m_new_occlusion_culler; + bool m_enable_raytraced_culling; }; |