How remyj4556/strata-voxel-engine works
Strata is a C++/OpenGL voxel terrain engine. The user enters through a GLFW window and controls the camera; the game streams chunks around it, generates terrain and meshes concurrently, then renders chunk geometry. Its major supporting capabilities include greedy meshing, compact vertex data, texture-array block materials, lighting, and debug UI. The README documents the streaming stages and concurrency model; only the entry point, resource setup, and light manager were sampled, so detailed runtime call ownership beyond those is not asserted.
Main entry points: World.cpp World streaming · Renderer.cpp Renderer · Game.cpp Game loop · ResourceManager.cpp Resource manager
Components 21
Runtime and input
- Application entry
Engine/src/main.cpp - Game loop
Engine/src/Game.cpp - Camera controls
Engine/src/Camera.cpp
World streaming
- World streaming
Engine/src/World.cpp - Chunk map
Engine/include/ChunkMap.hpp - Chunk state
Engine/src/Chunk.cpp - Worker pool
Engine/src/ThreadPool.cpp - Task queue
Engine/include/ThreadSafeQueue.hpp
Voxel data and meshing
- Greedy mesher
Engine/src/ChunkMesher.cpp - Packed vertices
Engine/src/Vertex.cpp - Block registry
Engine/src/BlockRegistry.cpp - Block definitions
Engine/include/BlockDefinition.hpp
Rendering and resources
- Renderer
Engine/src/Renderer.cpp - GPU mesh
Engine/src/Mesh.cpp - Resource manager
Engine/src/ResourceManager.cpp - Texture library
Engine/src/TextureLibrary.cpp - Shader programs
Engine/src/Shader.cpp - Lighting
Engine/src/LightManager.cpp
Other components
- Player
- OpenGL
- Block assets
Connections 25
- Player → Application entry: starts application
- Application entry → Game loop: creates and runs
- Player → Camera controls: movement and look
- Game loop → Camera controls: updates controls
- Game loop → World streaming: streams nearby chunks
- World streaming → Chunk map: tracks chunks
- World streaming → Worker pool: schedules generation
- World streaming → Task queue: dispatches chunk tasks
- Worker pool → Task queue: runs queued tasks
- World streaming → Chunk state: advances chunk state
- World streaming → Greedy mesher: schedules meshing
- Greedy mesher → Chunk state: reads block data
- Greedy mesher → Packed vertices: packs face attributes
- Game loop → Renderer: renders frame
- Renderer → World streaming: uses streamed chunks
- Renderer → GPU mesh: uploads and draws
- GPU mesh → OpenGL: uploads geometry
- Renderer → OpenGL: issues draw calls
- Game loop → Resource manager: initializes resources
- Resource manager → Block registry: loads definitions
- Resource manager → Texture library: initializes texture array
- Block registry → Block definitions: builds GPU definitions
- Resource manager → Block assets: loads block JSON and textures
- Renderer → Shader programs: uses shaders
- Renderer → Lighting: uses light state