Architecture¶
VOID is divided into independent modules, each responsible for a single subsystem.
Application
│
▼
Window System
│
▼
Input System
│
▼
Renderer
│
▼
Batch Renderer
│
▼
OpenGL
Higher-level systems such as sprites, animations, tilemaps and particles are built on top of the renderer instead of interacting with OpenGL directly. This keeps responsibilities isolated while making the engine easier to extend and maintain.
Frame lifecycle¶
A typical frame consists of the following stages:
- Poll window events
- Update the input system
- Begin a new frame
- Update game logic
- Submit render commands
- Flush the batch renderer
- Present the rendered frame
Core modules¶
| Module | Responsibility |
|---|---|
| Window | SDL3 init, GL context, fullscreen, VSync, monitor detection |
| Input | Keyboard / mouse state, fully hides SDL from game code |
| Camera | Orthographic camera & view-projection matrix |
| Asset Manager | Cached loading of textures, fonts and shaders |
| Renderer | Scene management, quad/text/particle/tilemap submission |
| Batch Renderer | Accumulates geometry into GPU buffers, auto-flushes |
Resource management¶
All GPU resources follow RAII: they release their OpenGL handles automatically when destroyed. The following classes are move-only (copy is disabled to prevent accidental duplication of GPU resources):
- Texture
- Shader
- Font
- Mesh
- VertexArray
- Framebuffer
Texture tex;
Texture another = std::move(tex);