Changelog

See also:

Changes since 2020.06

Dependency changes

  • Minimal supported CMake version is now 3.5, changed from 3.4, since CMake 3.27+ warns if a compatibility with CMake below 3.5 is requested. Older versions are not supported anymore and all workarounds for them were removed. This is a conservative change, as there are no known supported distributions which would have anything older than 3.5.
  • Minimal supported CMake version for Emscripten WebGL 2 compilation is now 3.13, in order to be able to set linker options for enabling WebGL 2 without having to pollute the global CMAKE_EXE_LINKER_FLAGS variable.
  • Minimal supported Emscripten version is now 1.39.5 which implicitly sets -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1, as the deprecated code paths were removed.

New features

DebugTools library

GL library

Math library

MaterialTools library

  • New MaterialTools library providing various material conversion utilities

MeshTools library

Platform libraries

SceneGraph library

SceneTools library

  • New SceneTools library that'll be a home for various whole-scene optimization algorithms such as hierarchy flattening, redundant node removal and such
  • The magnum-sceneconverter utility now supports whole-scene conversion instead of operating just on single meshes
  • The magnum-sceneconverter utility gained an experimental --concatenate-meshes option, which will flatten the mesh hierarchy and concatenate all meshes together. Note that it doesn't correctly handle all corner cases yet and may assert on certain inputs.
  • Added a --phong-to-pbr option to the magnum-sceneconverter utility to perform conversion of Phong materials to PBR, useful for example when converting old OBJ and COLLADA files to glTF
  • The magnum-sceneconverter --info output is now more compact and colored for better readability
  • Added --info-importer, --info-converter and --info-image-converter options to magnum-sceneconverter, listing plugin features and configuration file contents

Shaders library

ShaderTools library

Text library

TextureTools library

Trade library

Vk library

Changes and improvements

Animation library

Audio library

DebugTools library

GL library

Math library

MeshTools library

Platform libraries

SceneGraph library

SceneTools library

  • Added a --bounds option to magnum-sceneconverter, showing data ranges of known attributes
  • magnum-sceneconverter now has separate --info-animations, --info-images, --info-lights, --info-cameras, --info-materials, --info-meshes, --info-skins and --info-textures for printing information just about particular data type, with --info being a shortcut for all specified together
  • Added a --object-hierarchy option to magnum-sceneconverter that visualizes scene hierarchy in each scene by indenting object info
  • Added a --prefer option to magnum-sceneconverter, allowing to specify what plugins should be preferred for particular import and conversion plugin aliases
  • Added a --set option to magnum-sceneconverter, allowing to set configuration options to arbitrary plugins

Shaders library

  • In the original implementation of normal mapping in Shaders::PhongGL, there shader didn't provide a way to supply bitangent direction, forcing users to patch normal maps. This is now possible using newly added Shaders::PhongGL::Tangent4, Shaders::PhongGL::Bitangent attributes and a Shaders::PhongGL::Flag::Bitangent flag, implementing support for both four-component tangents (used by glTF, for example) and separate tangent and bitangent direction (used by Assimp).
  • Added missing Shaders::MeshVisualizerGL*D::setObjectId() and a corresponding Shaders::MeshVisualizerDrawUniform*D::objectId member for UBO workflows. Originally the uniform wasn't present with the assumption that users could easily adjust color map offset to achieve the same effect. That was however unnecessarily annoying and error-prone in cases where it's essential to have the same object IDs from multiple draws have a matching color, and it was complicating multidraw workflows as the color map offset was not a part of per-draw data, but rather material data.

Text library

TextureTools library

Trade library

