mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
optimize it even more
This commit is contained in:
parent
a21d87717e
commit
fc3d5c5484
3 changed files with 33 additions and 21 deletions
|
|
@ -34,6 +34,15 @@ namespace model {
|
|||
struct Model;
|
||||
}
|
||||
|
||||
struct ChunksSortEntry {
|
||||
int index;
|
||||
int d;
|
||||
|
||||
inline bool operator<(const ChunksSortEntry& o) const noexcept {
|
||||
return d > o.d;
|
||||
}
|
||||
};
|
||||
|
||||
class WorldRenderer {
|
||||
Engine* engine;
|
||||
Level* level;
|
||||
|
|
@ -45,7 +54,7 @@ class WorldRenderer {
|
|||
std::unique_ptr<Batch3D> batch3d;
|
||||
std::unique_ptr<ModelBatch> modelBatch;
|
||||
|
||||
std::vector<size_t> indices;
|
||||
std::vector<ChunksSortEntry> indices;
|
||||
|
||||
float timer = 0.0f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue