|
Monad Engine da02fba2
> Undercity Codex_
|
A whirlwind tour of every module the engine ships with. Each row links to the canonical entry point — click through for the full API reference.
The mnd::Engine singleton (see engine/source/Engine.h) holds one of each subsystem. Reach any of them from anywhere in the codebase via mnd::Engine::GetInstance().GetX().
| Module | Header | Purpose |
|---|---|---|
| mnd::GraphicsAPI | graphics/GraphicsAPI.h | Thin OpenGL wrapper — buffers, shaders, draw calls. |
| mnd::ShaderProgram | graphics/ShaderProgram.h | GLSL compile/link + uniform upload. |
| mnd::Texture | graphics/Texture.h | 2D textures with a TextureManager cache. |
| mnd::RenderTarget | graphics/RenderTarget.h | Offscreen FBO for low-res internal rendering. |
| mnd::RenderSettings | graphics/RenderSettings.h | Renderer tuning (internal-resolution, fog, dithering). |
| mnd::Mesh / mnd::Material | render/Mesh.h, render/Material.h | GPU mesh and shader+uniform bundle. |
| mnd::Builder | render/Builder.h | MeshData factories (cube, plane, sphere ...). |
| mnd::RenderQueue | render/RenderQueue.h | Per-frame draw command queue. |
| mnd::InputManager | input/InputManager.h | Keyboard / mouse polling. |
| mnd::Key | input/Key.h | GLFW-compatible key/button enum. |
| mnd::FileSystem | io/FileSystem.h | Asset path resolution against ASSETS_DIR. |
| mnd::FileReader | io/FileReader.h | "Read whole file to string" helper. |
| mnd::Scene | scene/Scene.h | Owns the GameObject list, camera, lights. |
| mnd::GameObject | scene/GameObject.h | Scene node with transform + components. |
| mnd::Component | scene/Component.h | Base class + COMPONENT() macro for behaviours. |
| mnd::PhysicsManager | physics/PhysicsManager.h | Bullet world singleton + per-frame step. |
| mnd::RigidBody | physics/RigidBody.h | Wrapper around btRigidBody. |
| mnd::Collider | physics/Collider.h | Collision shape factories. |
| mnd::KinematicCharacterController | physics/KinematicCharacterController.h | FPS-style walker. |
| mnd::AudioManager | audio/AudioManager.h | miniaudio engine + 3D listener. |
| mnd::Audio | audio/Audio.h | Single playable audio clip. |
| mnd::Editor | editor/Editor.h | ImGui in-game editor overlay. |
| mnd::Log | Log.h | LOG_INFO / LOG_WARN / LOG_ERROR / LOG_FATAL macros. |
| Constants | Constants.h | Engine-wide compile-time tunables. |
| Types | Types.h | u8 / f32 / vec3 / mat4 aliases. |
GetX() — e.g. engine.GetInput(), engine.GetScene(), engine.GetPhysics(). There is no service locator beyond the singleton itself.Game code includes a single umbrella header:
That alone exposes the public API of every subsystem listed above. See Operator Training for a worked example, and Compile / Link / Run for the build steps.
mnd::Engine::Run() drives the main loop. One iteration looks like:
glfwPollEvents() — GLFW dispatches input callbacks into mnd::InputManager.deltaTime from a std::chrono::steady_clock timestamp.physics.Step(deltaTime) — Bullet integrates rigid bodies.app->Update(deltaTime) — your game logic runs here.scene.Update(deltaTime) — calls Update() on every Component.renderQueue.Draw(...) issues GL calls for every submitted command.editor.Draw() overlays the ImGui panels.glfwSwapBuffers() presents the frame.