Well, only for CMake 3.13 and newer, by using the SHELL: variant of
INTERFACE_LINK_OPTIONS. In order to stay compatible with older versions,
it needs to be done in FindMagnum.cmake and modifying the global
CMAKE_EXE_LINKER_FLAGS. This case was updated to work properly also with
CMake subprojects.
This took me a while -- the old behavior for all emscripten_*()
functions was to take a DOM element ID as an argument, with nullptr
acting as a "the element that makes most sense for given operation". The
new behavior when -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 is
enabled is to take a CSS selector instead. Presence of this option is
not detectable at compile time, so there was no easy way of knowing
what's the expected value, whether `"module"` or `"#module"`.
After a few failed attempts, I discoverd that using `"#canvas"` would
work for both the old and the new version -- in the new version it would
be selecting an element with id="canvas", while in the old version it
was a special value denoting Module['canvas']. Problem was, however,
that the markup was historically using id="module" and not id="canvas",
so this had to be changed.
This is a breaking change affecting everyone who targets Emscripten. You
need to update the HTML markup and, in case you maintain copies or forks
of the CSS and JS files, these as well. Details in the changelog.
Basically mirroring the API of Trade::AbstractImporter, as that proved
to be useful. The old crazy openSingleData() and openData(horribleStuff)
are deprecated and will be removed in a future release.
No backwards compatibility is provided for font plugins, these need to
be adapted.
It'll get used outside of the root namespace and since the callbacks tend
to be quite complex, it would be silly to require users to implement one
callback for Trade, one for Text and one for Audio, for example.
Allows the Font and FontConverter plugins be built without TARGET_GL
enabled. That was the last piece missing for making the magnum-plugins
repo completely GL-free.
Fixing the new (and now failing test) from the previous commit. In
setIndexBuffer(), I was resetting the state tracker to a VAO state that
was about to be set in the very next step, and then, when doing that
next step the state tracker "optimized away" the state change because it
thought it was already done (even though it wasn't). Reordering the two
operations fixes it.
In comparison to how this was meant to be done in the original
169031fb7b, the new way should do the same
but additionally avoid a bunch of redundant state calls. Let's hope no
more bugs related to this appear.
Also cleaned up the test from naked new. This still needs to be reworked
to not do manual memory management inside (and then deprecate the raw
pointer versions), but for now this has to suffice.
Together with an assorted set of off-by-one changes to tests involving
packing, in addition to the changes done in the previous test cleanup
commit. Now Color3 sRGB conversion rountrips correctly.