Build system

  • The oldest supported Clang version is now 6.0 (available on Ubuntu 18.04), or equivalently Apple Clang 10.0 (Xcode 10). Oldest supported GCC version is still 4.8.
  • Fixed compilation of the GL library on macOS with ANGLE — new code assumed macOS is always desktop GL (see mosra/magnum#452)
  • Avoiding conflicts of Magnum's own GL headers with GLES3/gl32.h (see mosra/magnum#460)
  • The version.h header now gets populated from Git correctly also when inside a CMake subproject
  • Suppressed a warning specific to MinGW GCC 8+ (see mosra/magnum#474)
  • Attempted a switch of Emscripten build on Travis CI from macOS to Ubuntu + Docker for 2x faster build times in a futile attempt to not use the extremely expensive features of a no-longer-free service. Ultimately, Travis banned everyone from using their CI and so all Linux, macOS, Emscripten, Android and iOS builds were migrated from Travis to Circle CI, together with adding also an explicit ARM64 build and an ability to test GLES and Vulkan functionality on Android. See mosra/magnum#350 and mosra/magnum#523.
  • UseEmscripten is no longer implicitly included on Emscripten as it's not needed for anything (see mosra/magnum#490)
  • Fixed an assertion in AnySceneImporter when meshAttributeName() or meshAttributeForName() was called without a file opened
  • ObjImporter uses exceptions internally and needs an explicit exception-enabling flag when built with Emscripten 1.39.0 and newer
  • It's now possible to use <PackageName>_ROOT to point to install locations of dependencies such as Corrade on CMake 3.12+, in addition to putting them all together inside CMAKE_PREFIX_PATH. See also mosra/magnum#614.
  • On CMake 3.16 and newer, FindMagnum.cmake can provide additional details if some component is not found.
  • The Homebrew package now uses std_cmake_args instead of hardcoded build type and install prefix, which resolves certain build issues (see mosra/homebrew-magnum#6)
  • Various changes to Vcpkg packages to account for newly added libraries and plugin interfaces (mosra/magnum#485)
  • The FindSDL2.cmake module was updated to allow using SDL2 as a subproject. See the Platform::Sdl2Application docs for more information. See also mosra/magnum#496.
  • With CMake 3.20 and newer it's possible to compile for Android NDK r19+ without explicitly supplying various system paths. Additionally, when CMAKE_INSTALL_PREFIX points to Android NDK sysroot, the LIB_SUFFIX gets autodetected to a correct triplet + API level version subdirectory, making the installed project discoverable by both vanilla CMake and Gradle. On CMake 3.16 to 3.19 it's required to set two extra variables for the same effect. See Cross-compiling for Android, Android and mosra/magnum#310 for more information.
  • Suppressing a CMake policy-related warning if the global CMAKE_AUTOMOC is set on CMake 3.10+ (see mosra/magnum#504)
  • Updated Debian build instructions to pass --no-sign to dpkg-buildpackage, avoiding a confusing error message that might lead people to think the packaging failed (see mosra/magnum-plugins#105)
  • Due to STL removal in Corrade::PluginManager, deprecated APIs in Trade library that use std::string stopped compiling on MSVC as there was no remaining transitive #include <string> left (see mosra/magnum#556)
  • Changed handling of CMAKE_*_OUTPUT_DIRECTORY to make plugins pick it up also if only e.g. CMAKE_RUNTIME_OUTPUT_DIRECTORY is set, but not ARCHIVE or LIBRARY_OUTPUT_DIRECTORY. Similarly it now also handles config-specific CMAKE_*_OUTPUT_DIRECTORY_<CONFIG> variables. See mosra/magnum#486 and mosra/magnum#570.
  • Fixed wrong .gitattributes option for LF line endings in MSYS PKGBUILDs (see mosra/magnum#574)
  • Added MAGNUM_DISTANCEFIELDCONVERTER_STATIC_PLUGINS, MAGNUM_FONTCONVERTER_STATIC_PLUGINS, MAGNUM_IMAGECONVERTER_STATIC_PLUGINS, MAGNUM_SCENECONVERTER_STATIC_PLUGINS and MAGNUM_SHADERCONVERTER_STATIC_PLUGINS CMake options for linking static plugins to the command-line utilities. See Enabling or disabling features for more information.
  • The FindSDL2.cmake module now looks for SDL2-static and SDL2-staticd as well (see mosra/magnum#594 and mosra/magnum#613)
  • Fixed a typo in a CMake option name (see mosra/magnum#599)
  • Worked around a MSVC2022 bug with constexpr conversion operators if C++20 is used, causing most Math tests to fail compilation (see mosra/magnum#602)
  • Fixed various variable shadowing warings on MSVC (see mosra/magnum#611)
  • Fixed compilation on a non-deprecated build (see mosra/magnum#612)
  • Fixed build of the Vk library with CORRADE_STANDARD_ASSERT
  • On Windows there's a new MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS_DLL_NAME CMake option to aid MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS in cases where Corrade is only linked to a DLL but not the main executable.
  • It's now possible to build dynamic libraries on Android and Emscripten with the usual options. Static libraries are still a default but it isn't enforced anymore. See mosra/magnum#617.
  • The Emscripten toolchain now prefers include directory located in the Emscripten cache, which as of Emscripten 3.0.4 contains the version.h header. See mosra/corrade#133 and also Including files directly from the emscripten source tree is not supported for troubleshooting info.
  • The Emscripten toolchain now uses the -flto flag instead of --llvm-lto, which was specific to the fastcomp backend that's removed as of Emscripten 2.0, and sets up correct emar to be used for LTO. See mosra/toolchains#13, mosra/toolchains#14 and mosra/magnum#490.
  • The Emscripten toolchain now looks for lib*.a files in addition to *.bc for better compatibility with 3rd party toolchains and package managers like Vcpkg (see mosra/magnum#520).
  • The Emscripten build now uses --js-library instead of inline EM_ASM() for calling into JavaScript. This allows it to properly specify its runtime dependencies without risking breakages when new Emscripten versions make more JS API functions optional, and circumvents the need for users to specify -s EXPORTED_FUNCTIONS on their side. See mosra/magnum#619.
  • Fixed build of Platform::EmscriptenApplication on Emscripten 3.1.49 and newer (see mosra/magnum#631)
  • The Emscripten toolchain no longer uses a *.bc extension for static libraries, as that breaks builds with version 3.1.52+. See mosra/magnum#633 for more information.
  • Fixed most remaining warnings on MSVC, in particular those related to "conversion from T to void * of greater size" (see mosra/magnum#544).
  • The android_create_apk() CMake function gained an ability to copy resources and assets to the APK. See the corresponding Android platform documentation and mosra/toolchains#10 for more information

Bug fixes

Deprecated APIs

Potential compatibility breakages, removed APIs

Documentation

2020.06

Released 2020-06-27, tagged as v2020.06.

New features

Animation library

Audio library

DebugTools library

GL library

Math library

MeshTools library

Platform libraries

Primitives library

SceneGraph library

Shaders library

  • New Shaders::MeshVisualizer2D for 2D mesh visualization
  • Tangent space visualization in Shaders::MeshVisualizer3D
  • Object, vertex and primitive ID visualization in Shaders::MeshVisualizer2D and Shaders::MeshVisualizer3D
  • Texture coordinate transformation in Shaders::DistanceFieldVector, Shaders::Flat, Shaders::Phong and Shaders::Vector
  • Ability to render per-instance / per-vertex object ID in Shaders::Flat and Shaders::Phong, in addition to uniform object ID
  • New attribute definitions and an location allocation scheme in Shaders::GenericShaders::Generic::Tangent4, Shaders::Generic::Bitangent, Shaders::Generic::ObjectId plus Shaders::Generic::TransformationMatrix, Shaders::Generic::NormalMatrix and Shaders::Generic::TextureOffset for instancing
  • Instancing in Shaders::Flat and Shaders::Phong

Trade library

Vk library

  • Updated Vulkan headers for version 1.2
  • Conversion of VertexFormat values to the VkFormat enum using Vk::vkFormat(Magnum::VertexFormat)

Changes and improvements

  • The MeshPrimitive type can now store implementation-specific primitive types similarly to PixelFormat and the new VertexFormat. Implementation-specific types are then simply passed through in GL::meshPrimitive() and Vk::vkPrimitiveTopology().
  • The PixelFormat and CompressedPixelFormat enums can now be saved and retrieved from Corrade::Utility::Configuration / Corrade::Utility::Arguments
  • Resource is now nothrow-movable and thus can be used with growable Corrade::Containers::Array instances
  • Reworked plugin search paths to prefer autodetection based on library or executable location where possible and use hardcoded paths only if explicitly specified. See Trade::AbstractImporter::pluginSearchPaths() for more information.
  • Added an ability to disable unique globals across shared libraries using MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS on static builds that don't need it
  • Library version is now exposed through MAGNUM_VERSION_YEAR, MAGNUM_VERSION_MONTH, MAGNUM_VERSION_COMMIT, MAGNUM_VERSION_HASH and MAGNUM_VERSION_STRING preprocessor defines in a new Magnum/version.h header. This header is not included by any other header to avoid trigerring a full rebuild when Git commit changes. If Git is not found, only the first two defines are present.
  • Shaders::MeshVisualizer3D::Flag::Wireframe now implicitly enables Shaders::MeshVisualizer3D::Flag::NoGeometryShader also on WebGL in addition to ES2, since this platform doesn't have a possibility to have geometry shaders either. Same is done for Shaders::MeshVisualizer2D.

Audio library

GL library

Math library

MeshTools library

Platform libraries

Trade library

Build system

  • Fixed a bad interaction between Magnum/Platform/AbstractXApplication.h and Magnum/Platform/GlfwApplication.h (see mosra/magnum#389)
  • FindSDL2.cmake got updated to link to all dependencies when using a statically built SDL on Windows
  • FindSDL2.cmake now links to Metal in addition to other frameworks on iOS and is updated to link to these only if SDL is statically built (see mosra/magnum#410)
  • FindMagnum.cmake now properly recognizes an optional dependency between DebugTools and Trade on GL-less builds
  • Various compiler warning fixes (see mosra/magnum#406)
  • Added a 32-bit Windows build to the CI matrix to avoid random compilation issues (see mosra/magnum#421)
  • The library again compiles and tests cleanly with CORRADE_NO_ASSERT enabled, and this setup is verified on the CI to avoid further regressions
  • Worked around a regression in MSVC 2017 causing a compiler crash (see mosra/magnum#440)
  • Linker fixes for MinGW Clang (see mosra/magnum#417)
  • Properly installing plugin binaries in Gentoo packages (see mosra/magnum-plugins#85)
  • Warning fixes for MSVC (see mosra/magnum#445)
  • FindOpenAL.cmake was rewritten from scratch to support linking against statically built OpenAL Soft (through its CMake config file) as well as OpenAL Soft added as a CMake subproject. Moreover, when using Magnum as a CMake subproject, the Audio library now copies the OpenAL DLL to CMAKE_RUNTIME_OUTPUT_DIRECTORY (if set) as a post-build step. The DLL location, if found, is also available through an OPENAL_DLL_RELEASE variable for use by 3rd party code. See also mosra/magnum#402 and mosra/magnum#412 for more information.
  • Updated Android building and troubleshooting guide to make it work with NDK r19+ and CMake 3.16+. See also mosra/corrade#84 and mosra/magnum#310.
  • Vcpkg packages now ignore features that are incompatible with target platform, allowing vcpkg install magnum[*] to work again. See also mosra/magnum#368 and microsoft/vcpkg#12211.

Bug fixes

Deprecated APIs

Potential compatibility breakages, removed APIs

  • TrackView in the still-experimental Animation library was changed to allow mutable access to the keys & values it references. Existing code needs to be changed to say TrackView<const K, const V> instead of TrackView<K, V>. Following this change, Trade::AnimationData now also return instances with const types and the non-const Trade::AnimationData::data() was renamed to mutableData().
  • The 4-argument GL::DynamicAttribute constructor was not marked as explicit by mistake, it's done now to enforce readability in long expressions.
  • The Magnum/Math/FunctionsBatch.h header is no longer included from Magnum/Math/Functions.h for backwards compatibility in order to speed up compile times.
  • Trade::AnimationTrackData constructors are now explicit as that enforces better readability in long initializer expressions
  • Non-const Trade::ImageData::data() and Trade::ImageData::pixels() were renamed to Trade::ImageData::mutableData() and Trade::ImageData::mutablePixels() to follow the new Trade::MeshData API and similar changes in Trade::AnimationData.
  • Platform::GlfwApplication::setMinWindowSize() / Platform::GlfwApplication::setMaxWindowSize() and equivalent APIs in Platform::Sdl2Application now premultiply the value with dpiScaling() to work independently on display DPI. This might break existing uses.
  • Primitives::uvSphereWireframe() now correctly asserts when the segments parameter isn't divisible by four. Before it mistakenly asserted only if segments wasn't divisible by two, and now code that mistakenly used a disallowed value will start asserting.
  • ResourceManager singleton accessible through instance() that was deprecated in 2019.10 is now removed. Usually a deprecated feature is kept for at least a year before removal, but in this case it was severely limiting multithreaded applications and removing it was necessary.
  • Locations of generic shader attributes was changed in order to accommodate for new attributes and use cases. This may break custom shaders if these rely on generic attribute definitions or are used together with MeshTools::compile(). To avoid further breakages you're advised to reuse the definitions from Shaders::Generic (and propagating them to shader code as well) instead of hardcoding the locations directly.
    • Shaders::Generic::Color3 / Shaders::Generic::Color4 location changed from 3 to 2
    • Shaders::Generic::Normal location changed from 2 to 5
    • Shaders::Generic::Tangent location changed from 4 to 3
  • Removed remaining APIs deprecated in version 2018.04:
    • Audio::Buffer::Format, use Audio::BufferFormat instead
    • Shaders::*Vector::setVectorTexture(), Shaders::Flat::setTexture(), Shaders::Phong::setAmbientTexture(), Shaders::Phong::setDiffuseTexture(), Shaders::Phong::setSpecularTexture() and Shaders::Phong::setTextures(), use Shaders::*Vector::bindVectorTexture(), Shaders::Flat::bindTexture(), Shaders::Phong::bindAmbientTexture(), Shaders::Phong::bindDiffuseTexture(), Shaders::Phong::bindSpecularTexture() and Shaders::Phong::bindTextures() instead
  • MeshPrimitive is now four bytes instead of one, to allow wrapping implementation-specific values using meshPrimitiveWrap() and meshPrimitiveUnwrap()
  • MeshPrimitive and MeshIndexType now reserve the zero value to indicate an invalid primitive / type, better catching accidentally forgotten initialization. Valid code shouldn't be affected by this change, but broken code that seemingly worked before might start throwing assertions now. In contrast, SamplerFilter, SamplerMipmap and SamplerWrapping keep the zero value as a reasonable default. This follows a similar change done for PixelFormat and CompressedPixelFormat in 2019.10.

Documentation

2019.10

Released 2019-10-24, tagged as v2019.10.

Dependency changes

  • Minimal supported CMake version is now 3.4. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). This is a conservative change that shouldn't affect any additional distribution compared to the CMake 3.1 requirement in 2019.01.

New features

Audio library

DebugTools library

GL library

Math library

MeshTools library

Platform libraries

Primitives library

SceneGraph library

Shaders library

  • Normal texture support in Shaders::Phong
  • Added Shaders::Generic3D::Tangent generic vertex attribute definition
  • Object ID output in Shaders::Flat and Shaders::Phong
  • Vertex color support in Shaders::Flat and Shaders::Phong

Text library

Trade library

  • The magnum-imageconverter utility now implements new -i / --importer-options and -c / --converter-options command-line options for setting plugin-specific configuration

Changes and improvements

Animation library

Audio library

DebugTools library

GL library

Math library

MeshTools library

Shaders library

  • All shaders now have rendering output tests, making them more robust for future additions and refactorings. See also mosra/magnum#382.
  • Shaders::Phong now clamps the specular factor to minimize artifacts when shininess is near zero
  • Shaders::Phong can now handle zero lights, in which case its output is equivalent to Shaders::Flat3D. See Zero lights for more information.
  • Shaders::MeshVisualizer is fixed to work properly on Intel Windows drivers, adding a new "intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped" workaround

TextureTools library

Platform libraries

Text library

Trade library

Build system

  • MSYS2 packages are now in official repositories, installable directly via pacman
  • Plugin search path on Windows is now discovered relative to location of the Trade, Text or Audio library DLL instead of executable location. That makes it behave better in case Magnum is installed via a package and the installation directory hardcoded at build time doesn't exist on the target machine (which is the case of MSYS2 packages).
  • FindSDL2.cmake was updated to work with MinGW version 2.0.5 and newer, since these dropped the old directory hierarchy. Older versions have both the original and the new hierarchy, so it should work with these as well.
  • When using Magnum as a CMake subproject, Platform::GlfwApplication and Platform::Sdl2Application now copy the GLFW / SDL2 DLLs to CMAKE_RUNTIME_OUTPUT_DIRECTORY (if set) as a post-build step. The DLL location, if found, is also available through GLFW_DLL and SDL2_DLL_RELEASE / SDL2_DLL_DEBUG variables for use by 3rd party code. See also mosra/magnum#347 for more information.
  • Updated extremely outdated Emscripten boilerplate from the base-emscripten bootstrap project (the HTML markup was unchanged since 2013, heh)
  • ES 2.0 and ES 3.0 subset of tests requiring GL context is now run on Travis CI using SwiftShader for better code coverage (see mosra/magnum#207)
  • On CMake 3.13 and up, WebGL2 build on Emscripten (and the -s USE_WEBGL2=1 flag in particular) is now handled by the FindOpenGLES3.cmake module and the new INTERFACE_LINK_OPTIONS property instead of FindMagnum.cmake. On older versions this is handled in FindMagnum.cmake by modifying the global CMAKE_EXE_LINKER_FLAGS variable.
  • It's now possible to use Magnum as a CMake subproject also when building for Emscripten (see mosra/magnum#219)
  • Updated the Vcpkg package to work correctly with Vcpkg's own SDL2 (see Microsoft/vcpkg#5730)
  • Updated bundled GL headers to properly define the GL_VERSION_* macros to avoid conflicting GLintptr and GLsizeiptr type definitions on Windows when using Magnum together with Qt
  • It's now possible to override CMake's OpenGL_GL_PREFERENCE from outside on systems where GLVND doesn't work properly (before the build scripts and FindMagnum.cmake always forced GLVND)
  • FindMagnum.cmake now correctly finds debug versions of statically built plugins when using Vcpkg
  • FindEGL.cmake, FindOpenAL.cmake, FindOpenGLES2.cmake and FindOpenGLES3.cmake now explicitly link to the GL and openal libraries on Emscripten, which is needed for MINIMAL_BUILD
  • FindOpenGLES2.cmake and FindOpenGLES3.cmake don't require GL ES headers to be installed on the system anymore, as Magnum uses its own copies
  • Fixed linking of static Any* plugins when the libraries are otherwise build as dynamic
  • Removed mention of the outdated Ubuntu PPA from Downloading and building as it doesn't seem to be maintained anymore (see mosra/magnum-examples#61)
  • Worked around a bug in the NVCC compiler on Windows involving Math::RectangularMatrix::DiagonalSize to make Magnum usable with CUDA (see mosra/magnum#345)
  • Fixed a 64-to-32-bit conversion warning on MSVC in GL::Mesh internals (see mosra/magnum#352)
  • Emscripten builds now have the -fPIC option disabled by default as it causes linker errors related to __memory_base on 1.38.36 (see also emscripten-core/emscripten#8761)
  • Fixed the Magnum::Application, Magnum::WindowlessApplication and Magnum::GLContext aliases in FindMagnum.cmake to propagate the values from the target they alias also across directories, instead of failing with e.g.

    Error evaluating generator expression:
    
    $<TARGET_PROPERTY:Magnum::Sdl2Application,INTERFACE_INCLUDE_DIRECTORIES>
    
    Target "Magnum::Sdl2Application" not found.
    

Bug fixes

Documentation

Deprecated APIs

Potential compatibility breakages, removed APIs

  • Configuration value parsers and writers for Math types were moved to a dedicated Magnum/Math/ConfigurationValue.h header in order to speed up compile times. Backwards compatibility is not provided, when using Math types with Corrade::Utility::Configuration or Corrade::Utility::Arguments you have to include the header explicitly
  • Audio::Extension::extensions() and GL::Extension::extensions() now return a Corrade::Containers::ArrayView instead of a reference to std::vector in order to reduce binary bloat and compile times
  • Removed all aliases to GL library functionality in the root namespace (and root include path) which were deprecated in 2018.04 and everything related to this change:
    • GL::Mesh::IndexType and GL::Mesh::indexSize(), use GL::MeshIndexType and GL::Mesh::indexTypeSize() instead
  • Removed Primitives::Capsule2D, Primitives::Capsule3D, Primitives::Circle, Primitives::Crosshair2D, Primitives::Crosshair3D, Primitives::Cube, Primitives::Cylinder, Primitives::Icosphere, Primitives::Line, Primitives::Plane, Primitives::Square and Primitives::UVSphere classes deprecated in 2018.04. The same functionality is available through free functions in the Primitives namespace, use those instead.
  • Removed templated overloads of GL::Buffer::data(), GL::Buffer::subData() and GL::Buffer::map() deprecated since 2017. Use the non-templated versions together with Corrade::Containers::arrayCast().
  • Removed GL::Context::DetectedDriver::AMD and GL::Context::DetectedDriver::ProbablyAngle aliases deprecated since 2017, use consistently-named GL::Context::DetectedDriver::Amd and GL::Context::DetectedDriver::Angle instead
  • Removed GL::CubeMapTexture::Coordinate deprecated since 2016, use GL::CubeMapCoordinate instead
  • Removed remaining Platform::*Application constructors taking nullptr instead of NoCreate, deprecated since 2017
  • Removed compatibility code in Audio::Context where Audio::Context::current() would be usable with both . and ->, deprecated since 2017
  • Removed Audio::Context::hrtfSpecifier() deprecated since 2018.02. Use Audio::Context::hrtfSpecifierString() instead.
  • Removed the Shapes library together with DebugTools::ShapeRenderer, which was a failed design experiment deprecated since version 2018.10 (see mosra/magnum#148)
  • Removed the Platform::GlutApplication as it was based on an outdated toolkit and deprecated since version 2018.10 (see mosra/magnum#148 and mosra/magnum#195)
  • In order to be compatible with both Emscripten 1.38.27 and the versions before, all Emscripten markup is now expected to have the HTML <canvas> element identified by #canvas. You need to:
    • update your HTML markup to use <canvas id="canvas"> instead of <canvas id="module">
    • in case you have a copy or a fork of the JS driver file, it needs to define Module.canvas as document.getElementById('canvas') (instead of 'module')
    • and for CSS files, all references to #module need to be #canvas now
  • The BUILD_MULTITHREADED CMake option and MAGNUM_BUILD_MULTITHREADED CMake / preprocessor variable has been moved to Corrade — you need to toggle it when building Corrade and use CORRADE_BUILD_MULTITHREADED instead
  • PixelFormat and CompressedPixelFormat now reserve the zero value to indicate an invalid format, better catching accidentally forgotten initialization. Valid code shouldn't be affected by this change, but broken code that seemingly worked before might start throwing assertions now.
  • Shaders::MeshVisualizer now asserts if its wireframe-related setters are called when the Shaders::MeshVisualizer::Flag::Wireframe flag was not set, consistently with other shaders. This might cause failures in code that was calling them unnecessarily before.

2019.01

Released 2019-02-04, tagged as v2019.01.

Dependency changes

  • Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported anymore. Minimal Clang version is now 3.3, since that's the first version with a complete C++11 support. See also mosra/magnum#274.
  • Minimal supported CMake version is now 3.1. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). See also mosra/magnum#274.

New features

Animation library

Math library

Platform libraries

Vk library

Changes and improvements

Audio library

GL library

  • Added a "nv-egl-incorrect-gl11-function-pointers" workaround that explicitly loads OpenGL 1.0 and 1.1 function pointers on contexts created using EGL on NVidia drivers, because there functions such as glGetString() behave incorrectly when linked statically. See also mosra/magnum#308.
  • New GL::Context::State::BindScratchVao state to make external OpenGL code that's not VAO-aware working on core GL profiles (which don't allow default VAOs being used for drawing)

Platform libraries

Text library

TextureTools library

  • Further performance and output quality improvements for TextureTools::DistanceField, making the ES2/WebGL 1 consistent with desktop and speeding up the processing to take only 60% of the time compared to before. It's now also possible to reuse the internal state for batch processing.

Trade library

Build system

Bug fixes

Documentation

Deprecated APIs

Potential compatibility breakages, removed APIs

  • The MeshTools::fullScreenTriangle() function now returns just a GL::Mesh instead of std::pair of a mesh and a buffer, as the buffer is now owned by the mesh. This change was not possible to be done in a backwards-compatible way.
  • Animation::Player, Audio::Listener, GL::AbstractShaderProgram, GL::MeshView and GL::Shader APIs that take a std::initializer_list of references were changed to use Corrade::Containers::Reference instead of a std::reference_wrapper. This change should be fully transparent to the user as the type conversion is done implicitly in both cases, but you may need to add an #include <Corrade/Containers/Reference.h> where appropriate.
  • Removed deprecated implicit conversion Corrade::Containers::Optional to std::optional, deprecated in January 2018. The class now contains an explicit and opt-in STL compatibility, see its documentation for more information. You may need to add an #include <Corrade/Containers/Optional.h> where appropriate.
  • Removed the Magnum/Test/AbstractOpenGLTester.h header that was deprecated in January 2017. Use Magnum/GL/OpenGLTester.h and the GL::OpenGLTester library instead. Note that the deprecated Magnum/OpenGLTester.h header is still present, along with all other deprecated GL-specific headers and APIs in the project root.
  • Removed five-argument Trade::MeshData2D and six-argument Trade::MeshData3D constructors that were deprecated since February
    1. Use the full six/seven-argument versions instead.
  • Removed Platform application constructors taking nullptr, deprecated in June 2016 for windowless apps and in March 2017 for windowed apps. Use constructors taking the NoCreate tag instead.
  • Removed availability of Math::Color3 and Math::Color4 literals in the root namespace, deprecated since April 2016. Explicitly call using namespace Math::Literals; instead.
  • Removed uppercase *HSV APIs from Math::Color3 and Math::Color4, deprecated since December 2016. Use the CamelCased *Hsv APIs instead.
  • Removed Math::normalize() and Math::denormalize() functions, deprecated since December 2016. Use Math::pack() and Math::unpack() instead.
  • Removed Platform::*Application::MouseEvent::Button::WheelUp and Platform::*Application::MouseEvent::Button::WheelDown, deprecated since June 2016. Use the dedicated mouseScrollEvent() API instead.
  • Removed Platform::GlfwApplication::Configuration::WindowFlag::Resizeable, deprecated since February 2017. Use Platform::GlfwApplication::Configuration::WindowFlag::Resizable instead.
  • Removed MAGNUM_*_LIBRARIES and MAGNUM_*_INCLUDE_DIRS CMake variables, which were deprecated in favor of Magnum::* imported targets in February 2016.

2018.10

Released 2018-10-23, tagged as v2018.10.

New features

Animation library

DebugTools library

GL library

Math library

Platform libraries

Primitives library

SceneGraph library

Shaders library

  • New dedicated Shaders::VertexColor::Color3 and Shaders::VertexColor::Color4 attribute specifiers for more convenient distinction between three- and four-component vertex color attribute.
  • Support for multiple lights in Shaders::Phong
  • Classical alpha masking support in Shaders::Flat and Shaders::Phong
  • Debug output for the Shaders::Flat::Flag / Shaders::Flat::Flags, Shaders::MeshVisualizer::Flag / Shaders::MeshVisualizer::Flags and Shaders::Phong::Flag / Shaders::Phong::Flags enums / enum sets

Trade library

  • Trade::AnimationData class and animation import interface in Trade::AbstractImporter::animation() and related functions
  • New Trade::AbstractMaterialData::flags(), Trade::AbstractMaterialData::alphaMode() and Trade::AbstractMaterialData::alphaMask() material properties
  • New Trade::CameraData::type(), Trade::CameraData::aspectRatio() and Trade::CameraData::size() properties, ability to describe 2D cameras
  • Trade::ObjectData2D and Trade::ObjectData3D now support also separate translation / rotation / scaling specification instead of a combined transformation matrix. See Trade::ObjectData2D::transformation() and Trade::ObjectData3D::transformation() for more information.
  • Support for file loading callbacks in Trade::AbstractImporter
  • Debug output for Trade::AbstractImporter::Feature, Trade::AbstractImageConverter::Feature enums and Trade::AbstractImporter::Features, Trade::AbstractImageConverter::Features enum sets
  • AnyImageImporter plugin now supports detection and loading of DDS, EXR, HDR, JPEG, PNG and TGA files from data next to file type detection based on filename
  • AnyImageConverter learned detection of JPEG output
  • AnySceneImporter gained support for animation import

Vk library

Changes and improvements

Audio library

GL library

Math library

MeshTools library

Platform libraries

Shaders library

  • All shaders now have reasonable default values for uniforms in order to further simplify and remove friction from quick prototyping use cases
  • Shaders::Flat::bindTexture(), Shaders::Phong::bindAmbientTexture(), Shaders::Phong::bindDiffuseTexture(), Shaders::Phong::bindSpecularTexture() and Shaders::Phong::bindTextures() now assert that the shader was created with the corresponding flag enabled to prevent accidental "black screen of death" errors.
  • Ambient color in untextured Shaders::Phong now defaults to 0x00000000_rgbaf in order to support alpha-masked drawing out of the box

TextureTools library

  • Fixed TextureTools::distanceField() to not require more than 8 texture units, which is the limit on all iOS ES2 contexts, independently on the device (ES3 contexts have 16).

Trade library

Build system

  • There's now a PPA for Ubuntu packages. See Packages for Debian, Ubuntu and derivatives for more information. See also mosra/magnum#248 and mosra/magnum#249.
  • Fixed various issues preventing to build and use the base libraries with OpenGL support disabled (see mosra/magnum#255)
  • Magnum now links to GLVND on Linux instead of the old libGL ABI if using CMake 3.11 and newer
  • Using official Apple OpenGL include paths on iOS (see mosra/magnum#253)
  • FindMagnum.cmake now allows to use the DebugTools library even if some of its optional dependencies are not compiled in
  • FindSDL2.cmake now properly links to dl and pthread libraries when using a static build of SDL2 on Linux
  • FindSDL2.cmake is now able to properly find a debug build of SDL, which enables Vcpkg to properly copy all dependency DLLs on Windows (see mosra/magnum-examples#42, mosra/magnum-examples#45)
  • FindGLFW.cmake is now preferring GLFW CMake config file to pick up the imported target, if available (see mosra/magnum#194)
  • FindMagnum.cmake now provides full paths to application JS/CSS files on Emscripten builds through new MAGNUM_EMSCRIPTENAPPLICATION_JS, MAGNUM_WINDOWLESSEMSCRIPTENAPPLICATION_JS and MAGNUM_WEBAPPLICATION_CSS CMake variables. These files are now installed unconditionally even if no Platform::*Application library is built to allow them to be used with third-party application implementations.
  • ObjImporter didn't work with CMake subprojects due to an embarrassing typo (see mosra/magnum#259)
  • AnyAudioImporter, AnyImageConverter, AnyImageImporter and AnySceneImporter plugins were not correctly updated for subproject support after moving them out of the magnum-plugins repository
  • Improved out-of-the-box behavior with Emscripten toolchains (see mosra/magnum#283)

Bug fixes

Documentation

Deprecated APIs

Potential compatibility breakages, removed APIs

  • The Shapes library is not built by default anymore due to its deprecated status
  • Audio::Playable is now by default omnidirectional instead of having source in direction of negative Z axis (the direction has effect only when setting inner and outer cone properties of Audio::Source).
  • Math::Matrix3::rotation() const and Math::Matrix4::rotation() const now allow non-uniform scaling, but expect the roation/scaling part to be orthogonal after normalization (before it required uniform scaling but not orthogonal axes) — this might cause imprecise data that were previously working to fail with an assertion. See the new Math::Matrix3::rotationShear() and Math::Matrix4::rotationShear() accessors for a possible solution.
  • Since one-dimensional Math::Range is now used on many new places such as the Animation library, its underlying type is just T instead of Math::Vector<1, T> to make it easier to use. This may break rare existing code that was using one-dimensional ranges or generic code that's always expecting a vector type. See Use in generic code for possible solutions.
  • SceneGraph::Camera::setViewport() and SceneGraph::Camera::draw() are no longer virtual functions. If you need to override their functionality, simply call the subclass implementation directly instead of calling it through a SceneGraph::Camera.
  • Shaders::Flat::bindTexture(), Shaders::Phong::bindAmbientTexture(), Shaders::Phong::bindDiffuseTexture(), Shaders::Phong::bindSpecularTexture() and Shaders::Phong::bindTextures() now assert that the shader was created with the corresponding flag enabled to prevent accidental "black screen of death" errors. This might cause your application to abort if it was calling these functions when not needed.
  • Ambient color in untextured Shaders::Phong now defaults to 0x00000000_rgbaf in order to support alpha-masked drawing out of the box. This may break code that assumed the alpha channel being opaque by default.
  • Trade::PhongMaterialData::ambientColor(), diffuseColor() and specularColor() now return Color4 instead of Color3
  • Applications now expose GL context forward compatibility as an enabled-by-default context flag. Calling Platform::*Application::GLConfiguration::setFlags() (and similarly on windowless apps) will reset that flag, use Platform::*Application::GLConfiguration::addFlags() (And similarly on windowless apps) to preserve the enabled-by-default flags.

Changelogs for previous versions are available in Archived changelogs.