Skip to content

I3TApplication

#include "I3T.h"

Inherits from Application, IStateful

Public Functions

Name
~I3TApplication() override
virtual voidappendScene(const Memento & memento, State::Scene * scene) override<br>Called on scene append.
virtual voidclearGlobal() override<br>Set the global state to some default empty state.
virtual voidclearScene(bool newScene) override<br>Set the scene state to some default empty state.
virtual voidloadGlobal(const Memento & memento) override<br>Load global state from a memento.
virtual voidloadScene(const Memento & memento, State::Scene * scene) override<br>Called on scene load, undo and redo.
voidloadSettings()
virtual MementosaveGlobal() override<br>Save shared global state.
virtual MementosaveScene(State::Scene * scene) override<br>Save state for the current scene.
voidsaveSettings()

Protected Functions

Name
virtual voidonBeginFrame() override
virtual voidonClose() override
virtual voidonEndFrame() override
virtual voidonInit() override
virtual voidonUpdate(double delta) override

Public Attributes

Name
boolm_debugTrackball <br>Debug switch for WindowManager, toggled in Help > Debug trackball.
boolm_debugWindowManager <br>Debug switch for WindowManager, toggled in Help > Debug window manager.
ApplicationSettingsg_settings

Additional inherited members

Public Functions inherited from Application

Name
virtual~Application()
voidbeginFrame()
voidclose()<br>Shutdown the whole application.
voiddisplay()
voidendFrame()
voidenqueueCommand(ICommand * command)<br>Issue command.
boolframe()<br>Single iteration of the game loop.
AppLoopManager &getAppLoopManager()
doublegetDeltaTime() const
const std::string &getTitle()
GLFWwindow *getWindow()<br>Get the main GLFW window.
boolinit()<br>Performs initialization of the application.
voidinitWindow()<br>Init OpenGL stuffs before display loop.
intrun()<br>Enter main loop.
voidsetTitle(const std::string & title)
voidsetVSync(bool enable)
voidupdate()<br>Perform logic update.
template <typename T ,typename... Args&gt; <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 &gt; <br>T &getModule()

Protected Functions inherited from Application

Name
Application()
virtual voidonBeforeFrame()

Protected Attributes inherited from Application

Name
AppLoopManagerm_appLoopManager
boolm_shouldClose
Window *m_window

Public Functions inherited from IStateful

Name
virtual~IStateful()
MementoemptyMemento()<br>Create an empty memento (rapidjson::Document)

Public Functions Documentation

function ~I3TApplication

cpp
~I3TApplication() override
~I3TApplication() override

function appendScene

cpp
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

cpp
virtual void clearGlobal() override
virtual void clearGlobal() override

Set the global state to some default empty state.

Reimplements: IStateful::clearGlobal

function clearScene

cpp
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

cpp
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

cpp
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

cpp
void loadSettings()
void loadSettings()

function saveGlobal

cpp
virtual Memento saveGlobal() override
virtual Memento saveGlobal() override

Save shared global state.

Reimplements: IStateful::saveGlobal

function saveScene

cpp
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

cpp
void saveSettings()
void saveSettings()

Protected Functions Documentation

function onBeginFrame

cpp
inline virtual void onBeginFrame() override
inline virtual void onBeginFrame() override

Reimplements: Application::onBeginFrame

function onClose

cpp
virtual void onClose() override
virtual void onClose() override

Reimplements: Application::onClose

function onEndFrame

cpp
inline virtual void onEndFrame() override
inline virtual void onEndFrame() override

Reimplements: Application::onEndFrame

function onInit

cpp
virtual void onInit() override
virtual void onInit() override

Reimplements: Application::onInit

function onUpdate

cpp
virtual void onUpdate(
    double delta
) override
virtual void onUpdate(
    double delta
) override

Reimplements: Application::onUpdate

Public Attributes Documentation

variable m_debugTrackball

cpp
bool m_debugTrackball = false;
bool m_debugTrackball = false;

Debug switch for WindowManager, toggled in Help > Debug trackball.

variable m_debugWindowManager

cpp
bool m_debugWindowManager = false;
bool m_debugWindowManager = false;

Debug switch for WindowManager, toggled in Help > Debug window manager.

variable g_settings

cpp
static ApplicationSettings g_settings;
static ApplicationSettings g_settings;

Updated on 2025-05-31 at 12:55:30 +0000