![]() |
Lysa
0.0
Lysa 3D Engine
|
Central runtime object that owns the engine subsystems (windowing, GPU queues, resources, physics, and async helpers) and drives the main loop.
Public Member Functions | |
| Application (ApplicationConfiguration &config) | |
| virtual void | onReady () |
| virtual void | onQuit () |
| void | addWindow (const std::shared_ptr< Window > &window) |
| void | removeWindow (Window *window) |
| auto & | getMainWindow () const |
| void | updatePipelines (const std::unordered_map< pipeline_id, std::vector< std::shared_ptr< Material >>> &pipelineIds) const |
| void | run () |
| virtual | ~Application () |
Static Public Member Functions | |
| static const vireo::Vireo & | getVireo () |
| static Resources & | getResources () |
| static bool & | quit () |
| static auto & | getGraphicQueue () |
| static auto & | getComputeQueue () |
| static Application & | getInstance () |
| static ApplicationConfiguration & | getConfiguration () |
| static PhysicsEngine & | getPhysicsEngine () |
| static AsyncQueue & | getAsyncQueue () |
| template<typename Lambda > | |
| static auto | callDeferred (Lambda lambda) |
| template<typename Lambda > | |
| static auto | callAsync (Lambda lambda) |
Static Public Attributes | |
| static constexpr float | FIXED_DELTA_TIME {1.0f/60.0f} |
| Application | ( | ApplicationConfiguration & | config | ) |
Construct the application runtime using the provided configuration.
|
virtual |
| void addWindow | ( | const std::shared_ptr< Window > & | window | ) |
Adds a window to be managed and rendered by the application.
|
inlinestatic |
Starts a new thread that need access the GPU/VRAM.
Use this instead of starting a thread manually because the rendering system needs to wait for all the threads completion before releasing resources.
|
inlinestatic |
Add a lambda expression in the deferred calls queue.
They will be called before the next frame, after the scene pre-drawing updates where nodes are added/removed from the drawing lists (for all the frames in flight).
|
inlinestatic |
Returns the asynchronous queue helper used for background GPU work.
|
inlinestatic |
Returns the compute submit queue used for compute workloads.
|
inlinestatic |
Returns the application configuration provided at startup.
|
inlinestatic |
Returns the graphics submit queue used for rendering work.
|
inlinestatic |
Returns the singleton application instance.
|
inline |
Returns a reference to the main window (the first added window).
|
inlinestatic |
Returns the physics engine owned by the application.
|
inlinestatic |
Returns the global resources manager owned by the application.
|
inlinestatic |
Returns the global Vireo object
|
inlinevirtual |
Called when the application is about to quit.
|
inlinevirtual |
Called once after initialization is complete and the engine is ready.
|
inlinestatic |
Request the application to exit its main loop at the next opportunity.
| void removeWindow | ( | Window * | window | ) |
Removes a previously added window from the application.
| void run | ( | ) |
Enter the main loop and run until quit() is requested.
| void updatePipelines | ( | const std::unordered_map< pipeline_id, std::vector< std::shared_ptr< Material >>> & | pipelineIds | ) | const |
Updates rendering pipelines associated with the specified IDs.
|
friend |
|
staticconstexpr |
Fixed time step used by the physics update loop (in seconds).