How cadenmbond/voxel-terrain-generation works
Voxel Terrain is a small OpenGL voxel-rendering experiment. Its documented core is to build voxel geometry while omitting faces hidden by neighboring blocks, then render the exposed geometry; player movement and camera control are additional gameplay stages. The tree also shows level/grid utilities, procedural noise, shaders, textures, and a lighting shape. Many implementation files were not excerpted, so uncertain wiring is shown only as dashed, unverified links; the README supports the face-culling relationship.
Main entry points: main.cpp Engine entry · LevelLoading.cpp Level loading · PlayerController.cpp Player controller · KeyboardInput.cpp Keyboard input
Components 18
Application
- Engine entry
Engine/main.cpp - FPS counter
Engine/Engine/Window/FPS.h - GLM math
dependencies/include/glm
Gameplay
- Keyboard input
Engine/Engine/Gameplay/Input/KeyboardInput.cpp - Player controller
Engine/Engine/Gameplay/Player/PlayerController.cpp - Camera
Engine/Engine/Gameplay/Camera.cpp
Voxel World
- Level loading
Engine/Engine/Scenes/LevelLoading.cpp - Level data
Engine/Engine/Scenes/LevelData.h - Grid utilities
Engine/Engine/Scenes/GridUtils.cpp - Perlin noise
Engine/Engine/Utils/Math/perlin.cpp
Rendering
- Cube geometry
Engine/Engine/Visuals/Shapes/Cube.cpp - Shader programs
Engine/Engine/Visuals/Shader.cpp - Texture loading
Engine/Engine/Visuals/Textures/texture.cpp - Image decoder
Engine/stb_image.h - Light shape
Engine/Engine/Visuals/Shapes/Bulb.h
Connections 19
- Player → Engine entry: launches
- Engine entry → Keyboard input: polls input
- Keyboard input → Player controller: sets controls
- Engine entry → Player controller: updates
- Player controller → Camera: uses view
- Engine entry → Level loading: loads level
- Level loading → Level data: populates
- Level loading → Grid utilities: uses grid
- Level loading → Perlin noise: generates terrain
- Engine entry → Cube geometry: renders voxels
- Cube geometry → Grid utilities: culls hidden faces
- Engine entry → Shader programs: uses shaders
- Engine entry → Texture loading: loads textures
- Texture loading → Image decoder: decodes images
Engine/Engine/Visuals/Textures/texture.cpp - Engine entry → Light shape: renders light
- Engine entry → FPS counter: tracks frames
- Engine entry → GLM math: uses math
- Engine entry → GLFW: uses windowing
- Engine entry → OpenGL: draws with