How csyonghe/spireminiengine works
SpireMiniEngine is a mini game engine whose runtime loads a game directory and level, runs gameplay, and renders frames through OpenGL or Vulkan; an editor mode is also available. The sampled launch and engine code supports the entry-to-engine and level-loading relationships. Spire shader compilation and backend rendering are visible in the pipeline excerpts. The README also identifies cross-platform shader compilation as a core capability. Several other capabilities are represented from the tree and documented engine interfaces; their internal wiring was not sampled, so those links are left unasserted.
Main entry points: Engine.cpp Engine loop · Renderer.cpp Renderer · Level.cpp Level world · PipelineContext.cpp Shader pipeline
Components 19
Runtime and world
- Game launcher
GameEngine/Main.cpp - Engine loop
GameEngineCore/Engine.cpp - Level world
GameEngineCore/Level.cpp - Actor system
GameEngineCore/Actor.cpp
Rendering
- Renderer
GameEngineCore/Renderer.cpp - Shader pipeline
GameEngineCore/PipelineContext.cpp - Spire compiler
GameEngineCore/Spire/Source/SpireCore/ShaderCompiler.cpp - Hardware renderer
GameEngineCore/HardwareRenderer.h - OpenGL backend
GameEngineCore/GLAPI/GLHardwareRenderer.cpp - Vulkan backend
GameEngineCore/VulkanAPI/VulkanHardwareRenderer.cpp
Editor and input
- Input dispatch
GameEngineCore/InputDispatcher.cpp - Level editor
GameEngineCore/LevelEditor.cpp - Window and UI
GameEngineCore/SystemWindow.cpp
Content and animation
- Resource loading
GameEngineCore/Engine.cpp - Models and meshes
GameEngineCore/Model.cpp - Materials and textures
GameEngineCore/Material.cpp - Animation system
GameEngineCore/AnimationSynthesizer.cpp - Video capture
GameEngineCore/VideoEncoder.cpp
Other components
- User
Connections 20
- User → Game launcher: launches
README.md - Game launcher → Engine loop: initializes and runs
GameEngine/Main.cpp - Engine loop → Level world: loads level
GameEngineCore/Engine.cpp - Engine loop → Renderer: runs rendering
- Engine loop → Level editor: sets editor mode
- Engine loop → Input dispatch: dispatches actions
GameEngineCore/Engine.cpp - Engine loop → Window and UI: creates window
- Level world → Actor system: contains actors
- Engine loop → Resource loading: resolves resources
GameEngineCore/Engine.cpp - Resource loading → Models and meshes: loads content
- Resource loading → Materials and textures: loads content
- Level world → Animation system: uses animation
- Engine loop → Video capture: initializes capture
GameEngineCore/Engine.cpp - Renderer → Shader pipeline: uses pipelines
- Shader pipeline → Spire compiler: compiles shaders
GameEngineCore/PipelineContext.cpp - Shader pipeline → Hardware renderer: creates pipeline
GameEngineCore/PipelineContext.cpp - OpenGL backend → Hardware renderer: implements backend
GameEngineCore/GLAPI/GLHardwareRenderer.cpp - Vulkan backend → Hardware renderer: implements backend
GameEngineCore/VulkanAPI/VulkanHardwareRenderer.cpp - Renderer → OpenGL backend: selects backend
- Renderer → Vulkan backend: selects backend