Open devshgraphicsprogramming opened 5 years ago
Object initialization.
irr::core needs no global object initialization
irr::system needs IFileSystem to be created
irr::asset only needs an IAssetManager to be created (to exist separately, needs to be created manually)
irr::ui lib needs to set-up a window and some I/O listeners, so that would be the ISDL2Device creation with possibly IFileSystem passed in the constructor
irr::video needs to create our graphics device/context on GL and Vulkan or NULLDriver, so it should take an IAssetManager plus an ISDL2Device (which can be null for headless rendering)
irr::scene is basically exposing and inlining the CSceneManager
irr::system and irr::ui should take-over most of IrrlichtDevice's responsibilities, so it shall perish.
//{ core lib (maths, basic types, allocators, etc.)
//{ system lib (fibers, mutexes, file I/O operations) [DEPENDS: core]
//{ asset lib (importing and exporting meshes, textures and shaders incl. shader compilation) [DEPENDS: system]
//{ ui lib (window set up, software blit, joysticks, multi-touch, keyboard, etc.) [DEPENDS: system]
//{ video lib (access to Graphics API, remote rendering, etc) [DEPENDS: asset, (optional) ui]
//{ scene lib (basic rendering, culling, scene graph etc.) [DEPENDS: video, ui]
Then what used to be the IrrlichtServer target is just a specialized build of the video lib that only includes the stub graphics objects.
This opens the way to gradual ARM cross-compile and Android porting #72