mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
Chunks render moved to ChunksLoader
This commit is contained in:
parent
15bed4169e
commit
f569378b88
12 changed files with 127 additions and 43 deletions
|
|
@ -81,10 +81,12 @@ void update_level(World* world, Level* level, vec3 position, float delta, long f
|
|||
update_controls(level->physics, level->chunks, level->player, delta);
|
||||
update_interaction(level, lineBatch);
|
||||
|
||||
level->chunks->setCenter(world->wfile, position.x,0,position.z);
|
||||
level->chunksController->_buildMeshes(renderer, frame);
|
||||
|
||||
level->chunks->setCenter(world->wfile, position.x, 0, position.z);
|
||||
int freeLoaders = level->chunksController->countFreeLoaders();
|
||||
for (int i = 0; i < freeLoaders; i++)
|
||||
level->chunksController->_buildMeshes(renderer, frame);
|
||||
|
||||
freeLoaders = level->chunksController->countFreeLoaders();
|
||||
for (int i = 0; i < freeLoaders; i++)
|
||||
level->chunksController->loadVisible(world->wfile);
|
||||
}
|
||||
|
|
@ -140,7 +142,7 @@ int main() {
|
|||
bool occlusion = false;
|
||||
bool devdata = false;
|
||||
|
||||
glfwSwapInterval(0);
|
||||
Window::swapInterval(0);
|
||||
|
||||
std::cout << "-- initializing finished" << std::endl;
|
||||
while (!Window::isShouldClose()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue