I3TApplication
#include "I3T.h"
Inherits from Application, IStateful
Public Functions
Name | |
---|---|
~I3TApplication() override | |
virtual void | appendScene(const Memento & memento, State::Scene * scene) override<br>Called on scene append. |
virtual void | clearGlobal() override<br>Set the global state to some default empty state. |
virtual void | clearScene(bool newScene) override<br>Set the scene state to some default empty state. |
virtual void | loadGlobal(const Memento & memento) override<br>Load global state from a memento. |
virtual void | loadScene(const Memento & memento, State::Scene * scene) override<br>Called on scene load, undo and redo. |
void | loadSettings() |
virtual Memento | saveGlobal() override<br>Save shared global state. |
virtual Memento | saveScene(State::Scene * scene) override<br>Save state for the current scene. |
void | saveSettings() |
Protected Functions
Name | |
---|---|
virtual void | onBeginFrame() override |
virtual void | onClose() override |
virtual void | onEndFrame() override |
virtual void | onInit() override |
virtual void | onUpdate(double delta) override |
Public Attributes
Name | |
---|---|
bool | m_debugTrackball <br>Debug switch for WindowManager, toggled in Help > Debug trackball. |
bool | m_debugWindowManager <br>Debug switch for WindowManager, toggled in Help > Debug window manager. |
ApplicationSettings | g_settings |
Additional inherited members
Public Functions inherited from Application
Name | |
---|---|
virtual | ~Application() |
void | beginFrame() |
void | close()<br>Shutdown the whole application. |
void | display() |
void | endFrame() |
void | enqueueCommand(ICommand * command)<br>Issue command. |
bool | frame()<br>Single iteration of the game loop. |
AppLoopManager & | getAppLoopManager() |
double | getDeltaTime() const |
const std::string & | getTitle() |
GLFWwindow * | getWindow()<br>Get the main GLFW window. |
bool | init()<br>Performs initialization of the application. |
void | initWindow()<br>Init OpenGL stuffs before display loop. |
int | run()<br>Enter main loop. |
void | setTitle(const std::string & title) |
void | setVSync(bool enable) |
void | update()<br>Perform logic update. |
template <typename T ,typename... Args> <br>T * | createModule(Args &&... args)<br>Creates instance of module, registers it to the application, and calls its init() method. |
Application & | get() |
GLFWwindow * | getCurrentWindow()<br>Get the active GLFW window. |
template <typename T > <br>T & | getModule() |
Protected Functions inherited from Application
Name | |
---|---|
Application() | |
virtual void | onBeforeFrame() |
Protected Attributes inherited from Application
Name | |
---|---|
AppLoopManager | m_appLoopManager |
bool | m_shouldClose |
Window * | m_window |
Public Functions inherited from IStateful
Name | |
---|---|
virtual | ~IStateful() |
Memento | emptyMemento()<br>Create an empty memento (rapidjson::Document) |
Public Functions Documentation
function ~I3TApplication
~I3TApplication() override
~I3TApplication() override
function appendScene
inline virtual void appendScene(
const Memento & memento,
State::Scene * scene
) override
inline virtual void appendScene(
const Memento & memento,
State::Scene * scene
) override
Called on scene append.
Parameters:
- scene The current scene
- memento Scene state to appended
Reimplements: IStateful::appendScene
function clearGlobal
virtual void clearGlobal() override
virtual void clearGlobal() override
Set the global state to some default empty state.
Reimplements: IStateful::clearGlobal
function clearScene
inline virtual void clearScene(
bool newScene
) override
inline virtual void clearScene(
bool newScene
) override
Set the scene state to some default empty state.
Parameters:
- newScene Whether to perform basic new scene initialization.
Reimplements: IStateful::clearScene
function loadGlobal
virtual void loadGlobal(
const Memento & memento
) override
virtual void loadGlobal(
const Memento & memento
) override
Load global state from a memento.
Parameters:
- memento New global state
Reimplements: IStateful::loadGlobal
function loadScene
inline virtual void loadScene(
const Memento & memento,
State::Scene * scene
) override
inline virtual void loadScene(
const Memento & memento,
State::Scene * scene
) override
Called on scene load, undo and redo.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
- memento New scene state
Reimplements: IStateful::loadScene
function loadSettings
void loadSettings()
void loadSettings()
function saveGlobal
virtual Memento saveGlobal() override
virtual Memento saveGlobal() override
Save shared global state.
Reimplements: IStateful::saveGlobal
function saveScene
virtual Memento saveScene(
State::Scene * scene
) override
virtual Memento saveScene(
State::Scene * scene
) override
Save state for the current scene.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
Reimplements: IStateful::saveScene
The scene parameter should contain a scene object for full filesystem saves and nullptr for quick undo/redo operations.
function saveSettings
void saveSettings()
void saveSettings()
Protected Functions Documentation
function onBeginFrame
inline virtual void onBeginFrame() override
inline virtual void onBeginFrame() override
Reimplements: Application::onBeginFrame
function onClose
virtual void onClose() override
virtual void onClose() override
Reimplements: Application::onClose
function onEndFrame
inline virtual void onEndFrame() override
inline virtual void onEndFrame() override
Reimplements: Application::onEndFrame
function onInit
virtual void onInit() override
virtual void onInit() override
Reimplements: Application::onInit
function onUpdate
virtual void onUpdate(
double delta
) override
virtual void onUpdate(
double delta
) override
Reimplements: Application::onUpdate
Public Attributes Documentation
variable m_debugTrackball
bool m_debugTrackball = false;
bool m_debugTrackball = false;
Debug switch for WindowManager, toggled in Help > Debug trackball.
variable m_debugWindowManager
bool m_debugWindowManager = false;
bool m_debugWindowManager = false;
Debug switch for WindowManager, toggled in Help > Debug window manager.
variable g_settings
static ApplicationSettings g_settings;
static ApplicationSettings g_settings;
Updated on 2025-05-31 at 12:55:30 +0000