mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Group sparse mesh buffers over entire scene for rendering
This commit is contained in:
parent
612d4f9656
commit
d2a7875b5b
11 changed files with 267 additions and 144 deletions
|
@ -115,7 +115,6 @@ private:
|
|||
// update the vertex order in transparent mesh buffers
|
||||
void updateTransparentMeshBuffers();
|
||||
|
||||
|
||||
// Orders blocks by distance to the camera
|
||||
class MapBlockComparer
|
||||
{
|
||||
|
@ -133,30 +132,6 @@ private:
|
|||
v3s16 m_camera_block;
|
||||
};
|
||||
|
||||
|
||||
// reference to a mesh buffer used when rendering the map.
|
||||
struct DrawDescriptor {
|
||||
v3s16 m_pos;
|
||||
union {
|
||||
scene::IMeshBuffer *m_buffer;
|
||||
const PartialMeshBuffer *m_partial_buffer;
|
||||
};
|
||||
bool m_reuse_material:1;
|
||||
bool m_use_partial_buffer:1;
|
||||
|
||||
DrawDescriptor(v3s16 pos, scene::IMeshBuffer *buffer, bool reuse_material) :
|
||||
m_pos(pos), m_buffer(buffer), m_reuse_material(reuse_material), m_use_partial_buffer(false)
|
||||
{}
|
||||
|
||||
DrawDescriptor(v3s16 pos, const PartialMeshBuffer *buffer) :
|
||||
m_pos(pos), m_partial_buffer(buffer), m_reuse_material(false), m_use_partial_buffer(true)
|
||||
{}
|
||||
|
||||
video::SMaterial &getMaterial();
|
||||
/// @return index count
|
||||
u32 draw(video::IVideoDriver* driver);
|
||||
};
|
||||
|
||||
Client *m_client;
|
||||
RenderingEngine *m_rendering_engine;
|
||||
|
||||
|
@ -177,8 +152,6 @@ private:
|
|||
std::map<v3s16, MapBlock*> m_drawlist_shadow;
|
||||
bool m_needs_update_drawlist;
|
||||
|
||||
std::set<v2s16> m_last_drawn_sectors;
|
||||
|
||||
bool m_cache_trilinear_filter;
|
||||
bool m_cache_bilinear_filter;
|
||||
bool m_cache_anistropic_filter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue