How timothesandt/proceduralgeneration works
Orosmo is a C++23 2D/3D game engine whose documented product workflow includes procedural terrain generation/viewing and rendering, plus a declarative UI compiled from .cui into C++. The graph separates platform, rendering, world, and UI/compiler responsibilities. The README documents the broad product links; sampled source confirms selected compiler, shader/pipeline, and application behavior. Several implementation files were not sampled, so undocumented internal call relationships are omitted.
Main entry points: terrain.cpp Terrain Data · device.hpp Graphics Device API · main.rs CUI Compiler · viewer.cpp Terrain Viewer
Components 26
Platform and Core
- Window and Input
src/platform/window.cpp - Task System
src/core/tasks.cpp
Rendering and RHI
- Terrain Renderer
src/renderer/terrain_renderer.cpp - Scene Renderer
src/renderer/scene_renderer.cpp - Draw Lists
include/orosmo/renderer/draw_list.hpp - Shader Library
include/orosmo/renderer/shader_library.hpp - Shader Compiler
include/orosmo/rhi/shader_compiler.hpp - Pipeline Cache
include/orosmo/renderer/pipeline_cache.hpp - Graphics Device API
include/orosmo/rhi/device.hpp - OpenGL Backend
src/rhi/opengl/gl_device.cpp
Procedural World
- Terrain Generator
apps/terrain_gen/main.cpp - Terrain Viewer
apps/terrain_viewer/src/viewer.cpp - Terrain Data
src/world/terrain.cpp - Noise Generation
src/world/noise.cpp - GPU Noise
src/world/gpu/gpu_noise.cpp - Terrain LOD
src/world/lod.cpp - World Streaming
src/world/streaming.cpp - Terrain Raycast
src/world/raycast.cpp - Terrain Export
src/world/export.cpp
UI and Compiler
- CUI Compiler
tools/cui-rs/src/main.rs - Lexer
tools/cui-rs/src/lexer.rs - Parser and AST
tools/cui-rs/src/parser.rs - CUI Code Generator
tools/cui-rs/src/engine.rs - UI Runtime
src/ui/ui.cpp - UI Text Renderer
include/orosmo/ui/text_renderer.hpp
Other components
- User
Connections 28
- User → Terrain Generator: generates terrain
README.md - User → Terrain Viewer: views terrain
README.md - Terrain Generator → Terrain Data: uses world module
README.md - Terrain Viewer → Terrain Data: uses world module
README.md - Terrain Viewer → Terrain Renderer: uses renderer
README.md - Terrain Data → Noise Generation: uses noise
- Terrain Data → Terrain LOD: supports LOD
- Terrain Data → World Streaming: supports streaming
- Terrain Data → Terrain Raycast: supports raycasting
- Terrain Data → Terrain Export: exports terrain
- GPU Noise → Graphics Device API: uses device API
- GPU Noise → Shader Compiler: uses shaders
src/world/gpu/gpu_noise.cpp - Terrain Renderer → Terrain Data: renders terrain
- Scene Renderer → Graphics Device API: renders via RHI
- Draw Lists → UI Text Renderer: feeds text rendering
include/orosmo/ui/text_renderer.hpp - Shader Library → Graphics Device API: uses device API
include/orosmo/renderer/shader_library.hpp - Shader Library → Shader Compiler: compiles shaders
include/orosmo/renderer/shader_library.hpp - Pipeline Cache → Shader Library: caches program pipelines
include/orosmo/renderer/pipeline_cache.hpp - Pipeline Cache → Graphics Device API: creates pipelines
include/orosmo/renderer/pipeline_cache.hpp - OpenGL Backend → Graphics Device API: implements API
- Window and Input → Graphics Device API: provides window surface
include/orosmo/rhi/device.hpp - User → CUI Compiler: compiles UI
README.md - CUI Compiler → Lexer: tokenizes source
tools/cui-rs/src/main.rs - CUI Compiler → Parser and AST: parses tokens
tools/cui-rs/src/main.rs - Parser and AST → Lexer: consumes tokens
tools/cui-rs/src/parser.rs - CUI Compiler → CUI Code Generator: generates C++
tools/cui-rs/src/main.rs - CUI Code Generator → UI Runtime: targets UI runtime
tools/cui-rs/src/engine.rs - UI Runtime → UI Text Renderer: renders text