Enabled by default, makes the current Magnum context a thread-local
variable instead of a global one, so it's possible to have multiple
thread-local contexts. Might have some performance implications, that's
why it's possible to disable it (but enabled by default is the safer
option).
GCC 4.7 and Apple platforms don't support thread_local, but __thread
does the job too (though on iOS not until Xcode 7.3). Also had to move
it to file-local because MSVC doesn't like having thread local variables
as part of DLL interface. (And there is *of course* no way to disable
exporting one particular member. F' that.)
Toggles between using CGL/GLX/WGL (requiring running graphical desktop
environment) or EGL (without display attachment) for command-line
utilities and GL tests. Also exposed to the user through
MAGNUM_TARGET_HEADLESS CMake and preprocessor variables.
Uses just EGL and no other platform toolkit, meaning that the same code
can be used on all platforms if the drivers support it. Should be
working for OpenGL ES for most drivers, however desktop OpenGL is
supported only on NVidia since version 355.
As with Corrade, this is not exactly backwards compatible, but for
common use case without OBJECT libraries this should not be a problem.
In any case, recreate the build dir and update your copy of all
Find*.cmake modules to avoid weird things happening.
User-facing changes:
* Documentation of all Find*.cmake modules converted to
reStructuredText to follow official CMake guidelines.
* The newfangled way to use the libraries is to link to Magnum::Shaders
instead of adding ${MAGNUM_SHADERS_INCLUDE_DIRS} to include path and
linking to ${MAGNUM_SHADERS_LIBRARIES}.
* The old ${MAGNUM_*_LIBRARIES} are deprecated and now just expand to
Magnum::* target. Use the target directly. These are also enabled
only when building with MAGNUM_BUILD_DEPRECATED.
* The old ${MAGNUM_*_INCLUDE_DIRS} are removed as the Magnum::* targets
cover these too.
Internal changes:
* Global state such as include_directories() was replaced with
target-specific settings.
Use case: user is calling find_package(Magnum REQUIRED Sdl2Application) in
a toplevel dir and in a subdir. The second call would unset the
MAGNUM_APPLICATION_LIBRARIES which is not correct, because it still is just
that one application.
Also, now instead of unsetting the variables are set to -NOTFOUND so they
produce an error when used as libraries/include directories for a target.
The actual WebGL 2 distinction was done as a part of previous WebGL
cleanup. It compiles, but is completely broken, as Emscripten has some
missing bits to go through at least Context class creation.
It's not needed to manually specify whole component dependency tree,
also each MAGNUM_*_LIBRARIES and MAGNUM_*_INCLUDE_DIRS variable now
lists all external and inter-project dependencies.
For example, if the user requires DebugTools component, it automatically
searches also for all the following components:
MeshTools
Primitives
SceneGraph
Shaders
Shapes
And MAGNUM_DEBUGTOOLS_LIBRARIES contains the following extensive list of
libraries:
MagnumDebugTools
MagnumMeshTools
MagnumPrimitives
MagnumSceneGraph
MagnumShaders
MagnumShapes
Magnum
CorradePluginManager
CorradeUtility
libGL
Currently it failed on "error when trying to open configure.h", which is
NOT a helpful message at all. Now we check for existence of the include
dir before trying to open the file, thus failing with proper "Could NOT
find Magnum" message.