Hi!
(Somehow the google groups thing doesn't show this message in the UI anymore, so I'm replying via e-mail. Not sure what's wrong there, I hope at least this message gets in.)
Thank you for the appreciation! That's quite some motivation boost :)
Plugins -- maybe there's just some misunderstanding. Let me explain: it's either dynamic plugins, which you don't link explicitly to at all (in fact, you *can't* link to them), but they are instead found (or tried to be found) on predefined paths on the filesystem and then loaded using dlopen(). The predefined path is coming from CMake variable MAGNUM_PLUGINS_DIR that you can change easily from CMake and also depends on whether you have a Debug or Release build. Or there are static plugins (compiled as static libraries), that you *do* explicitly link to. But, in addition to that, one also needs to explicitly import them from the code, because otherwise the static linker just doesn't see any reason to link the library in. That's done with the CORRADE_IMPORT_PLUGIN() macro. Here's a documentation that hopefully explains everything in enough detail:
http://doc.magnum.graphics/magnum/plugins.html#plugins-static (if it doesn't or you find something wrong/confusing, please tell me
how to improve it -- feedback on the docs is very appreciated).
Great to read about the student joining -- all contributions are welcome, especially examples.
Hearing about nanogui for the first time -- looks nice, except for the dependencies, yeah :) Just FYI, if this would be maybe an easier way, there's already a port of "Dear ImGUI" (
https://github.com/ocornut/imgui ) for Magnum at
https://github.com/denesik/MagnumImguiPort -- just a rough version, though. The plan is to integrate it in the magnum-integration repository, but it needs quite some work with automated tests, docs etc.
Oh and I'm also working on a "builtin" UI library for Magnum -- it's in the extras repo here:
https://github.com/mosra/magnum-extras and here's a tiny WebGL 2 demo:
http://magnum.graphics/tmp/ui/ . This one is trying a bit different approach to all the other libraries, trying to be very efficient at render time. It was made as a "minimum viable product" for an internal project at a company I was working for until now, so the documentation is lacking a bit and it's quite basic on features. I will be extending it more soon so it can be used in the example code and elsewhere.
Regards
mosra
______________________________________________________________
> Od: Andy Somogyi <
andy.s...@gmail.com>
> Komu: Vladimír Vondruš <
mo...@centrum.cz>
> Datum: 24.06.2017 22:11
> Předmět: Re: [magnum] Evaluating magnum as a graphics backend for our project
>
> CC: <
magnum...@googlegroups.com>
>Hi all
>
>Magnum looks very very promising, and I think this is most like the direction I’ll go with.
>
>Things I like:
>
>* active development and community
>* very smart design, I really like how meshes / shaders are handled.
>* small, and relatively easy to step through, debug and understand. This is big one, because that means I can actually fix things it (if need be).
>* modularity is nice.
>
>I’ve created a self-contained magnum-examples, that uses git submodules to include magnum, corrade and magnum-examples at:
>
>
https://github.com/AndySomogyi/magnum-bootstrap/tree/base
>
>I’m having a few issues with dynamic libraries and plugins on MacOS. It build fine either way, however, I can’t seem to get dynamic linking to work when I create CMake makefile build, issue with @rpath not found, however dynamic linking works fine with Xcode builds. This is something I’ll have to look closer into. It’s not really a big deal for me, and I only plan on using static linking.
>
>I’ve not been able to get static plugins to work with the examples. I’ve added
>
>target_link_libraries(magnum-textured-triangle
> Magnum::Application
> Magnum::Magnum
> Magnum::TgaImporter)
>
>Seems to build OK, but fails with:
>
>"PluginManager::Manager::load(): plugin TgaImporter is not static and was not found in lib/magnum-d/importers"
>
>I’m presently stepping through this code to see what’s going on. When built statically, stepping into AbstractManager.cpp here
>
>
> 67 auto AbstractManager::initializeGlobalPluginStorage() -> GlobalPluginStorage& {
> 68 static GlobalPluginStorage* const plugins = new GlobalPluginStorage;
> 69
> 70 /* If there are unprocessed static plugins for this manager, add them */
> 71 if(staticPlugins()) {
>-> 72 for(StaticPlugin* staticPlugin: *staticPlugins()) {
> 73 /* Load static plugin metadata */
> 74 Resource r("CorradeStaticPlugin_" + staticPlugin->plugin);
>
>it gets to line 71, but never enters the loop to processes static plugins, which tells me that the static plugins are not loading correctly.
>
>In resoruce_TgaImporter.cpp, if I put a breakpoint on line 24:
>
> 22 int resourceInitializer_TgaImporter();
> 23 int resourceInitializer_TgaImporter() {
>-> 24 Corrade::Utility::Resource::registerData("CorradeStaticPlugin_TgaImporter", 1, resourcePositions, resourceFilenames, nullptr);
> 25 return 1;
> 26 } CORRADE_AUTOMATIC_INITIALIZER(resourceInitializer_TgaImporter)
>
>It never stops there, indicating the static constructor never gets called.
>
>On a side note, I’ve got a student who’s going to work for me over the summer, I think I’m going to have him create some more examples with Magnum, and work on writing up some more docs. Another I think interesting small project I could have him work on is I’ve taken a look at nanogui, a rather nice, simple OpenGL GUI:
>
>
https://github.com/AndySomogyi/nanogui
>
>Unfortunately, it seems to be abandoned by it’s maintainers, and one of the issues I have with it is that it has a lot of dependencies, particularly on Eigen. Magnum has literally everything nanogui needs to work, it would be possible to port nanogui to depend only on Magnum.