mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Reorganize ClientMap rendering code for a bit more performance
- Don't select blocks for drawing in every frame - Sort meshbuffers by material before drawing
This commit is contained in:
@@ -113,7 +113,8 @@ public:
|
||||
{
|
||||
return m_box;
|
||||
}
|
||||
|
||||
|
||||
void updateDrawList(video::IVideoDriver* driver);
|
||||
void renderMap(video::IVideoDriver* driver, s32 pass);
|
||||
|
||||
int getBackgroundBrightness(float max_d, u32 daylight_factor,
|
||||
@@ -141,6 +142,8 @@ private:
|
||||
v3f m_camera_direction;
|
||||
f32 m_camera_fov;
|
||||
JMutex m_camera_mutex;
|
||||
|
||||
core::map<v3s16, MapBlock*> m_drawlist;
|
||||
|
||||
core::map<v2s16, bool> m_last_drawn_sectors;
|
||||
};
|
||||
|
Reference in New Issue
Block a user