Engine
Core class for rendering, gx setup and common configuration.
This class manages the framework's lifecycle and coordinates all
subsystems. It handles video initialization, framebuffer management,
rendering loops and timing calculations.
Methods
Engine()
Default constructor - setups video, debug and gx
void render(Scene* scene, Camera* camera)
Renders the specified scene with the specified camera
| scene | Scene to render | |
| camera | Camera to render with |
void render(Object2D* element)
Renders 2D overlay elements
| element | 2D element to render |
void render(Scene* scene, Camera* camera, Object2D* overlay)
Renders 3D scene and 2D overlay in a single frame
| scene | Scene to render | |
| camera | Camera to render with | |
| overlay | 2D overlay element to render on top |
void shutdown()
Shuts down the engine and cleans up resources
void* getCurrentFramebuffer() const
Gets the current active framebuffer
void swapFramebuffers()
Swaps the front and back framebuffers
f32 getDeltaTime() const
Gets the time elapsed since last frame
f32 getFPS() const
Gets the current frames per second
Properties
| cfb | void* | Console frame buffer |
| deltaTime | f32 | Time elapsed since last frame |
| fps | f32 | Current frames per second |
| xfb | void* | External frame buffers (double buffering) |