How halva89/main-frame-graphics works
main.frame is a Rust/Vulkan 3D graphics engine. The principal workflow is to load a text .mff scene, parse its settings and objects, build scene state, then run the windowed frame loop with input, animation and physics updates feeding rendering. The graph also preserves documented rendering, culling and thermal capabilities. Evidence is limited to the README and indexed or excerpted sources; some subsystem links reflect README statements where implementation excerpts were unavailable.
Main entry points: engine.rs Engine loop · mod.rs MFF parser · vulkan.rs Vulkan backend · object.rs Scene objects
Components 26
Engine runtime
- Engine loop
src/core/engine.rs - Window control
src/platform/window.rs - Input handling
src/platform/input.rs - Frame timing
src/platform/time.rs
Scene and assets
- Scene state
src/core/scene.rs - Scene objects
src/core/object.rs - MFF parser
src/scene_parser/mod.rs - Scene settings
src/scene_parser/scene_settings.rs - Static objects
src/scene_parser/static_objects.rs - Animated objects
src/scene_parser/animated_objects.rs - Mesh loader
src/scene_parser/mesh_loader.rs
Simulation
- Transforms
src/core/transform.rs - Keyframe animation
src/animation/animator.rs - Interpolation
src/animation/interpolator.rs - Physics world
src/physics/world.rs
Graphics
- Mesh data
src/render/mesh.rs - Renderer
src/render/renderer.rs - Vulkan backend
src/render/vulkan.rs - Graphics pipeline
src/render/pipeline.rs - Shader support
src/render/shader.rs - Geometry buffers
src/render/buffer_manager.rs - Frustum culling
src/core/object.rs - Thermal mode
src/render/vulkan.rs
Other components
- Scene user
- Vulkan API
- Graphics device
Connections 29
- Scene user → Engine loop: runs scene
- Engine loop → MFF parser: loads scene
src/core/engine.rs - MFF parser → Scene settings: parses settings
src/scene_parser/mod.rs - MFF parser → Static objects: parses static
src/scene_parser/mod.rs - MFF parser → Animated objects: parses animated
src/scene_parser/mod.rs - MFF parser → Mesh loader: loads meshes
src/scene_parser/mod.rs - MFF parser → Mesh data: builds geometry
src/scene_parser/mod.rs - MFF parser → Physics world: reads physics
src/scene_parser/mod.rs - Engine loop → Scene state: updates scene
src/core/engine.rs - Scene state → Scene objects: stores objects
src/core/scene.rs - Scene objects → Mesh data: holds mesh
src/core/object.rs - Scene objects → Transforms: holds transform
src/core/object.rs - Engine loop → Window control: opens window
src/core/engine.rs - Window control → Input handling: handles input
src/platform/window.rs - Window control → Frame timing: tracks time
src/platform/window.rs - Engine loop → Keyframe animation: applies animation
src/core/engine.rs - Keyframe animation → Interpolation: interpolates frames
src/animation/animator.rs - Engine loop → Physics world: steps physics
src/core/engine.rs - Engine loop → Renderer: renders frames
src/core/engine.rs - Renderer → Vulkan backend: uses backend
- Vulkan backend → Graphics pipeline: creates pipelines
src/render/vulkan.rs - Vulkan backend → Mesh data: renders meshes
src/render/vulkan.rs - Vulkan backend → Shader support: loads shaders
src/render/vulkan.rs - Vulkan backend → Vulkan API: calls API
- Vulkan API → Graphics device: submits work
- Mesh loader → Mesh data: produces mesh
src/scene_parser/mesh_loader.rs - Scene objects → Frustum culling: provides bounds
src/core/object.rs - Renderer → Frustum culling: culls objects
- Vulkan backend → Thermal mode: supports effects
src/render/vulkan.rs