Changelog

Contents

See also:

Changes since 2020.06

New features

DebugTools library

GL library

Math library

MeshTools library

Platform libraries

Shaders library

ShaderTools library

SceneGraph library

Trade library

Vk library

Changes and improvements

DebugTools library

GL library

  • GL::AbstractShaderProgram::draw(), drawTransformFeedback() and dispatchCompute() APIs now return a reference to self and all subclasses in Shaders return a subclass reference from these. The functions used to void as that made more sense in the classic workflow where a large set of uniforms had to be set prior to every draw, however with the new multidraw workflows that's no longer the case and the inability to chain draw calls proved to be annoying.
  • The GL::Context class got significantly optimized in terms of compile time, header size and runtime as well, significantly reducing the amount of allocations done at startup.
  • To make working with cube map images easier, GL::CubeMapTexture::setSubImage() and GL::CubeMapTexture::subImage() taking 3D images are now exposed on all platforms, not just desktop OpenGL 4.5+, with a fall back to slice-by-slice upload/download where needed. The compressed variant is still only GL 4.5+, as that needs the CompressedImageView APIs to be aware of compression format properties, which isn't implemented yet.
  • Added GL::Framebuffer::Status::IncompleteDimensions for ES2. This enum isn't available on ES3 or desktop GL, but NVidia drivers are known to emit it, which is why it got added.
  • Intel/Windows-specific code for silencing useless shader compiler output is now advertised as a "intel-windows-chatty-shader-compiler" workaround, instead of being done silently. See Driver workarounds for more information.
  • Platform::Windowless*Application instances no longer touch default framebuffer state in order to avoid potential race conditions with a windowed context on another thread. This is also exposed via a new GL::Context::Configuration::Flag::Windowless flag for integration with custom-created OpenGL contexts. See also mosra/magnum#493 and mosra/magnum#494.

Math library

  • Added Math::castInto() overloads for casting between UnsignedByte and UnsignedShort or Byte and Short, and for casting between Float and Double
  • Math::RectangularMatrix is now explicitly convertible from matrices of different sizes, with a possibility to specify whether to fill the diagonal or leave it as zeros. This was originally available only on (square) Math::Matrix from other square matrices where it implicitly filled the diagonal to an identity, but is now generalized for arbitrary rectangular matrices, and with the default on Math::RectangularMatrix being zero-fill while Math::Matrix stays with the identity for consistency with other constructors.

MeshTools library

Platform libraries

SceneGraph library

Shaders library

Trade library

Vk library

Build system

  • 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)
  • Switched Emscripten build from macOS to Ubuntu + Docker for 2x faster build times (see mosra/magnum#350)
  • Linux, Emscripten and macOS builds were migrated from Travis to Circle CI
  • UseEmscripten is no longer implicitly included on Emscripten as it's not needed for anything (see mosra/magnum#490)
  • ObjImporter uses exceptions internally and needs an explicit exception-enabling flag when built with Emscripten 1.39.0 and newer
  • 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)

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

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:
  • 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

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.