#include "Deer/VoxelWorld.h" #include "Deer/Voxels/Chunk.h" #include "DeerRender/Voxels/VoxelWorldRenderData.h" namespace Deer { namespace VoxelWorld { // Chunk render data Scope chunksRender; ChunkUpdateQueue chunkQueue; // Voxel creation data std::vector indices; std::vector vertexData; std::queue ambientLightPropagation; std::queue voxelLightPropagation; std::vector tmp_voxelLightSource; } void VoxelWorld::clearRenderVars() { chunksRender.reset(); chunkQueue.reset(); indices.clear(); vertexData.clear(); while (!ambientLightPropagation.empty()) { ambientLightPropagation.pop(); } while (!voxelLightPropagation.empty()) { voxelLightPropagation.pop(); } tmp_voxelLightSource.clear(); } void VoxelWorld::initializeRenderVars(const VoxelWorldProps& props) { chunksRender = MakeScope(props.getChunkCount()); } } // namespace Deer