Description
Following up our discussion about using Corrade/Magnum or switching over to it. Let's start discussing this further. Official website
Magnum Community
I've dived a little into Corrade+Magnum last week, it's a very interesting framework and Mosra's philosophy+coding style+explanations are awesome. Still he's the only main contributor but he seems very engaged/devowed, surrounded by a few punctual contributors. Magnum seems used by a few coders "internally", but recently some bigger public projects using it have emerged, including a research-ar-app sponsored by Meta, and the seemingly the semi commercial Wonderland engine.
OpenFrameworks vs Magnum
Compared to oF, it really is a middleware as stated: it doesn't ship with lots of graphics utilities and those that are included are high-performance oriented. For my usage this is a good point, not sure about the global Mosaic scope if we want to keep the c++ code as accessible as in oF. The community seems smaller but active, there are less "integrations" (=ofxAddons). It's compiled using cmake by default, which OF isn't... it's not far from makefiles (a little obscure and rigid) but compiling multiple configurations becomes very flexible with it. Other compilers might be supported. I'm not sure how well both oF+Corrade would fuse together. Also, Magnum is very well namespaced which makes code really clean and reusable (more like Cinder compared to oF), on the other hand this makes coding new stuff less accessible to beginners (for example: you might get very verbose compile errors when you simply forget to include a header; in oF you simply #include "ofMain.h"
and you're "safe"). Magnum currently is stripping out STL dependencies to prevent common c++ mistakes, for example by providing a set of containers adapted to real-time-graphics related computing, rather then trying to implement optimised version of stl containers... Just to illustrate how Magnum keeps optimisation and simplicity in mind. I've already learned a lot out of Magnum !
Mosaic + Corrade (+Magnum)
There are a few interesting components in Corrade which could provide functionality in Mosaic that we are having difficulties to implement in Mosaic.
-
Plugins
There are multiple options to compile and load them (hardcoded, static, dynamic). I've already been able to draw to ImGui from a plugin, so that's a good sign. And their footprint is really small. -
Interconnect
I'm not sure yet how the internal implementation is done, the syntax is very similar to the listener model (like in oF), but providing full type consistency and references (no pointers). We'll see if this is useful or not for out usage. -
Other ?
Check out all available integrations here.
Then there's the question of what do we use in Mosaic and how do we implement it ?
- If we stick to oF, we'll probably use just Corrade (plugin manager + interconnect[signals+slots] + utilities).
- If we choose to release oF from Mosaic and switch to Magnum, I guess we'll have a stability gain, and maybe mosaic-plugins will still be able to integrate oF as a library, or we could provide an optional API for it. However, we'll lose ofxAddons which are quite a lot, but porting the non-graphical-ones to Magnum shouldn't be difficult.
Voilà some thoughts, to be followed :)