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
:
- Inherit :cpp:class:`Gsage::WindowManager` interface. Implement abstract methods:
- Inherit :cpp:class:`Gsage::Window` interface. Implement abstract methods:
- :cpp:func:`Gsage::WindowManager::getWindowHandle` should return native OS window handle.
- :cpp:func:`Gsage::WindowManager::getGLContext` should return open GL pointer. Return 0 if not needed.
- Add register, unregister methods in the plugin:
...
bool MyPlugin::installImpl() {
mFacade->registerWindowManager<MyWindowManager>("MyWindowManager");
return true;
}
...
void MyPlugin::uninstallImpl() {
mFacade->removeWindowManager("MyWindowManager");
}
- Make Gsage load the Plugin and switch to the new WindowManager:
...
"windowManager": {
"type": "MyWindowManager"
}
...
"plugins":
[
...
"MyPlugin"
...
]