Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.34 KB

8_custom_windowing.rst

File metadata and controls

56 lines (39 loc) · 1.34 KB

Custom Window Manager

Gsage Engine allows you to implement new windowing managers.
Current main windowing system is SDL.
WindowManager is optional, it is possible to let render system create windows on it's own.

Steps to register new WindowManager:

  1. Inherit :cpp:class:`Gsage::WindowManager` interface. Implement abstract methods:
  2. Inherit :cpp:class:`Gsage::Window` interface. Implement abstract methods:
  3. Add register, unregister methods in the plugin:
...

bool MyPlugin::installImpl() {
  mFacade->registerWindowManager<MyWindowManager>("MyWindowManager");
  return true;
}

...

void MyPlugin::uninstallImpl() {
  mFacade->removeWindowManager("MyWindowManager");
}
  1. Make Gsage load the Plugin and switch to the new WindowManager:
...
"windowManager": {
  "type": "MyWindowManager"
}

...
"plugins":
[
...
"MyPlugin"
...
]