Main class. More...
#include <Application.hpp>
Collaboration diagram for cae::Application:Public Member Functions | |
| Application (const ArgsConfig &argsConfig, const EnvConfig &envConfig) | |
| Construct the Application with given configurations. | |
| ~Application ()=default | |
| Application (const Application &)=delete | |
| Application & | operator= (const Application &)=delete |
| Application (Application &&)=delete | |
| Application & | operator= (Application &&)=delete |
| void | start () |
| Start the application. | |
| void | stop () |
| Stop the application. | |
Private Member Functions | |
| void | setupEngine (const std::string &rendererName, const std::string &windowName, const std::string &shaderFrontendName, const std::string &shaderIRName) |
| Setup the engine with the given plugins. | |
| void | mainLoop () |
| main loop | |
Static Private Member Functions | |
| static EngineConfig | parseEngineConf (const std::string &path) |
| Parse the engine configuration file. | |
Private Attributes | |
| std::unique_ptr< utl::PluginLoader > | m_pluginLoader = nullptr |
| std::unique_ptr< Engine > | m_engine = nullptr |
| AppConfig | m_appConfig |
| std::unordered_map< KeyCode, bool > | m_keyState |
Main class.
Definition at line 33 of file Application.hpp.
| cae::Application::Application | ( | const ArgsConfig & | argsConfig, |
| const EnvConfig & | envConfig ) |
Construct the Application with given configurations.
| argsConfig | Command line arguments configuration |
| envConfig | Environment variables configuration |
Definition at line 43 of file application.cpp.
References cae::ArgsConfig::config_path, cae::AppConfig::engineConfig, cae::AppConfig::envConfig, cae::PLUGINS::NAME::WINDOW::GLFW, cae::PLUGINS::NAME::SHADER::FRONTEND::GLSL, utl::INFO, utl::Logger::log(), m_appConfig, cae::PLUGINS::NAME::RENDERER::OPENGL, parseEngineConf(), setupEngine(), cae::PLUGINS::NAME::SHADER::IR::SPIRV, cae::MESSAGE::VERSION_MSG, and utl::WARNING.
Here is the call graph for this function:
|
default |
|
delete |
|
delete |
|
private |
main loop
Definition at line 167 of file application.cpp.
References cae::A, cae::D, cae::Down, cae::KeyDown, cae::KeyUp, cae::LCtrl, cae::Left, cae::Right, cae::S, cae::Space, cae::Up, and cae::W.
|
delete |
|
delete |
|
staticprivate |
Parse the engine configuration file.
| path | Path to the engine configuration file |
Definition at line 12 of file conf.cpp.
References cae::Color::a, cae::EngineConfig::audio_master_volume, cae::EngineConfig::audio_muted, cae::Color::b, cae::EngineConfig::camera_direction, cae::EngineConfig::camera_far_plane, cae::EngineConfig::camera_fov, cae::EngineConfig::camera_look_speed, cae::EngineConfig::camera_move_speed, cae::EngineConfig::camera_near_plane, cae::EngineConfig::camera_position, cae::EngineConfig::camera_rotation, utl::Path::existsFile(), cae::Color::g, utl::INFO, utl::Logger::log(), cae::EngineConfig::log_fps, cae::EngineConfig::network_host, cae::EngineConfig::network_port, cae::Color::r, cae::EngineConfig::renderer_clear_color, cae::EngineConfig::renderer_frame_rate_limit, cae::EngineConfig::renderer_vsync, utl::Path::resolveRelativeToCwd(), utl::Path::resolveRelativeToExe(), utl::WARNING, cae::EngineConfig::window_fullscreen, cae::EngineConfig::window_height, cae::EngineConfig::window_icon_path, cae::EngineConfig::window_name, and cae::EngineConfig::window_width.
Referenced by Application().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Setup the engine with the given plugins.
| rendererName | renderer plugin name |
| windowName | window plugin name |
| shaderFrontendName | shader frontend plugin name |
| shaderIRName | shader IR plugin name |
Definition at line 65 of file application.cpp.
References loadPlugins(), utl::Logger::log(), and utl::WARNING.
Referenced by Application().
Here is the call graph for this function:
Here is the caller graph for this function:| void cae::Application::start | ( | ) |
Start the application.
Definition at line 142 of file application.cpp.
References cubeVertices, utl::fileToString(), cae::FRAGMENT, cae::GLSL, utl::Path::resolveRelativeToExe(), and cae::VERTEX.
Here is the call graph for this function:| void cae::Application::stop | ( | ) |
Stop the application.
Definition at line 159 of file application.cpp.
|
private |
Definition at line 86 of file Application.hpp.
Referenced by Application().
|
private |
Definition at line 84 of file Application.hpp.
|
private |
Definition at line 87 of file Application.hpp.
|
private |
Definition at line 83 of file Application.hpp.