You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3470 lines
209 KiB

/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace Magnum {
/** @page changelog Changelog
@tableofcontents
See also:
- @subpage changelog-plugins "Plugins changelog"
- @subpage changelog-integration "Integration changelog"
- @subpage changelog-extras "Extras changelog"
- @subpage changelog-examples "Examples changelog"
@section changelog-latest Changes since 2020.06
@subsection changelog-latest-new New features
- MSVC 2022 support. See also [mosra/corrade#124](https://github.com/mosra/corrade/issues/124)
and [mosra/magnum#552](https://github.com/mosra/magnum/issues/552).
- New @ref NoAllocate constructor tag, to be used by the @ref Vk library
- New @ref DefaultInit constructor tag, simply an alias to the existing
@ref Corrade::DefaultInit tag
- New @ref PixelFormat::Depth16Unorm, @relativeref{PixelFormat,Depth24Unorm},
@relativeref{PixelFormat,Depth32F}, @relativeref{PixelFormat,Stencil8UI},
@relativeref{PixelFormat,Depth16UnormStencil8UI},
@relativeref{PixelFormat,Depth24UnormStencil8UI},
@relativeref{PixelFormat,Depth32FStencil8UI} generic pixel formats,
including mapping to @ref GL::PixelFormat / @ref GL::PixelType,
@ref GL::TextureFormat and @ref Vk::PixelFormat and (partial) support in
@ref DebugTools::CompareImage
- New @ref Degh, @ref Radh, @ref Range1Dh, @ref Range2Dh and @ref Range3Dh
typedefs for half-float angles and ranges
- New @ref Range1Dui, @ref Range2Dui and @ref Range3Dui typedefs for unsigned
integer ranges
@subsubsection changelog-latest-new-debugtools DebugTools library
- Added @ref DebugTools::ColorMap::coolWarmSmooth() and
@ref DebugTools::ColorMap::coolWarmBent() (see [mosra/magnum#473](https://github.com/mosra/magnum/pull/473))
@subsubsection changelog-latest-new-gl GL library
- New @ref GL::AbstractShaderProgram::draw(Mesh&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&)
overload for data-oriented multi-draw workflows without @ref GL::MeshView
and internal temporary allocations
- Implemented ANGLE- and WebGL-specific instanced multidraw with
@ref GL::AbstractShaderProgram::draw(Mesh&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&, const Containers::StridedArrayView1D<const UnsignedInt>&).
It's added mainly in order to provide a fast rendering path on
resource-constrainted systems and as such doesn't have an overload taking
@ref GL::MeshView instances or a fallback path when the multidraw
extensions are not available.
- New @ref GL::Context::Configuration class providing runtime alternatives to
the `--magnum-log`, `--magnum-gpu-validation`, `--magnum-disable-extensions`
and `--magnum-disable-workarounds` command line options. The class is then
inherited by all @ref Platform::Sdl2Application::GLConfiguration "Platform::*Application::GLConfiguration"
and @ref Platform::WindowlessEglApplication::Configuration "Platform::Windowless*Application::Configuration"
classes.
- The `--magnum-gpu-validation` option accepts a new value, `no-error`, which
creates OpenGL contexts without error reporting. Those may result in better
performance on certain drivers, however note that errors on such context
have undefined behavior and may cause stability issues. This option is also
programatically settable via a new
@ref GL::Context::Configuration::Flag::GpuValidationNoError flag.
- Implemented @gl_extension{EXT,texture_norm16} and
@webgl_extension{EXT,texture_norm16} ES and WebGL extensions, making
normalized 16-bit texture and renderbuffer formats available on all
platforms
- The @gl_extension{EXT,texture_sRGB_RG8} extension is now available on
desktop OpenGL as well, exposing a two-component sRGB format in addition to
the already present one-, three- and four-component formats
- Implemented @webgl_extension{WEBGL,blend_equation_advanced_coherent}
extension, making advanced @ref GL::Renderer::BlendEquation values
available on all platforms
- Implemented @webgl_extension{EXT,frag_depth} WebGL 1.0 extension (shading
language only)
- Implemented @webgl_extension{WEBGL,debug_renderer_info} as
@ref GL::Context::rendererStringUnmasked() and
@relativeref{GL::Context,vendorStringUnmasked()} together with printing
those in the engine startup log if the extension is available and expanding
the capabilities of @ref GL::Context::detectedDriver() on WebGL. It also
resulted in a new @cpp "firefox-deprecated-debug-renderer-info" @ce
workaround being added, see @ref opengl-workarounds for more info.
- Recognizing @webgl_extension{EXT,float_blend} and
@webgl_extension{WEBGL,debug_shaders} extensions, no implementation done
yet
- Recognizing ANGLE GLES and WebGL base vertex, base instance and multi-draw
extensions and using them in @ref GL::AbstractShaderProgram::draw(Mesh&)
and @ref GL::AbstractShaderProgram::draw(Containers::ArrayView<const Containers::Reference<MeshView>>):
- @gl_extension{EXT,draw_elements_base_vertex}
- @gl_extension{OES,draw_elements_base_vertex}
- @m_class{m-doc-external} [ANGLE_multi_draw](https://chromium.googlesource.com/angle/angle/+/master/extensions/ANGLE_multi_draw.txt)
- @m_class{m-doc-external} [ANGLE_base_vertex_base_instance](https://chromium.googlesource.com/angle/angle/+/master/extensions/ANGLE_base_vertex_base_instance.txt)
- @webgl_extension{WEBGL,multi_draw}
- @webgl_extension{WEBGL,draw_instanced_base_vertex_base_instance}
- @webgl_extension{WEBGL,multi_draw_instanced_base_vertex_base_instance}
- Recognizing @m_class{m-doc-external} [ANGLE_compressed_texture_etc](https://chromium.googlesource.com/angle/angle/+/master/extensions/ANGLE_compressed_texture_etc.txt)
OpenGL ES and @webgl_extension{WEBGL,compressed_texture_etc} WebGL
extensions, making ETC and EAC @ref GL::CompressedPixelFormat and
@ref GL::TextureFormat values available also on OpenGL ES 2.0 and WebGL.
The values were already present in WebGL 2.0 builds by accident before,
without documenting corresponding extension requirements.
- Added a @ref GL::AbstractTexture::target() getter to simplify interaction
with raw GL code
- Exposed @gl_extension{ARB,buffer_storage} as
@ref GL::Buffer::setStorage() together with additions to
@ref GL::Buffer::MapFlag
- A new @cpp "nv-egl-crashy-query-device-attrib" @ce workaround for a crash
happening during EGL initialization in recent NVidia drivers. See
@ref opengl-workarounds and [mosra/magnum#491](https://github.com/mosra/magnum/pull/491)
for more information.
5 years ago
- A new @cpp "angle-chatty-shader-compiler" @ce workaround for silencing
useless linker output on ANGLE. See @ref opengl-workarounds for more
information.
- A new @cpp "android-generic-hostname-might-be-swiftshader" @ce workaround
needed for testing against Android Emulator SwiftShader GPU. See
@ref opengl-workarounds for more information.
- A new @cpp "angle-instanced-attributes-always-draw-instanced" @ce
workaround for ANGLE's draw validation bug, where it complained about
instanced buffers being too small when drawing such mesh as non-instanced.
See @ref opengl-workarounds for more information, see also
[mosra/magnum#539](https://github.com/mosra/magnum/pull/539).
@subsubsection changelog-latest-new-math Math library
- Added @ref Math::fmod() (see [mosra/magnum#454](https://github.com/mosra/magnum/pull/454))
- Added @ref Math::binomialCoefficient() (see [mosra/magnum#461](https://github.com/mosra/magnum/pull/461))
- Added @ref Math::popcount()
- New @ref Math::DualComplex::from(const Complex<T>&, const Vector2<T>&) and
@ref Math::DualQuaternion::from(const Quaternion<T>&, const Vector3<T>&)
functions mirroring @ref Math::Matrix3::from(const Matrix2x2<T>&, const Vector2<T>&)
and @ref Math::Matrix4::from(const Matrix3x3<T>&, const Vector3<T>&) to
create a transformation from a rotation and translation part (see
[mosra/magnum#471](https://github.com/mosra/magnum/pull/471))
- Added @ref Math::Matrix4::orthographicProjection(const Vector2<T>&, const Vector2<T>&, T, T)
and @ref Math::Matrix3::projection(const Vector2<T>&, const Vector2<T>&) to
match the classic `glOrtho()` and `gluOrtho2D()` APIs, complementing
@ref Math::Matrix4::perspectiveProjection(const Vector2<T>&, const Vector2<T>&, T, T)
that got added in 2019.10
- Added @ref Math::Intersection::rayRange() (see [mosra/magnum#484](https://github.com/mosra/magnum/pull/484))
- Added @ref Math::RectangularMatrix::RectangularMatrix(IdentityInitT, T)
constructor as it might be useful to create non-square identity matrices as
well
- Added @ref Math::Distance::pointPoint() and
@ref Math::Intersection::pointCircle() /
@relativeref{Math::Intersection,pointSphere()}, which are just wrappers
over trivial code but easier to discover
@subsubsection changelog-latest-new-meshtools MeshTools library
- New @ref MeshTools::boundingSphereBouncingBubble() algorithm for
calculating a tight bounding sphere for a mesh, along with a trivial
@ref MeshTools::boundingRange() for AABBs (see [mosra/magnum#557](https://github.com/mosra/magnum/pull/557))
- Added @ref MeshTools::generateQuadIndices() for quad triangulation
including non-convex and non-planar quads
- New @ref MeshTools::filterOnlyAttributes() and
@ref MeshTools::filterExceptAttributes() utilities for filtering mesh data
attribute lists
- New family of @ref MeshTools::transform2D(), @ref MeshTools::transform3D()
and @ref MeshTools::transformTextureCoordinates2D() APIs for converting
positions, normals, tangents, bitangents and texture coordinates directly
in @ref Trade::MeshData instances
@subsubsection changelog-latest-new-platform Platform libraries
- It's now possible to have multiple @ref Platform::EmscriptenApplication
canvases on a single page (see [mosra/magnum#480](https://github.com/mosra/magnum/pull/480),
[mosra/magnum#481](https://github.com/mosra/magnum/pull/481))
- Added @relativeref{Platform::WindowlessEglContext,release()} as a
counterpart to @relativeref{Platform::WindowlessEglContext,makeCurrent()}
to all @cpp Platform::Windowless*Context @ce classes. Useful for
transferring OpenGL contexts between threads, see also
[mosra/magnum#495](https://github.com/mosra/magnum/pull/495).
- Implemented @relativeref{Platform::WindowlessEglApplication,Configuration::Flag::NoError}
in @ref Platform::WindowlessEglApplication,
@ref Platform::WindowlessGlxApplication,
@ref Platform::WindowlessWglApplication,
@ref Platform::WindowlessWindowsEglApplication and
@ref Platform::Sdl2Application
@subsubsection changelog-latest-new-scenegraph SceneGraph library
- Added @ref SceneGraph::Object::move()
@subsubsection changelog-latest-new-scenetools SceneTools library
- New @ref SceneTools library that'll be a home for various whole-scene
optimization algorithms such as hierarchy flattening, redundant node
removal and such
- The @ref magnum-sceneconverter "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.
- The @ref magnum-sceneconverter "magnum-sceneconverter" `--info` output is
now more compact and colored for better readability
@subsubsection changelog-latest-new-shaders Shaders library
- All builtin shaders now have opt-in support for uniform buffers on desktop,
OpenGL ES 3.0+ and WebGL 2.0, including multi-draw functionality for
massive driver overhead reduction. The @ref shaders overview page was
updated with an introduction the new features.
- @ref Shaders::FlatGL and @ref Shaders::PhongGL now support texture arrays,
available also in multi-draw and instanced scenarios
- @ref Shaders::FlatGL and @ref Shaders::PhongGL now support object ID
textures in addition to uniform and per-vertex object ID
- @ref Shaders::MeshVisualizerGL2D and @ref Shaders::MeshVisualizerGL3D now
supports object ID textures same as @ref Shaders::FlatGL and
@ref Shaders::PhongGL, including also support for object ID texture
transformation, instanced texture offset and texture arrays
- Support for instanced drawing in @ref Shaders::MeshVisualizerGL2D and
@ref Shaders::MeshVisualizerGL3D for better feature parity with the other
sahders
- Added @ref Shaders::PhongGL::setNormalTextureScale(), consuming the
recently added @ref Trade::MaterialAttribute::NormalTextureScale material
attribute
- @ref Shaders::PhongGL was reworked to support directional and
range-attenuated point lights to follow the additions to
@ref Trade::LightData
- Added @ref Shaders::PhongGL::setLightSpecularColors() for better control
over specular highlights
- Added @ref Shaders::PhongGL::Flag::NoSpecular as a significantly faster
alternative to setting specular color to @cpp 0x00000000_rgbaf @ce in case
specular highlights are not desired
@subsubsection changelog-latest-new-shadertools ShaderTools library
- New @ref ShaderTools library that provides a
@ref ShaderTools::AbstractConverter plugin interface for shader validation,
conversion, compilation and optimization; together with a
@ref ShaderTools::AnyConverter "AnyShaderConverter" plugin and a
@ref magnum-shaderconverter "magnum-shaderconverter" utility
@subsubsection changelog-latest-new-trade Trade library
- A new, redesigned @ref Trade::MaterialData class allowing to store custom
material attributes as well as more material types together in a single
instance; plus new @ref Trade::FlatMaterialData,
@ref Trade::PbrMetallicRoughnessMaterialData,
@ref Trade::PbrSpecularGlossinessMaterialData and
@ref Trade::PbrClearCoatMaterialData convenience accessor APIs similar to
@ref Trade::PhongMaterialData. See [mosra/magnum#459](https://github.com/mosra/magnum/pull/459).
- Added @ref Trade::PhongMaterialData::hasSpecularTexture(),
@ref Trade::PhongMaterialData::specularTextureSwizzle(),
@ref Trade::PhongMaterialData::normalTextureScale() and
@ref Trade::PhongMaterialData::normalTextureSwizzle() to make new features
added for PBR materials recognizable also in classic Phong workflows.
- A completely redesigned @ref Trade::SceneData class that stores data of
the whole scene in a data-oriented way, allowing for storing custom fields
as well. See [mosra/magnum#525](https://github.com/mosra/magnum/pull/525).
- New @ref Trade::SkinData class and @ref Trade::AbstractImporter::skin2D() /
@ref Trade::AbstractImporter::skin3D() family of APIs for skin import, as
well as support in @ref Trade::AnySceneImporter "AnySceneImporter"
- 1D and 3D image support in @ref Trade::AbstractImageConverter
- @ref Trade::LightData got extended to support light attenuation and range
parameters as well and spot light inner and outer angle
- @ref Trade::AbstractImporter, @ref Trade::AbstractImageConverter and
@ref Trade::AbstractSceneConverter now has @relativeref{Trade::AbstractImporter,addFlags()} and
@relativeref{Trade::AbstractImporter,clearFlags()} convenience helpers that
are encouraged over @relativeref{Trade::AbstractImporter,setFlags()} as it
avoid accidentally clearing default flags potentially added in the future.
- New @ref Trade::AbstractImporter::openMemory() function for passing
non-temporary memory to the importer, allowing the implementations to avoid
allocating an internal copy; for benchmarking and testing purposes it's
also exposed via a `--map` option in the
@ref magnum-sceneconverter "magnum-sceneconverter" and
@ref magnum-imageconverter "magnum-imageconverter" utilities
- Ability to convert also 1D and 3D images with the
@ref magnum-imageconverter "magnum-imageconverter" utility, as well as
combining layers into images of one dimension more (or vice versa) and
creating multi-level images from separate input files
- The @ref magnum-imageconverter "magnum-imageconverter" `--info` output is
now more compact and colored for better readability
@subsubsection changelog-latest-new-vk Vk library
- Boostrapping Vulkan support ([mosra/magnum#234](https://github.com/mosra/magnum/pull/234)), in particular:
- @ref Vk::LayerProperties, @ref Vk::InstanceExtensionProperties and
@ref Vk::enumerateInstanceVersion() APIs for querying instance-level
properties
- @ref Vk::DeviceProperties and @ref Vk::ExtensionProperties for querying
device-level properties
- @ref Vk::Instance and @ref Vk::Device APIs for instance and device
creation and fetching instance/device-specific function pointers,
@ref Vk::Queue setup. See also [mosra/magnum#549](https://github.com/mosra/magnum/pull/549).
- @ref Vk::CommandPool and @ref Vk::CommandBuffer wrappers
- Initial implementations of @ref Vk::Memory, @ref Vk::Buffer and
@ref Vk::Image
- @ref Vk::Shader wrapper
- New @ref magnum-vk-info "magnum-vk-info" utility, a Vulkan-specific
counterpart for @ref magnum-gl-info "magnum-gl-info"
- @ref vulkan "Initial documentation", in particular @ref vulkan-support,
@ref vulkan-wrapping and @ref vulkan-mapping
@subsection changelog-latest-changes Changes and improvements
- Added @ref MeshPrimitive::Meshlets as a placeholder for future meshlet
support in @ref Trade::MeshData
- @ref MeshIndexType was enlarged to 32 bits and can now wrap
implementation-specific values similar to @ref PixelFormat,
@ref CompressedPixelFormat, @ref VertexFormat and @ref MeshPrimitive
@subsubsection changelog-latest-changes-debugtools DebugTools library
- @ref DebugTools::bufferData() and @ref DebugTools::bufferSubData() now
falls back to @ref GL::Buffer::subData() on desktop GL instead of always
relying on memory-mapping, and is now available on WebGL 2 as well (see
[mosra/magnum#560](https://github.com/mosra/magnum/pull/560))
- @ref DebugTools::CompareImage now supports comparing half-float pixel
formats as well
@subsubsection changelog-latest-changes-gl GL library
- @ref GL::AbstractShaderProgram::draw(),
@relativeref{GL::AbstractShaderProgram,drawTransformFeedback()} and
@relativeref{GL::AbstractShaderProgram,dispatchCompute()} APIs now return
a reference to self and all subclasses in @ref Shaders return a subclass
reference from these. The functions used to @cpp void @ce 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.
- Added an @ref GL::AbstractShaderProgram::setTransformFeedbackOutputs()
overload taking a @relativeref{Corrade,Containers::ArrayView} instead of
a @ref std::initializer_list
- @ref GL::Buffer::data() and @ref GL::Buffer::subData() is now available on
WebGL 2.0 as well if Emscripten 2.0.17+ is used (see
[mosra/magnum#560](https://github.com/mosra/magnum/pull/560))
- The @ref 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,
@ref GL::CubeMapTexture::setSubImage() and
@ref 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 @ref CompressedImageView APIs to be aware of compression
format properties, which isn't implemented yet.
- Added @ref 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 @cpp "intel-windows-chatty-shader-compiler" @ce
workaround, instead of being done silently. See @ref opengl-workarounds for
more information.
- @ref Platform::WindowlessEglApplication "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 @ref GL::Context::Configuration::Flag::Windowless
flag for integration with custom-created OpenGL contexts. See also
[mosra/magnum#493](https://github.com/mosra/magnum/pull/493) and
[mosra/magnum#494](https://github.com/mosra/magnum/pull/494).
- The @ref GL::defaultFramebuffer global now deduplicates its state when a
statically-built Magnum is linked to multiple shared libraries, following
what the global @ref GL::Context::current() already does
4 years ago
- Added @ref GL::Framebuffer::InvalidationAttachment::DepthStencil to
complement @relativeref{GL::Framebuffer::InvalidationAttachment,Depth} and
@relativeref{GL::Framebuffer::InvalidationAttachment,Stencil} (see
[mosra/magnum#554](https://github.com/mosra/magnum/pull/554))
@subsubsection changelog-latest-changes-math Math library
- Added @ref Math::castInto() overloads for casting between @ref UnsignedByte
and @ref UnsignedShort or @ref Byte and @ref Short, from and to
@ref UnsignedLong / @ref Long, between integral types and @ref Double and
for casting between @ref Float and @ref Double
- @ref 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)
@ref 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 @ref Math::RectangularMatrix being
zero-fill while @ref Math::Matrix stays with the identity for consistency
with other constructors.
- @ref Math::Bezier::data(), @ref Math::BoolVector::data(),
@ref Math::Complex::data(), @ref Math::CubicHermite::data(),
@ref Math::Dual::data(), @ref Math::DualComplex::data(),
@ref Math::DualQuaternion::data(), @ref Math::Frustum::data(),
@ref Math::Quaternion::data(), @ref Math::Range::data(),
@ref Math::RectangularMatrix::data() and @ref Math::Vector::data() now
return a reference to a fixed-size array instead of a pointer (i.e.,
@cpp T(&)[size] @ce instead of @cpp T* @ce) for more convenient usage in
APIs that take sized views.
@subsubsection changelog-latest-changes-meshtools MeshTools library
- @ref MeshTools::interleavedLayout(const Trade::MeshData&, UnsignedInt, Containers::ArrayView<const Trade::MeshAttributeData>, InterleaveFlags),
@ref MeshTools::interleave(const Trade::MeshData&, Containers::ArrayView<const Trade::MeshAttributeData>, InterleaveFlags) and
@ref MeshTools::concatenate(Containers::ArrayView<const Containers::Reference<const Trade::MeshData>>, InterleaveFlags)
optionally take a @ref MeshTools::InterleaveFlags parameter affecting the
output, in particular whether to preserve the original interleaved layout.
@subsubsection changelog-latest-changes-platform Platform libraries
- Added a @ref Platform::GlfwApplication::setWindowIcon() overload taking a
@ref Corrade::Containers::ArrayView in addition to @ref std::initializer_list
- @ref Platform::GlfwApplication now defaults to EGL on
@ref MAGNUM_TARGET_DESKTOP_GLES "non-desktop"
@ref MAGNUM_TARGET_GLES "GLES builds" (see [mosra/magnum#470](https://github.com/mosra/magnum/pull/470))
- On Emscripten, @ref Platform::EmscriptenApplication used an internal
allocation function, which changed signature in 2.0.5 and caused runtime
failures when `-s ASSERTIONS` was enabled. A public stable API is now used
instead, see [mosra/magnum#483](https://github.com/mosra/magnum/pull/483).
- Not too long after the above, Emscripten 2.0.10 doesn't export `dynCall()`
anymore, which caused @ref Platform::EmscriptenApplication to fail at
runtime with an error about `dynCall()` not being defined. A workaround was
put in place that uses `dynCall()` internals, which should be present
always.
- Because hardcoding canvas size using
@ref Platform::EmscriptenApplication::Configuration::setSize() "Platform::Application::Configuration::setSize()"
on WebGL is usually a wrong thing to do, both
@ref Platform::EmscriptenApplication and @ref Platform::Sdl2Application now
notify about that in the verbose output (enabled with `?magnum-log=verbose`),
previously only autodetected canvas size got printed
- Added @ref Platform::WindowlessIosContext::glContext() for consistency with
other context classes
- Undefining even more noise from `Xlib.h` (see
[mosra/magnum#498](https://github.com/mosra/magnum/pull/498))
- Added @ref Platform::EmscriptenApplication::Configuration::addWindowFlags()
and @ref Platform::EmscriptenApplication::Configuration::clearWindowFlags()
for consistency with other application implementations
- Added @ref Platform::Sdl2Application::KeyEvent::Key::CapsLock,
@relativeref{Platform::Sdl2Application::KeyEvent::Key,ScrollLock},
@relativeref{Platform::Sdl2Application::KeyEvent::Key,NumLock},
@relativeref{Platform::Sdl2Application::KeyEvent::Key,PrintScreen},
@relativeref{Platform::Sdl2Application::KeyEvent::Key,Pause} and
@relativeref{Platform::Sdl2Application::KeyEvent::Key,Menu} for consistency
with @ref Platform::EmscriptenApplication and
@ref Platform::GlfwApplication (see [mosra/magnum#547](https://github.com/mosra/magnum/pull/547))
5 years ago
@subsubsection changelog-latest-changes-scenegraph SceneGraph library
- @ref SceneGraph trees are now destructed in a way that preserves
@ref SceneGraph::Object::parent() links up to the root as well as
@ref SceneGraph::AbstractFeature::object() references
@subsubsection changelog-latest-changes-scenetools SceneTools library
- Added a `--bounds` option to @ref magnum-sceneconverter "magnum-sceneconverter",
showing data ranges of known attributes
- @ref magnum-sceneconverter "magnum-sceneconverter" now has separate
`--info-animations`, `--info-images`, `--info-lights`, `--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
@subsubsection changelog-latest-changes-shaders Shaders library
- In the original implementation of normal mapping in @ref 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
@ref Shaders::PhongGL::Tangent4, @ref Shaders::PhongGL::Bitangent
attributes and a @ref 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 @ref Shaders::MeshVisualizerGL3D::setObjectId() "Shaders::MeshVisualizerGL*D::setObjectId()"
and a corresponding @ref Shaders::MeshVisualizerDrawUniform3D::objectId
"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.
@subsubsection changelog-latest-changes-trade Trade library
- A changed signature of the @ref Trade::AbstractImporter::doOpenData(Containers::Array<char>&&, DataFlags)
function and a new @ref Trade::DataFlag::ExternallyOwned flag that allows
importers to reason about ownership of passed data instead of being forced
to allocate a local copy, saving as much as half memory in certain
importer implementations
- @ref Trade::AbstractImageConverter::doConvertToFile() and
@ref Trade::AbstractSceneConverter::doConvertToFile() are now
@cpp protected @ce instead of @cpp private @ce to allow calling them from
plugin implementations and reuse the provided fallback to
@relativeref{Trade::AbstractImageConverter,doConvertToData()}, for example
when the implementation only neeeds to do a format detection based on file
extension
- Recognizing BMP and TIFF file header magic in @relativeref{Trade,AnyImageImporter}
- Recognizing KTX2 files and data in @relativeref{Trade,AnyImageImporter} and
@relativeref{Trade,AnyImageConverter} (see also
[mosra/magnum#529](https://github.com/mosra/magnum/pull/529))
- Recognizing KTX2 for (compressed) 1D/2D/3D and multi-level 1D/2D/3D images
in @relativeref{Trade,AnyImageConverter}
- Recognizing 3MF files in @relativeref{Trade,AnySceneImporter}
- @ref Audio::AnyImporter "AnyAudioImporter",
@relativeref{Trade,AnyImageImporter}, @relativeref{Trade,AnyImageConverter},
@relativeref{Trade,AnySceneImporter}, @relativeref{Trade,AnySceneConverter}
and @ref ShaderTools::AnyConverter "AnyShaderConverter" are now capable of
propagating configuration options to the concrete plugin, which is useful
mainly when using @ref magnum-imageconverter and other utilities as you can
now specify just the `-i` / `-c` options without having to specify which
plugin to apply the option to with `-I` / `-C`. For better usability, the
plugins also warn if the user specifies and option that is not present in
the target implementation.
- @relativeref{Trade,AnyImageImporter} and
@relativeref{Trade,AnySceneImporter} now can propagate also file callbacks
to the concrete plugin.
- @relativeref{Trade,AnyImageConverter} now implements also conversion of 3D
and multi-level 2D/3D images for formats that support it (such as Basis
Universal or OpenEXR)
- Added @ref Trade::PhongMaterialData::hasCommonTextureTransformation(),
@ref Trade::PhongMaterialData::ambientTextureMatrix(),
@ref Trade::PhongMaterialData::diffuseTextureMatrix(),
@ref Trade::PhongMaterialData::specularTextureMatrix() and
@ref Trade::PhongMaterialData::normalTextureMatrix() exposing also
per-texture coordinate transformation, similarly to per-texture coordinate
sets added in 2020.06
- Added @ref Trade::PhongMaterialData::hasCommonTextureCoordinates() and
@ref Trade::PhongMaterialData::commonTextureCoordinates() exposing a
common texture coordinate set as a complement to a per-texture property
added in 2020.06
- @ref Trade::MeshData now allows strided index buffers and zero and negative
attribute strides for better data layout flexibility. This is however not
commonly supported by GPU APIs and tools like @ref MeshTools::compile()
assert in that case.
- Added @ref Trade::MeshData::findAttributeId() for an ability to check that
an attribute exists and retrieve its ID in a single step, avoiding a double
lookup compared to @relativeref{Trade::MeshData,hasAttribute()} +
@relativeref{Trade::MeshData,attributeId()}. This also makes the API
consistent with @ref Trade::SceneData::findFieldId().
- Added @ref Trade::MeshData::attributeId() that returns ID of an attribute
in a set of attributes of the same name
- Added @ref Trade::TextureType::Texture1DArray,
@relativeref{Trade::TextureType,Texture2DArray} and
@relativeref{Trade::TextureType,CubeMapArray} in order to be able to
distinguish what's the intended texture use, e.g. whether it's a 3D texture
with filtering along Z or if it's a 2D array with discrete slices.
- @ref magnum-imageconverter "magnum-imageconverter" has a new `--in-place`
option for converting images in-place
- In order to reduce the amount of exported symbols, a single no-op
@relativeref{Corrade,Containers::Array} deleter function was used for
various types via a @cpp reinterpret_cast @ce. But in an effort to be
UBSan-clean, this is no longer done. See also [mosra/magnum#531](https://github.com/mosra/magnum/issues/531).
@subsubsection changelog-latest-changes-vk Vk library
- @ref Vk::hasVkSamplerAddressMode() and @ref Vk::vkSamplerAddressMode() now
recognizes @ref SamplerWrapping::MirrorClampToEdge
@subsection changelog-latest-buildsystem Build system
- Fixed compilation of the @ref GL library on macOS with ANGLE --- new code
assumed macOS is always desktop GL (see [mosra/magnum#452](https://github.com/mosra/magnum/issues/452))
- Avoiding conflicts of Magnum's own GL headers with `GLES3/gl32.h` (see
[mosra/magnum#460](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/magnum/issues/350) and
[mosra/magnum#523](https://github.com/mosra/magnum/issues/523).
- `UseEmscripten` is no longer implicitly included on Emscripten as it's not
needed for anything (see [mosra/magnum#490](https://github.com/mosra/magnum/issues/490))
- @ref Trade::ObjImporter "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](https://github.com/mosra/homebrew-magnum/pull/6))
- Various changes to Vcpkg packages to account for newly added libraries and
plugin interfaces ([mosra/magnum#485](https://github.com/mosra/magnum/issues/485))
- The `FindSDL2.cmake` module was updated to allow using SDL2 as a
subproject. See the @ref Platform-Sdl2Application-usage "Platform::Sdl2Application docs"
for more information. See also [mosra/magnum#496](https://github.com/mosra/magnum/issues/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 @ref building-cross-android, @ref platforms-android and
[mosra/magnum#310](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/magnum/pull/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](https://github.com/mosra/magnum-plugins/issues/105))
- Due to STL removal in @ref Corrade::PluginManager, deprecated APIs in
@ref Trade library that use @ref std::string stopped compiling on MSVC as
there was no remaining transitive @cpp #include <string> @ce left (see
[mosra/magnum#556](https://github.com/mosra/magnum/pull/556))
@subsection changelog-latest-bugfixes Bug fixes
- @ref GL::Context move constructor was not marked @cpp noexcept @ce by
accident and it was also not really moving everything properly, especially
when delayed creation was done on the moved-to object
- @ref GL::OpenGLTester::addBenchmarks() taking a setup/teardown function
passed the arguments to the base @relativeref{Corrade,TestSuite::Tester}
implementation in a wrong order, failing to compile if this function was
used in a test
- @ref GL::Renderer::MemoryBarrier::ShaderStorage had an incorrect value
- @ref GL::Shader limit queries for a particular shader stage on desktop were
out-of-bounds array accesses, causing wrong or random values being returned
for most shader-related limits
- Fixed assertions related to OpenGL driver workarounds when the proprietary
AMDGPU PRO drivers are used on Linux
- Fixed an assertion when using @ref MeshTools::removeDuplicates() on an
interleaved @ref Trade::MeshData that included padding at the beginning or
end of each vertex
- Fixed a silly mistake where there was no @cpp extern template @ce for a
@ref Frustumd debug printer but two declarations for the float version
instead (see [mosra/magnum#545](https://github.com/mosra/magnum/issues/545))
- Fixed @ref MeshTools::compile() to properly take into account index buffer
offsets
- Fixed @ref MeshTools::removeDuplicates() to not take into account random
padding bytes and filtered-out attributes in interleaved source
@ref Trade::MeshData. This was a particularly glaring issue when using
@ref magnum-sceneconverter "magnum-sceneconverter" with both
`--only-attributes` and `--remove-duplicates` specified together, where it
usually just didn't remove any duplicate whatsoever while
`--remove-duplicates-fuzzy` did, no matter how ridiculously low epsilon
was used.
- @ref Platform::EmscriptenApplication randomly created antialiased contexts
due to an uninitialized variable in its
@ref Platform::EmscriptenApplication::GLConfiguration "GLConfiguration"
- Creating @ref Platform::WindowlessEglApplication again after it was
destroyed could fail with an error saying "cannot make the previous context
current" on certain system. This was due to EGL not destroying the context
if it's still made current.
- Fixed handling of @ref Platform::Sdl2Application::InputEvent::Modifier::Super,
which was misreported as @relativeref{Platform::Sdl2Application::InputEvent::Modifier,Alt} (see
[mosra/magnum#547](https://github.com/mosra/magnum/pull/547))
- For meshes with multiple sets of vertex attributes (such as texture
coordinates), @ref MeshTools::compile() should be using only the first set
but it wasn't.
- @ref Shaders::MeshVisualizerGL3D "Shaders::MeshVisualizerGL*D" shader
compilation failed on OpenGL ES 3.2 with missing @glsl gl_PrimitiveID @ce
due to GLSL ES 3.20 not being properly used for the @glsl #version @ce
directive
- @ref Shaders::MeshVisualizerGL3D vertex ID visualization didn't work when
enabled together with TBN visualization
- @ref Shaders::PhongGL was normalizing light direction in vertex shader,
causing the fragment-interpolated direction being incorrect with visible
artifacts on long polygons under low light angle
- @ref Shaders::PhongGL wasn't normalizing normals coming from normal textures,
which may have caused slight artifacts due to limited precision of 8-bit
pixel formats
- @ref Text::AbstractFontConverter::exportFontToData() and
@ref Text::AbstractFontConverter::exportGlyphCacheToData() didn't correctly
propagate errors when delegating to
@ref Text::AbstractFontConverter::exportFontToSingleData() /
@ref Text::AbstractFontConverter::exportGlyphCacheToSingleData()
- @ref Trade::MeshData::attributeData(UnsignedInt) const was not correctly
propagating attribute array size, causing array attributes to appear as
non-array
- @ref Trade::MeshData constructor data view range assertions weren't
correctly taking sizes of array attributes into account, leading to meshes
with out-of-range attributes getting silently accepted
- Fixed @ref Platform::GlfwApplication, @ref Platform::Sdl2Application and
@ref Platform::EmscriptenApplication to correctly print app-specified DPI
scaling in its verbose output
- Fixed canvas size setup in @ref Platform::EmscriptenApplication to be the
same in the @ref Platform::EmscriptenApplication::Configuration::WindowFlag::Contextless "Contextless"
case as for a WebGL-enabled context
- Fixed a crash in @ref Platform::GlfwApplication::setCursor() on the
upcoming GLFW 3.4
- @ref SceneGraph::BasicMatrixTransformation2D,
@ref SceneGraph::BasicMatrixTransformation3D,
@ref SceneGraph::BasicRigidMatrixTransformation2D and
@ref SceneGraph::BasicRigidMatrixTransformation3D were broken in the
@ref Magnum::Double "Double" variant. To prevent such cases from happening
in the future, the whole library is now tested for both floats and doubles.
- Fixed @ref magnum-fontconverter "magnum-fontconverter" to properly hook up
image converter plugin manager for cross-manager dependencies, broken since
the removal of global shared manager state in 2020.06 (see
[mosra/magnum#489](https://github.com/mosra/magnum/issues/489))
- Implementation of the @cpp "nv-egl-incorrect-gl11-function-pointers" @ce
@ref opengl-workarounds "OpenGL workaround" could lead to a crash if
@cpp eglQueryString() @ce would return a @cpp nullptr @ce (see
[mosra/magnum#535](https://github.com/mosra/magnum/issues/535))
- Fixed various wrong assumptions about Mac builds being always desktop GLES
(see [mosra/magnum#](https://github.com/mosra/magnum/issues/541))
@subsection changelog-latest-deprecated Deprecated APIs
- The @cpp Array @ce, @cpp Array1D @ce, @cpp Array2D @ce and
@cpp Array3D @ce types that were used exclusively for specifying
@ref SamplerWrapping in various texture APIs are deprecated in favor of
@ref Math::Vector and its subclasses and all existing APIs were switched to
it. The only advantage of this type compared to @ref Math::Vector was that
it provided an implicit constructor from a single value (whereas
@ref Math::Vector has it @cpp explicit @ce), and that's now solved by
simply providing an overload with just a single value where it matters.
It was also commonly confused with @relativeref{Corrade,Containers::Array},
which is a type with totally different semantics. To avoid breaking
existing code, conversion from and to @ref Math::Vector is now provided and
this type is included in all places where it was originally used. For
custom uses, the @relativeref{Corrade,Containers::Array1}, @relativeref{Corrade,Containers::Array2} or
@relativeref{Corrade,Containers::Array3} types provide a suitable
alternative as well.
- Markup styling for Emscripten application was switched to prefer using
CSS classes instead of the @cb{.css} #container @ce, @cb{.css} #sizer @ce,
@cb{.css} #expander @ce, @cb{.css} #listener @ce, @cb{.css} #canvas @ce,
@cb{.css} #log @ce, @cb{.css} #status @ce and
@cb{.css} #status-description @ce IDs as this enables having more than one
application on the page. Styling still supports the IDs for backwards
compatibility, from now the IDs are only required in order to reference
the canvas and status elements from the JS `Module`. See
@ref platforms-html5-apps and [mosra/magnum#481](https://github.com/mosra/magnum/pull/481)
for details.
- Templated variants of @ref DebugTools::bufferData() and
@ref DebugTools::bufferSubData() are deprecated in favor of the
non-templated API together with @relativeref{Corrade,Containers::arrayCast()}.
A similar change was done for @ref GL::Buffer::data() in 2017 already,
unfortunately this helper was missed.
- @cpp DebugTools::GLFrameProfiler @ce is deprecated in favor of
@ref DebugTools::FrameProfilerGL. The new name plays better with IDE
autocompletion and makes the GL-specific class appear next to the
API-independent base in alphabetically sorted lists.
- @cpp Shaders::DistanceFieldVector @ce, @cpp Shaders::Flat @ce,
@cpp Shaders::Generic @ce, @cpp Shaders::MeshVisualizer2D @ce,
@cpp Shaders::MeshVisualizer3D @ce, @cpp Shaders::Phong @ce,
@cpp Shaders::Vector @ce, @cpp Shaders::VertexColor @ce and related 2D/3D
typedefs are deprecated in favor of @ref Shaders::DistanceFieldVectorGL,
@ref Shaders::FlatGL, @ref Shaders::GenericGL,
@ref Shaders::MeshVisualizerGL2D, @ref Shaders::MeshVisualizerGL3D,
@ref Shaders::PhongGL, @ref Shaders::VectorGL, @ref Shaders::VertexColorGL
and correspondingly renamed typedefs to make room for Vulkan shaders and
functionality shared between OpenGL and Vulkan implementation such as
uniform buffer layout definitions
- @ref Shaders::PhongGL::setLightPositions() and
@ref Shaders::PhongGL::setLightPosition() taking three-component vectors
are deprecated in favor of variants taking four-component vectors, where the
last component distinguishes between directional and point lights
- @cpp Shaders::PhongGL::setLightPosition(const Vector3&) @ce is deprecated
in favor of @ref Shaders::PhongGL::setLightPositions() with a single item ---
it's short enough to not warrant the existence of a dedicated overload
- @ref Shaders::PhongGL::setLightColors() and
@ref Shaders::PhongGL::setLightColor() taking four-component colors are
deprecated in favor of variants taking just three-component colors, as the
alpha had no meaningful use anyway.
- @cpp Shaders::PhongGL::setLightColor(const Magnum::Color4&) @ce is deprecated
in favor of @ref Shaders::PhongGL::setLightColors() with a single item ---
it's short enough to not warrant the existence of a dedicated overload
- @cpp Trade::AbstractMaterialData @ce as well as its containing header
`Magnum/Trade/AbstractMaterialData.h` is now a deprecated alias to the new
and more flexible @ref Trade::MaterialData.
- @cpp Trade::LightData::Type::Infinite @ce, originally adapted from the
OpenGEX specification, is deprecated in favor of
@ref Trade::LightData::Type::Directional as that's the more commonly used
term
- @cpp Trade::PhongMaterialData::ambientCoordinateSet() @ce,
@cpp diffuseCoordinateSet() @ce, @cpp specularCoordinateSet() @ce and
@cpp normalCoordinateSet() @ce are deprecated in favor of more consistently
named @ref Trade::PhongMaterialData::ambientTextureCoordinates(),
@ref Trade::PhongMaterialData::diffuseTextureCoordinates() "diffuseTextureCoordinates()",
@ref Trade::PhongMaterialData::specularTextureCoordinates() "specularTextureCoordinates()"
and @ref Trade::PhongMaterialData::normalTextureCoordinates() "normalTextureCoordinates()"
- @ref Trade::PhongMaterialData constructor is deprecated as the designated
way is to populate the @ref Trade::MaterialData class directly instead.
- @cpp Trade::PhongMaterialData::textureMatrix() @ce is deprecated in favor
of @ref Trade::PhongMaterialData::hasCommonTextureTransformation() and
@ref Trade::PhongMaterialData::commonTextureMatrix(), which do proper
checking and fallback in case a per-texture transformation is present
- @cpp Trade::MaterialData::type() @ce (coming from the original
`AbstractMaterialData` class) is deprecated in favor of
@ref Trade::MaterialData::types(), as a material data can now contain
attributes for multiple different material types at once
- @cpp Trade::MaterialData::flags() @ce (coming from the original
`AbstractMaterialData` class), @cpp Trade::PhongMaterialData::flags() @ce
and related enum (sets) are deprecated. The flags are no longer stored
directly but rather generated on-the-fly from attribute data, which makes
them less efficient than calling @ref Trade::MaterialData::hasAttribute()
etc.
- @ref Trade::SceneData constructor taking a @ref std::vector of 2D and 3D
children is deprecated in favor of the new scene representation. Use
@ref Trade::SceneData::SceneData(SceneMappingType, UnsignedLong, Containers::Array<char>&&, Containers::Array<SceneFieldData>&&, const void*)
instead.
- @cpp Trade::SceneData::children2D() @ce and
@cpp Trade::SceneData::children3D() @ce are deprecated in favor of the
new scene representation. Use @ref Trade::SceneData::childrenFor() with
@cpp -1 @ce passed as the @p object argument to get a list of top-level
objects.
- @cpp Trade::ObjectData*D @ce, @cpp Trade::MeshObjectData*D @ce classes,
@cpp Trade::ObjectInstanceType*D @ce, @cpp Trade::ObjectFlag*D @ce,
@cpp Trade::ObjectFlags*D @ce enums and the corresponding
@cpp Trade::AbstractImporter::object*DCount() @ce,
@cpp Trade::AbstractImporter::object*DForName() @ce,
@cpp Trade::AbstractImporter::object*DName() @ce and
@cpp Trade::AbstractImporter::object*D() @ce accessor APIs are deprecated
in favor of the unified representation in @ref Trade::SceneData and the
@ref Trade::AbstractImporter::objectCount(),
@relativeref{Trade::AbstractImporter,objectForName()} and
@relativeref{Trade::AbstractImporter,objectName()} accessors that are
shared for 2D and 3D.
- @ref Trade::AbstractImporter::material() now returns
@ref Corrade::Containers::Optional instead of a @ref Corrade::Containers::Pointer,
as the new @ref Trade::MaterialData class isn't polymorphic anymore. If
@ref MAGNUM_BUILD_DEPRECATED is enabled, the returned type acts as a
@ref Corrade::Containers::Optional but has (deprecated) implicit conversion
to a @ref Corrade::Containers::Pointer to avoid breaking user code.
- All @ref Platform APIs that used to take or return a @ref std::string are
ported to use @relativeref{Corrade,Containers::StringView}
or @relativeref{Corrade,Containers::String} instead. If
@ref MAGNUM_BUILD_DEPRECATED is enabled, implicit conversion from and to a
@ref std::string is provided by including the
@ref Corrade/Containers/StringStl.h header. Include it explicitly in your
code if you want to keep using a @ref std::string. See also
[mosra/magnum#559](https://github.com/mosra/magnum/pull/559).
- All @ref Trade::AbstractImporter APIs that used to take or return a
@ref std::string are ported to use @relativeref{Corrade,Containers::StringView}
or @relativeref{Corrade,Containers::String} instead. If
@ref MAGNUM_BUILD_DEPRECATED is enabled, implicit conversion from and to a
@ref std::string is provided by including the
@ref Corrade/Containers/StringStl.h header. Include it explicitly in your
code if you want to keep using a @ref std::string.
- @ref Trade::AbstractImporter::doOpenData() taking an array view is
deprecated in favor of the more flexible signature that takes a r-value
@relativeref{Corrade,Containers::Array}
Trade: refresh the AbstractImageConverter API. First and foremost I need to expand the interface to support 3D image conversion. But the interface was not great to begin with, so this takes the opportunity of an API break and does several things: * The `export*()` names were rather strange and I don't even remember why I chose that name (maybe because at first I wanted to have an "exporter" API as a counterpart to importers?) * In addition, there was no way to convert a compressed image to a compressed image (or to an uncompressed image) and adding the two missing variants would be a lot of combinations. So instead the new convert() returns an ImageData, which can be both, and thus also allows the converters to produce compressed or uncompressed output based on some runtime setting, without having to implement two (four?) separate functions for that and requiring users to know beforehand what type of an image will be created. * The ImageConverterFeature enum was named in a really strange way as well, with ConvertCompressedImage meaning "convert to a compressed image" while "ConvertCompressedData" instead meant "convert a compressed image to a data". Utter chaos. It also all implied 2D and on the other hand had a redundant `Image` in the name, so I went and remade the whole thing. As mentioned above, two of the enums now mean the same thing, and are both replaced with Convert2D. * Finally, similarly as changes elsewhere, I took this opportunity to get rid of std::string in the convertToFile() APIs.
5 years ago
- @cpp Trade::ImageConverterFeature::ConvertImage @ce and
@cpp Trade::ImageConverterFeature::ConvertCompressedImage @ce;
@cpp Trade::AbstractImageConverter::exportToImage() @ce and
@cpp Trade::AbstractImageConverter::exportToCompressedImage() @ce are
deprecated in favor of an unifying
@ref Trade::ImageConverterFeature::Convert2D and a corresponding
@ref Trade::AbstractImageConverter::convert() that returns an
@ref Trade::ImageData2D and thus can handle both cases and follows a naming
scheme used elsewhere
- @cpp Trade::ImageConverterFeature::ConvertFile @ce,
@cpp Trade::ImageConverterFeature::ConvertCompressedFile @ce,
@cpp Trade::ImageConverterFeature::ConvertData @ce and
@cpp Trade::ImageConverterFeature::ConvertCompressedData @ce are deprecated
in favor of @ref Trade::ImageConverterFeature::Convert2DToFile,
@ref Trade::ImageConverterFeature::ConvertCompressed2DToFile,
@ref Trade::ImageConverterFeature::Convert2DToData and
@ref Trade::ImageConverterFeature::ConvertCompressed2DToData that more
clearly imply what's converted to what and make room for 3D image
conversion as well
- @cpp Trade::AbstractImageConverter::exportToData() @ce and
@cpp Trade::AbstractImageConverter::exportToFile() @ce are deprecated in
favor of @ref Trade::AbstractImageConverter::convertToData() and
@ref Trade::AbstractImageConverter::convertToFile() that follow a naming
scheme used elsewhere
- The signature of @ref Trade::AbstractSceneConverter::convertToFile() was
changed to have input first and output second, for consistency with other
interfaces, together with a switch to @ref Containers::StringView. The
original signature is marked as deprecated.
- @cpp Trade::TextureData::Type @ce was deprecated in favor of
@ref Trade::TextureType that is much less annoying to type, in addition
@cpp Trade::TextureData::Type::Cube @ce was deprecated in favor of
@ref Trade::TextureType::CubeMap for consistency.
- @cpp Vk::hasVkFormat(Magnum::VertexFormat) @ce,
@cpp Vk::hasVkFormat(Magnum::PixelFormat) @ce,
@cpp Vk::hasVkFormat(Magnum::CompressedPixelFormat) @ce,
@cpp Vk::vkFormat(Magnum::VertexFormat) @ce,
@cpp Vk::vkFormat(Magnum::PixelFormat) @ce and
@cpp Vk::vkFormat(Magnum::CompressedPixelFormat) @ce returning a raw
@type_vk{Format} are deprecated in favor of
@ref Vk::hasVertexFormat(), @ref Vk::hasPixelFormat(Magnum::PixelFormat),
@ref Vk::hasPixelFormat(Magnum::CompressedPixelFormat),
@ref Vk::vertexFormat(), @ref Vk::pixelFormat(Magnum::PixelFormat) and
@ref Vk::pixelFormat(Magnum::CompressedPixelFormat) that return the new
@ref Vk::PixelFormat enum that contains only values suitable for a pixel
format
- @cpp Vk::hasVkIndexType() @ce and @cpp Vk::vkIndexType() @ce returning a
raw @type_vk{IndexType} are deprecated in favor of
@ref Vk::meshIndexType() that returns the new @ref Vk::MeshIndexType enum.
Since all generic index types are available in Vulkan now, there's no need
for a @cpp hasMeshIndexType() @ce anymore.
- @cpp Vk::hasVkPrimitiveTopology() @ce and
@cpp Vk::vkPrimitiveTopology() @ce returning a raw
@type_vk{PrimitiveToplogy} are deprecated in favor of
@ref Vk::hasMeshPrimitive() and @ref Vk::meshPrimitive() that return the
new @ref Vk::MeshPrimitive enum
@subsection changelog-latest-compatibility Potential compatibility breakages, removed APIs
- Removed remaining APIs deprecated in version 2018.10, in particular:
- @cpp Audio::PlayableGroup::setClean() @ce, use
@ref Audio::Listener::update() instead
- @cpp GL::*Texture::setSRGBDecode() @ce,
@cpp GL::Renderer::Feature::FramebufferSRGB @ce,
@cpp Platform::*Application::GLConfiguration::setSRGBCapable() @ce and
@cpp Platform::*Application::GLConfiguration::isSRGBCapable() @ce, use
@ref GL::Texture::setSrgbDecode() "GL::*Texture::setSrgbDecode()",
@ref GL::Renderer::Feature::FramebufferSrgb,
@ref Platform::Sdl2Application::GLConfiguration::setSrgbCapable() "Platform::*Application::GLConfiguration::setSrgbCapable()" and
@ref Platform::Sdl2Application::GLConfiguration::isSrgbCapable() "Platform::*Application::GLConfiguration::isSrgbCapable()" instead
- `Math::Geometry`, `Math::Geometry::Distance` and
`Math::Geometry::Intersection` namespaces, use @ref Math::Distance and
@ref Math::Intersection instead
- @ref Math::Intersection::planeLine() taking a separate plane normal and
position, use @ref Math::planeEquation() instead
- @ref MeshTools::compile() taking a @ref GL::BufferUsage and returning a
tuple, use the simpler versions instead (note that the
@cpp Trade::MeshData2D @ce / @cpp Trade::MeshData3D @ce overloads are
still present for backwards compatibility)
- `Platform::*Application::viewportEvent(const Vector2i&)`, override the
@ref Platform::Sdl2Application::viewportEvent(ViewportEvent&) "viewportEvent(ViewportEvent&)"
function instead.
- `Platform::Sdl2Application::Configuration::WindowFlags::AllowHighDpi`,
had no effect anymore
- `Shaders::GenericGL::Color` and `Shaders::VertexColorGL::Color`, use
@ref Shaders::VertexColorGL::Color3 or
@ref Shaders::VertexColorGL::Color4 instead
- @ref Trade::CameraData constructor not taking an explicit type enum,
use @ref Trade::CameraData::CameraData(CameraType, Rad, Float, Float, Float, const void*)
instead
- @cpp Trade::AbstractMaterialData @ce constructor taking just two
parameters and @ref Trade::PhongMaterialData constructor taking three
parameters, use either the (also deprecated)
@cpp Trade::AbstractMaterialData::AbstractMaterialData(MaterialType, Flags, MaterialAlphaMode, Float, const void*) @ce
and @cpp Trade::PhongMaterialData::PhongMaterialData(Flags, MaterialAlphaMode, Float, Float, const void*) @ce
constructors or directly the new @ref Trade::MaterialData class
- All includes of @ref Corrade/Containers/PointerStl.h and
@ref Corrade/Containers/ArrayViewStl.h that were added in 2019.01 for
preserving backwards compatibility after the move from @ref std::unique_ptr
/ @ref std::vector to @ref Corrade::Containers::Pointer /
@ref Corrade::Containers::ArrayView are now removed. This should have a
significant positive effect on compile times of code using the @ref GL,
6 years ago
@ref Audio, @ref Trade and @ref Text libraries
- As part of the ongoing STL header dependency cleanup, the following
breaking changes related to @ref std::string and a @ref std::vector are
done:
- @ref GL::Context::vendorString(),
@relativeref{GL::Context,rendererString()},
@relativeref{GL::Context,versionString()},
@relativeref{GL::Context,shadingLanguageVersionString()},
@relativeref{GL::Context,shadingLanguageVersionStrings()} and
@relativeref{GL::Context,extensionStrings()} now return
@relativeref{Corrade,Containers::StringView} or a
@relativeref{Corrade,Containers::Array} /
@relativeref{Corrade,Containers::ArrayView} of them, instead of a
@ref std::string and a @ref std::vector.
- All @ref GL::Buffer::label() "label()" and
@ref GL::Buffer::setLabel() "setLabel()" APIs now work with a
@relativeref{Corrade,Containers::StringView} /
@relativeref{Corrade,Containers::String} instead of a @ref std::string
To handle most backwards compatibility, @ref Corrade/Containers/StringStl.h
is included in affected headers for implicit conversions from/to a
@ref std::string, but in some cases you may be forced to change the code
that uses those APIs.
- @ref GL::TextureFormat::SR8 and @ref GL::TextureFormat::SRG8 were present
on ES2 builds by mistake --- the @gl_extension{EXT,texture_sRGB_R8} and
@gl_extension{EXT,texture_sRGB_RG8} extensions require OpenGL ES 3.0 at
least
- @ref Math::Complex::fromMatrix() and @ref Math::Quaternion::fromMatrix()
now additionaly assert that the input matrix is a pure rotation without any
reflections. Before it only asserted for orthogonality, but that led to
arbitrary or even invalid quaternions when a reflection matrix was passed,
in case of complex numbers the reflection information was just lost in the
process. Existing code that calls these with unsanitized inputs now
additionally needs to account for reflection as suggested in the
documentation.
- @ref Math::Complex::data(), @ref Math::CubicHermite::data(),
@ref Math::Dual::data(), @ref Math::DualComplex::data(),
@ref Math::DualQuaternion::data(), @ref Math::Frustum::data(),
@ref Math::Quaternion::data(), @ref Math::Range::data() and
@ref Math::RectangularMatrix::data() are no longer @cpp constexpr @ce in
order to make them return a reference to a fixed-size array instead of a
pointer, which was deemed a more useful property.
- @ref SceneGraph::Object::addChild() no longer requires the type constructor
to have the last parameter a parent object object pointer, as that was
quite limiting. Instead it's calling @ref SceneGraph::Object::setParent()
afterwards. This can cause compilation breakages in case the type
constructor has the parent parameter non-optional, pass the parent
explicitly in that case.
- @ref SceneGraph trees are now destructed in a way that preserves
@ref SceneGraph::Object::parent() links up to the root as well as
@ref SceneGraph::AbstractFeature::object() references. Previous behavior
made both @cpp nullptr @ce even before the object/feature destructors were
called and so it's assumed no code relied on such behavior, nevertheless
it's a subtle change worth mentioning.
- Due to the rework of @ref Shaders::PhongGL to support directional and
attenuated point lights, the original behavior of unattenuated point lights
isn't available anymore. For backwards compatibility, light positions
supplied through three-component vectors are now represented as directional
lights, which is close, but not exactly the same as before.
- The @cpp Shaders::AbstractVector @ce base class for @ref Shaders::VectorGL
and @ref Shaders::DistanceFieldVectorGL is removed, as its benefits were
rather questionable --- on the contrary, it made subclass implementation
more verbose and less clear
- Mutable access to @ref Trade::PhongMaterialData color and texture
information, deprecated in 2020.06, is now removed, as it's impossible to
implement through the redesigned @ref Trade::MaterialData APIs. However
these APIs were mainly used to populate the contents in asset importers, so
this shouldn't cause any breakages in user code.
- @ref Trade::MaterialData::flags() now calculates the output on-the-fly
based on what attributes are present. This means that arbitrary extra bits
passed to the constructor from @cpp AbstractMaterialData @ce subclasses are
now discarded, and thus subclasses have to override the
@ref Trade::MaterialData::flags() "flags()" function to keep the same
behavior.
- @ref Trade::MaterialData, which the deprecated
@cpp Trade::AbstractMaterialData @ce aliases to, doesn't have a
@cpp virtual @ce destructor as subclasses with extra data members aren't a
desired use case anymore.
- @ref Trade::MeshData now allows strided index buffers and zero and negative
attribute strides for better data layout flexibility, however as this is
not commonly supported by GPU APIs, it implies the user is now expected to
validate the data layout when passing it there. Due to this change, the
@ref Trade::MeshData::indices() and
@relativeref{Trade::MeshData,mutableIndices()} accessors now return a
@relativeref{Corrade,Containers::StridedArrayView} instead of an
@relativeref{Corrade,Containers::ArrayView} --- either change your code to
accept a strided view instead or use @relativeref{Corrade,Containers::StridedArrayView::asContiguous()} to get a
contiguous @relativeref{Corrade,Containers::ArrayView} again.
- @ref Trade::SceneData constructor taking a @ref std::vector of 2D and 3D
children that got deprecated in favor of
@ref Trade::SceneData::SceneData(SceneMappingType, UnsignedLong, Containers::Array<char>&&, Containers::Array<SceneFieldData>&&, const void*)
no longer accepts a scene that has both 2D and 3D children.
- The deprecated @cpp Trade::AbstractImporter::object*DCount() @ce,
@cpp Trade::AbstractImporter::object*DForName() @ce,
@cpp Trade::AbstractImporter::object*DName() @ce and
@cpp Trade::AbstractImporter::object*D() @ce accessors now behave different
for objects with multiple mesh assignments. This handling was originally
present in importer plugins themselves, but as the new
@ref Trade::SceneData representation supports multiple mesh/camera/...
assignments to a single object natively, the handling was moved to a single
place in the compatibility layer. Because the compatibility layer cannot
renumber object IDs, the newly added objects are not immediately following
the original ID but instead allocated at the end of the object ID range
reported by the importer. While the newly added objects have different IDs,
they retain the parent name like before.
- @ref Trade::AbstractImporter::doDefaultScene() is now @cpp const @ce ---
since the function is not expected to fail, no kind of complex lazy
population can be done anyway. This is now consistent with `do*Count()`
interfaces, which are also @cpp const @ce and can't fail. Documentation of
each function was expanded to suggest a recommended place for potential
error handling.
- @ref Trade::AbstractImageConverter::convertToData() and
@relativeref{Trade::AbstractImageConverter,convertToFile()} now expect
image views to not be @cpp nullptr @ce and to have a non-zero size in all
dimensions. This used to fail for all existing plugin implementations
anyway, but now it's treated as a programmer error and thus asserted on.
- @ref Trade::TextureData constructor was not @cpp explicit @ce by mistake,
now it is
- @ref Trade::TextureData::image() used to document that cube map images are
six consecutive 2D images with the ID being the index of the first one.
That's no longer the case and cube map images are 3D. Because no importer
implemented support for cube map images, this shouldn't cause a problem in
practice.
@subsection changelog-latest-documentation Documentation
- Added a note about MinGW GCC and Clang ABI incompatibility to
@ref platforms-windows "Windows platform docs" (see [mosra/magnum#227](https://github.com/mosra/magnum/issues/227) and
[mosra/magnum#439](https://github.com/mosra/magnum/issues/439))
- Various documentation fixes (see [mosra/magnum#492](https://github.com/mosra/magnum/issues/492),
[mosra/magnum#521](https://github.com/mosra/magnum/pull/521),
[mosra/magnum#563](https://github.com/mosra/magnum/pull/563),
[mosra/magnum#564](https://github.com/mosra/magnum/pull/564))
- @ref Corrade::Utility::Debug and friends were always brought to the
@ref Magnum namespace via a @cpp using @ce directive, but this was never
reflected in the docs and thus hidden from users. Now it's shown in the
docs as a set of @ref Debug etc typedefs instead, to make them more
discoverable.
- Improved documentation about @ref opengl-wrapping-instances-nocreate "delayed OpenGL context creation"
and related pitfalls (see also [mosra/magnum-bootstrap#26](https://github.com/mosra/magnum-bootstrap/issues/26),
[mosra/magnum-examples#98](https://github.com/mosra/magnum-examples/issues/98))
- Added introductory documentation about @ref features "library layout and essential workflows"
(see [mosra/magnum#526](https://github.com/mosra/magnum/issues/526))
@section changelog-2020-06 2020.06
Released 2020-06-27, tagged as
[v2020.06](https://github.com/mosra/magnum/releases/tag/v2020.06).
@subsection changelog-2020-06-new New features
- Clang-CL is now a supported compiler on Windows. See also
@ref platforms-windows-clang-cl.
- New @ref Vector2h, @ref Vector3h, @ref Vector4h, @ref Vector2ub,
@ref Vector3ub, @ref Vector4ub, @ref Vector2b, @ref Vector3b,
@ref Vector4b, @ref Vector2us, @ref Vector3us, @ref Vector4us,
@ref Vector2s, @ref Vector3s, @ref Vector4s, @ref Color3h, @ref Color4h,
@ref Color3us, @ref Color4us convenience typedefs for half-float, 8- and
16-bit integer vector and color types
- New storage-only @ref Matrix2x2h, @ref Matrix2x2b, @ref Matrix2x2s,
@ref Matrix2x3h, @ref Matrix2x3b, @ref Matrix2x3s, @ref Matrix2x4h,
@ref Matrix2x4b, @ref Matrix2x4s, @ref Matrix3x2h, @ref Matrix3x2b,
@ref Matrix3x2s, @ref Matrix3x3h. @ref Matrix3x3b, @ref Matrix3x3s,
@ref Matrix3x4h, @ref Matrix3x4b, @ref Matrix3x4s, @ref Matrix4x2h,
@ref Matrix4x2b, @ref Matrix4x2s, @ref Matrix4x3h, @ref Matrix4x3b,
@ref Matrix4x3s, @ref Matrix4x4h, @ref Matrix4x4b, @ref Matrix4x4s
convenience typedefs for half-float, 8- and 16-bit packed matrix types
- New @ref VertexFormat enum for vertex formats and related utilities
- New @ref MeshPrimitive::Instances, @ref MeshPrimitive::Faces and
@ref MeshPrimitive::Edges primitive types for describing per-instance,
per-face and per-edge data. Those don't map to any common GPU API, but can
be used by various importers to provide access to mesh data that is not
necessarily GPU-friendly.
@subsubsection changelog-2020-06-new-animation Animation library
- Added a @ref Animation::TrackViewStorage::values() getter for type-erased
access to track values
@subsubsection changelog-2020-06-new-audio Audio library
- Added a @ref Audio::Buffer::frequency() getter
@subsubsection changelog-2020-06-new-debugtools DebugTools library
- New @ref DebugTools::ColorMap namespace containing a few presets for
gradient visualization
- New @ref DebugTools::FrameProfiler utility for CPU and GPU profiling
@subsubsection changelog-2020-06-new-gl GL library
- Exposed new entry points. Note that no wrapper API in the @ref GL namespace
is provided for the extensions listed below, at the moment:
- Desktop / ES @gl_extension{OVR,multiview} and
@gl_extension{OVR,multiview2} extensions and the WebGL
@webgl_extension{OVR,multiview2} extension. See also
[mosra/magnum#385](https://github.com/mosra/magnum/issues/385).
- @gl_extension{ARB,sample_locations} and
@gl_extension{AMD,sample_positions} desktop extensions;
@gl_extension{NV,sample_locations} desktop and ES extension
- Implemented @gl_extension{EXT,draw_buffers2},
@gl_extension{ARB,draw_buffers_blend} desktop extensions,
@gl_extension{EXT,draw_buffers_indexed} ES extension and
@webgl_extension{EXT,draw_buffers_indexed} WebGL 2 extension in
@ref GL::Renderer
- Implemented @ref GL::Renderer::setPatchVertexCount(),
@ref GL::Renderer::setPatchDefaultInnerLevel() and
@ref GL::Renderer::setPatchDefaultOuterLevel() as the last missing bits for
@gl_extension{ARB,tessellation_shader} / @gl_extension{EXT,tessellation_shader}
support (see [mosra/magnum#164](https://github.com/mosra/magnum/issues/164))
- Implemented @ref GL::PipelineStatisticsQuery from GL 4.6
- Implemented @ref GL:Renderer::Feature::ClipDistance0 through
@ref GL:Renderer::Feature::ClipDistance7 and related limit queries as well
as exposing the @gl_extension{APPLE,clip_distance} /
@gl_extension{EXT,clip_cull_distance} ES and
@webgl_extension{EXT,clip_cull_distance} WebGL extensions
- Recognizing @gl_extension{AMD,shader_explicit_vertex_parameter} desktop
and @gl_extension{NV,fragment_shader_barycentric} desktop / ES extensions.
These add only shading language features.
- A @cpp "intel-windows-crazy-broken-buffer-dsa" @ce and
@cpp "intel-windows-crazy-broken-vao-dsa" @ce workarounds for Intel
Windows drivers, disabling @gl_extension{ARB,direct_state_access} code
paths in everything releated to buffers and meshes. There are several
5 years ago
issues occurring only in heavier apps, impossible to track down and
reproduce in a controlled environment. These two replace the previous
@cpp "intel-windows-buggy-dsa-bufferdata-for-index-buffers" @ce workaround
that attempted to fix this by doing an explicit buffer binding in some
cases. See @ref opengl-workarounds and [mosra/magnum#405](https://github.com/mosra/magnum/pull/405)
for more information.
- A @cpp "apple-buffer-texture-unbind-on-buffer-modify" @ce workaround that
fixes crashes on Apple macOS when attempting to modify a @ref GL::Buffer
when a @ref GL::BufferTexture is bound. See @ref opengl-workarounds for
more information.
- New @ref GL::Buffer::Buffer(Containers::ArrayView<const void>, BufferUsage)
constructor for directly creating buffers filled with data.
- New @ref GL::Mesh::maxVertexAttributeStride() and
@ref GL::AbstractShaderProgram::maxGeometryOutputVertices() limit queries
- Added a @ref GL::Shader::Shader(NoCreateT) constructor for consistency with
other OpenGL wrapper objects
@subsubsection changelog-2020-06-new-math Math library
- New @ref Magnum/Math/PackingBatch.h header with batch
@ref Math::packInto(), @ref Math::unpackInto(),
@ref Math::packHalfInto(), @ref Math::unpackHalfInto() and
@ref Math::castInto() functions for optimized (un)packing and casting of
large amounts of data (see also [mosra/magnum#275](https://github.com/mosra/magnum/pull/275))
- Added @ref Math::Quaternion::toEuler() and documented how to convert Euler
angles to a quaternion (see [mosra/magnum#397](https://github.com/mosra/magnum/pull/397))
- Added @ref Math::DualComplex::transformVector(),
@ref Math::DualQuaternion::transformVector(),
@ref Math::DualQuaternion::transformVectorNormalized() delegating to
respective APIs in the underlying @ref Complex / @ref Quaternion to make
the transformation API more consistent with @ref Matrix3 / @ref Matrix4
- Added @ref Math::reflect() and @ref Math::refract() (see
[mosra/magnum#420](https://github.com/mosra/magnum/pull/420))
@subsubsection changelog-2020-06-new-meshtools MeshTools library
- New @ref magnum-sceneconverter "magnum-sceneconverter" tool, similar to
@ref magnum-imageconverter "magnum-imageconverter" but suited for general
scene formats
- Added @ref MeshTools::compile(const Trade::MeshData&) operating on the new
@ref Trade::MeshData API
- New @ref MeshTools::isInterleaved() and @ref MeshTools::interleavedData()
utilities for checking if @ref Trade::MeshData is interleaved and for
getting an interleaved view
- Added @ref MeshTools::interleavedLayout() for convenient creation of an
interleaved mesh layout using the new @ref Trade::MeshData API
- Added @cpp MeshTools::interleave(const Trade::MeshData&, Containers::ArrayView<const Trade::MeshAttributeData>) @ce,
@ref MeshTools::duplicate(const Trade::MeshData&, Containers::ArrayView<const Trade::MeshAttributeData>),
@ref MeshTools::compressIndices(const Trade::MeshData&, MeshIndexType)
and @ref MeshTools::removeDuplicates(const Trade::MeshData&) that work
directly on the new @ref Trade::MeshData API
- Added @ref MeshTools::subdivideInPlace() for allocation-less mesh
subdivision
- New @ref MeshTools::removeDuplicatesInPlace() variant that works on
discrete data in addition to floating-point
- New @ref MeshTools::combineIndexedAttributes() tool for combining
differently indexed attributes into a single index buffer, and
@ref MeshTools::combineFaceAttributes() for converting per-face attributes
into per-vertex
- New @ref MeshTools::concatenate() and @ref MeshTools::concatenateInto()
tool for batching multiple generic meshes together
- @ref MeshTools::primitiveCount() for calculating number of generated
primitives for a particular primitive type
- New family of @ref MeshTools::generateLineStripIndices(),
@ref MeshTools::generateLineLoopIndices(),
@ref MeshTools::generateTriangleStripIndices() and
@ref MeshTools::generateTriangleFanIndices() utilities for converting
various mesh types to plain indexed @ref MeshPrimitive::Lines and
@ref MeshPrimitive::Triangles, as well as @ref MeshTools::generateIndices()
operating directly on a @ref Trade::MeshData
@subsubsection changelog-2020-06-new-platform Platform libraries
- Cursor management using @ref Platform::Sdl2Application::setCursor(),
@ref Platform::GlfwApplication::setCursor() and
@ref Platform::EmscriptenApplication::setCursor() (see
[mosra/magnum#383](https://github.com/mosra/magnum/pull/383) and
[mosra/magnum#415](https://github.com/mosra/magnum/pull/415))
- Added @ref Platform::GlfwApplication::setWindowSize() and
@ref Platform::Sdl2Application::setWindowSize()
- Window icon management using @ref Platform::Sdl2Application::setWindowIcon()
and @ref Platform::GlfwApplication::setWindowIcon() (see
[mosra/magnum#393](https://github.com/mosra/magnum/issues/393))
- Added @ref Platform::GlfwApplication::warpCursor() to match the equivalent
API in @ref Platform::Sdl2Application (see
[mosra/magnum#383](https://github.com/mosra/magnum/pull/383))
- Implemented @ref Platform::GlfwApplication::mainLoopIteration() and
@ref Platform::AbstractXApplication::mainLoopIteration() for consistency
with @ref Platform::Sdl2Application (see
[mosra/magnum#387](https://github.com/mosra/magnum/pull/387))
- Added @ref Platform::Sdl2Application::KeyEvent::Key::Quote "Key::Quote",
@ref Platform::Sdl2Application::KeyEvent::Key::LeftBracket "Key::LeftBracket",
@ref Platform::Sdl2Application::KeyEvent::Key::RightBracket "Key::RightBracket",
@ref Platform::Sdl2Application::KeyEvent::Key::Backslash "Key::Backslash" and
@ref Platform::Sdl2Application::KeyEvent::Key::Backquote "Key::Backquote"
keys to @ref Platform::Sdl2Application::KeyEvent and
@ref Platform::GlfwApplication::KeyEvent
- Added @ref Platform::GlfwApplication::KeyEvent::Key::World1 and
@ref Platform::GlfwApplication::KeyEvent::Key::World2
- Added @ref Platform::EmscriptenApplication::KeyEvent::Key::Semicolon
- New [base-gtkmm](https://github.com/mosra/magnum-bootstrap/tree/base-gtkmm)
bootstrap project for using Magnum together with gtkmm (see
[mosra/magnum-bootstrap#24](https://github.com/mosra/magnum-bootstrap/pull/24))
- Context sharing in @ref Platform::WindowlessCglApplication,
@ref Platform::WindowlessEglApplication,
@ref Platform::WindowlessGlxApplication,
@ref Platform::WindowlessWglApplication and
@ref Platform::WindowlessWindowsEglApplication (see [mosra/magnum#433](https://github.com/mosra/magnum/pull/433)
and [mosra/magnum#437](https://github.com/mosra/magnum/pull/437))
- CUDA device selection in @ref Platform::WindowlessEglApplication (see
[mosra/magnum#449](https://github.com/mosra/magnum/pull/449))
- Added @ref Platform::GlfwApplication::Configuration::WindowFlag::Borderless
- Added @ref Platform::Sdl2Application::Configuration::WindowFlag::FullscreenDesktop,
@ref Platform::Sdl2Application::Configuration::WindowFlag::AlwaysOnTop "AlwaysOnTop",
@ref Platform::Sdl2Application::Configuration::WindowFlag::SkipTaskbar "SkipTaskbar",
@ref Platform::Sdl2Application::Configuration::WindowFlag::Utility "Utility",
@ref Platform::Sdl2Application::Configuration::WindowFlag::Tooltip "Tooltip"
and @ref Platform::Sdl2Application::Configuration::WindowFlag::PopupMenu "PopupMenu"
- Added @ref Platform::Sdl2Application::Configuration::addWindowFlags() and
@ref Platform::Sdl2Application::Configuration::clearWindowFlags() "clearWindowFlags()"
for consistency with similar functions in
@ref Platform::Sdl2Application::GLConfiguration; same done for
@ref Platform::GlfwApplication as well
@subsubsection changelog-2020-06-new-primitives Primitives library
- @ref Primitives::capsule3DSolid(), @ref Primitives::circle3DSolid(),
@ref Primitives::coneSolid(), @ref Primitives::cylinderSolid(),
@ref Primitives::grid3DSolid(), @ref Primitives::planeSolid() and
@ref Primitives::uvSphereSolid() can now have tangents as well
- Added @ref Primitives::icosphereWireframe()
@subsubsection changelog-2020-06-new-scenegraph SceneGraph library
- All 2D transformation implementations that support rotation now have a
@ref SceneGraph::AbstractBasicTranslationRotation2D::rotate(const Math::Complex<T>&) "rotate()"
and @ref SceneGraph::AbstractBasicTranslationRotation2D::rotateLocal(const Math::Complex<T>&) "rotateLocal()"
overloads taking a @ref Math::Complex
- All 3D transformation implementations that support rotation now have a
@ref SceneGraph::AbstractBasicTranslationRotation3D::rotate(const Math::Quaternion<T>&) "rotate()"
and @ref SceneGraph::AbstractBasicTranslationRotation3D::rotateLocal(const Math::Quaternion<T>&) "rotateLocal()"
overloads taking a @ref Math::Quaternion
@subsubsection changelog-2020-06-new-shaders Shaders library
- New @cpp Shaders::MeshVisualizer2D @ce for 2D mesh visualization
- Tangent space visualization in @cpp Shaders::MeshVisualizer3D @ce
- Object, vertex and primitive ID visualization in
@cpp Shaders::MeshVisualizer2D @ce and @cpp Shaders::MeshVisualizer3D @ce
- Texture coordinate transformation in @cpp Shaders::DistanceFieldVector @ce,
@cpp Shaders::Flat @ce, @cpp Shaders::Phong @ce and @cpp Shaders::Vector @ce
- Ability to render per-instance / per-vertex object ID in
@cpp Shaders::Flat @ce and @cpp Shaders::Phong @ce, in addition to uniform
object ID
- New attribute definitions and an location allocation scheme in
@cpp Shaders::Generic @ce --- @cpp Shaders::Generic::Tangent4 @ce,
@cpp Shaders::Generic::Bitangent @ce, @cpp Shaders::Generic::ObjectId @ce
plus @cpp Shaders::Generic::TransformationMatrix @ce,
@cpp Shaders::Generic::NormalMatrix @ce and
@cpp Shaders::Generic::TextureOffset @ce for instancing
- Instancing in @cpp Shaders::Flat @ce and @cpp Shaders::Phong @ce
@subsubsection changelog-2020-06-new-trade Trade library
- A new, redesigned @ref Trade::MeshData class that allows much more flexible
access to vertex/index data without unnecessary allocations and data
conversions or copies. Importers expose it through the new
@ref Trade::AbstractImporter::mesh() family of APIs. See
[mosra/magnum#371](https://github.com/mosra/magnum/pull/371).
- New @ref Trade::AbstractSceneConverter plugin interface and an
@ref Trade::AnySceneConverter "AnySceneConverter" plugin
- Ability to import image mip levels via an additional parameter in
@ref Trade::AbstractImporter::image2D(),
@ref Trade::AbstractImporter::image2DLevelCount() and similar APIs for 1D
and 3D images
- The @ref Trade::AnimationData class received support for mutable data
access with new constructors and the
@ref Trade::AnimationData::mutableData() "mutableData()" and
@ref Trade::AnimationData::mutableTrack() "mutableTrack()" accessors.
Equivalent APIs are exposed in both @ref Trade::ImageData and
@ref Trade::MeshData as well. See @ref Trade-AnimationData-usage-mutable
for more information.
- New convenience @cpp Trade::AbstractImporter::material(const std::string&) @ce
etc. APIs allowing to directly get a data using a string name
- @ref Trade::PhongMaterialData now supports both color and texture instead
of just one or the other, can reference normal textures as well and
specfify texture coordinate transform
- @ref Trade::PhongMaterialData now supports non-default texture coordinate
sets (see [mosra/magnum#278](https://github.com/mosra/magnum/pull/278),
[mosra/magnum#438](https://github.com/mosra/magnum/pull/438))
- Added @ref Trade::AbstractImporter::setFlags() and
@ref Trade::AbstractImageConverter::setFlags() for configuring common
plugin behavior such as output verbosity level; exposed also via a new
`--verbose` option in @ref magnum-imageconverter "magnum-imageconverter"
and @ref magnum-sceneconverter "magnum-sceneconverter"
- @ref magnum-imageconverter "magnum-imageconverter" has a new `--info`
option for printing detailed info about a particular file
- RLE compression support in @ref Trade::TgaImporter "TgaImporter"
@subsubsection changelog-2020-06-new-vk Vk library
- Updated Vulkan headers for version 1.2
- Conversion of @ref VertexFormat values to the @type_vk{Format} enum using
@ref Vk::vkFormat(Magnum::VertexFormat)
@subsection changelog-2020-06-changes Changes and improvements
- The @ref MeshPrimitive type can now store implementation-specific primitive
types similarly to @ref PixelFormat and the new @ref VertexFormat.
Implementation-specific types are then simply passed through in
@ref GL::meshPrimitive() and @ref Vk::vkPrimitiveTopology().
- The @ref PixelFormat and @ref CompressedPixelFormat enums can now be saved
and retrieved from @ref Corrade::Utility::Configuration /
@ref Corrade::Utility::Arguments
- @ref Resource is now nothrow-movable and thus can be used with growable
6 years ago
@ref 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 @ref Trade::AbstractImporter::pluginSearchPaths()
for more information.
- Added an ability to disable unique globals across shared libraries using
@ref 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.
- @cpp Shaders::MeshVisualizer3D::Flag::Wireframe @ce now implicitly enables
@cpp Shaders::MeshVisualizer3D::Flag::NoGeometryShader @ce also on WebGL in
addition to ES2, since this platform doesn't have a possibility to have
geometry shaders either. Same is done for @cpp Shaders::MeshVisualizer2D @ce.
@subsubsection changelog-2020-06-changes-audio Audio library
- @ref Audio::WavImporter "WavAudioImporter" now supports also Big-Endian
`RIFX` files and was fixed to work on Big-Endian platforms (see
[mosra/corrade#87](https://github.com/mosra/corrade/issues/87))
@subsubsection changelog-2020-06-changes-gl GL library
- Added @ref GL::AbstractTexture::bind(),
@ref GL::AbstractTexture::bindImages() and
@ref GL::AbstractShaderProgram::draw() overloads taking a
@ref Corrade::Containers::ArrayView instead of @ref std::initializer_list
in order to allow passing runtime-sized lists (see also
[mosra/magnum#403](https://github.com/mosra/magnum/pull/403))
- Added an ability to remove a buffer from a @ref GL::BufferTexture using
@ref GL::BufferTexture::resetBuffer() "resetBuffer()"
- Matrix @ref GL::Attribute instances can now specify custom stride between
column vectors in order to control alignment in packed 8- and 16-bit types
- @ref GL::DynamicAttribute can now describe matrix attributes similarly to
@ref GL::Attribute, previously this was possible only by specifying each
column vector separately
- Added @ref GL::Context::State::UnbindPixelBuffer that's now implicitly
included in @ref GL::Context::State::EnterExternal to make Magnum work
correctly with 3rd party code that's not aware of PBOs.
- The @cpp "intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped" @ce
workaround now unconditionally disables @gl_extension{ARB,explicit_uniform_location}
on Intel Windows drivers because it was discovered to be too buggy to be
useful, affecting most shaders from the @ref Shaders library. See also
@ref opengl-workarounds.
@subsubsection changelog-2020-06-changes-math Math library
- Functions in @ref Magnum/Math/FunctionsBatch.h now accept any type that's
convertible to a @ref Corrade::Containers::StridedArrayView without having
to add explicit casts or template parameters
- @ref Math::slerp(const Quaternion<T>&, const Quaternion<T>&, T) and
@ref Math::slerpShortestPath(const Quaternion<T>&, const Quaternion<T>&, T)
now fall back to linear interpolation when the quaternions are close to
each other, instead of unconditionally returning the first argument
- Added non-const overloads to @ref Math::Frustum::operator[]() and
@ref Math::Frustum::front() etc. accessors, returning references (see
[mosra/magnum#425](https://github.com/mosra/magnum/pull/425))
@subsubsection changelog-2020-06-changes-meshtools MeshTools library
- Added @ref MeshTools::compressIndices() that takes a
@ref Corrade::Containers::StridedArrayView instead of a @ref std::vector
and additionally allows you to specify the smallest allowed type, offset to
apply to each index and is working with 8- and 16-byte index types as well
- Added @ref MeshTools::subdivide() that operates on a (growable)
@ref Corrade::Containers::Array instead of a @ref std::vector
- Added @ref MeshTools::subdivideInPlace() that operates on a partially
filled array view instead of a @ref std::vector
- Added @ref MeshTools::removeDuplicatesIndexedInPlace() that operates
in-place on an indexed array view and a STL-less
@ref MeshTools::removeDuplicatesInPlace() variant
- Added @ref MeshTools::duplicateInto() variants that take type-erased
2D strided array views
- @ref MeshTools::flipNormalsInPlace() and @ref MeshTools::flipFaceWindingInPlace()
were renamed for clarity and now accept a
@ref Corrade::Containers::StridedArrayView instead of a @ref std::vector,
additionally working on 8- and 16-byte index types as well
- @ref MeshTools::tipsifyInPlace() was renamed for clarity and now accepts a
@ref Corrade::Containers::StridedArrayView instead of a @ref std::vector,
additionally working on 8- and 16-byte index types as well
- Added @ref MeshTools::generateSmoothNormals() and
@ref MeshTools::generateSmoothNormalsInto() variants taking type-erased
index arrays
@subsubsection changelog-2020-06-changes-platform Platform libraries
6 years ago
- @ref Platform::GlfwApplication now gracefully handles monitor sizes of zero
when calculating DPI scaling (see [mosra/magnum#388](https://github.com/mosra/magnum/pull/388))
- Ability to specify application return code in
@ref Platform::AbstractXApplication::exit()
- Worked around @ref Platform::GlfwApplication crash while creating GL
context on a hidden window on Wayland (see
[mosra/magnum#392](https://github.com/mosra/magnum/pull/392),
[mosra/magnum#400](https://github.com/mosra/magnum/issues/400),
7 years ago
[mosra/magnum#401](https://github.com/mosra/magnum/pull/401))
- HiDPI capability checking on macOS and iOS got fixed to behave correctly
when the capability is explicitly set to @cb{.xml} <false/> @ce in the
5 years ago
`Info.plist` file and additionally, unless overridden, it's assumed to be
enabled by default on macOS 10.15+ and iOS 13+. Applications running on
these platforms no longer need to supply a custom `Info.plist` in order to
enable HiDPI. See @ref platforms-macos-hidpi for more information.
- Implemented virtual DPI scaling in @ref Platform::GlfwApplication on
Windows (was behaving like physical before) and physical DPI scaling in
@ref Platform::Sdl2Application (which was behaving like virtual before)
(see [mosra/magnum#243](https://github.com/mosra/magnum/issues/243))
- Undefining more noise from `Xlib.h` (see [mosra/magnum#430](https://github.com/mosra/magnum/pull/430))
- Calling @ref Platform::Sdl2Application::exit() "Platform::*Application::exit()"
directly in the application constructor will now make it exit right after
constructor finished, without any event processing (see [mosra/magnum#429](https://github.com/mosra/magnum/issues/429))
- @ref Platform::AndroidApplication, @ref Platform::EmscriptenApplication,
@ref Platform::GlfwApplication and @ref Platform::Sdl2Application now
default to 32-bit RGBA color buffer instead of 24-bit RGB, to avoid the
framebuffer degrading to 16-bit colors on some platforms (see
[mosra/magnum-integration#59](https://github.com/mosra/magnum-integration/issues/59))
- Added @ref Platform::BasicScreenedApplication::globalBeforeDrawEvent()
- @ref Platform::WindowlessGlxApplication now handles `GLXBadFBConfig` errors
gracefully, making the fallback compatibility context creation work even in
those cases. This makes it work with Mesa's Zink GL-over-Vulkan driver.
- Following all other application implementations,
@ref Platform::WindowlessEglApplication now implements the
@cpp "no-forward-compatible-core-context" @ce workaround as well, giving
back latest OpenGL version on proprietary NVidia and AMD drivers instead of
OpenGL 3.0. The newly added fallback also makes the application work with
Mesa's Zink GL-over-Vulkan driver that has just GL 2.1. See also
@ref opengl-workarounds.
@subsubsection changelog-2020-06-changes-trade Trade library
- For better usability, the @ref magnum-imageconverter "magnum-imageconverter"
utility now prints available importer/converter plugins when loading a
plugin fails
- @ref magnum-imageconverter "magnum-imageconverter" can load a
tightly-packed square of raw pixels instead of going through an importer
plugin if you specify `--importer raw:&lt;format&gt;`; and save raw
imported data instead of going through a converter plugin if you specify
`--converter raw`
- @ref magnum-imageconverter "magnum-imageconverter" can be told to load a
particular image and level using the `--image` and `--level` options
- New convenience @ref Trade::AnimationTrackData constructor taking a
templated @ref Animation::TrackView type, autodetecting value and result
@ref Trade::AnimationTrackType out of it
- New convenience @ref Trade::AnimationData constructors taking an
@ref std::initializer_list of @ref Trade::AnimationTrackData
- Recognizing `*.ico` and `*.cur` files in
@ref Trade::AnyImageImporter "AnyImageImporter"
@subsection changelog-2020-06-buildsystem Build system
- Fixed a bad interaction between @ref Magnum/Platform/AbstractXApplication.h
and @ref Magnum/Platform/GlfwApplication.h (see [mosra/magnum#389](https://github.com/mosra/magnum/pull/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](https://github.com/mosra/magnum/issues/410))
- `FindMagnum.cmake` now properly recognizes an optional dependency between
@ref DebugTools and @ref Trade on GL-less builds
- Various compiler warning fixes (see [mosra/magnum#406](https://github.com/mosra/magnum/pull/406))
- Added a 32-bit Windows build to the CI matrix to avoid random compilation
issues (see [mosra/magnum#421](https://github.com/mosra/magnum/issues/421))
- The library again compiles and tests cleanly with @ref 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](https://github.com/mosra/magnum/issues/440))
- Linker fixes for MinGW Clang (see [mosra/magnum#417](https://github.com/mosra/magnum/pull/417))
- Properly installing plugin binaries in Gentoo packages (see
[mosra/magnum-plugins#85](https://github.com/mosra/magnum-plugins/issues/85))
- Warning fixes for MSVC (see [mosra/magnum#445](https://github.com/mosra/magnum/pull/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 @ref 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](https://github.com/mosra/magnum/issues/402) and
[mosra/magnum#412](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/corrade/issues/84)
and [mosra/magnum#310](https://github.com/mosra/magnum/issues/310).
- Vcpkg packages now ignore features that are incompatible with target
platform, allowing `vcpkg install magnum[*]` to work again. See also
[mosra/magnum#368](https://github.com/mosra/magnum/pull/368) and
[microsoft/vcpkg#12211](https://github.com/microsoft/vcpkg/pull/12211).
@subsection changelog-2020-06-bugfixes Bug fixes
- The variadic versions of @ref GL::Mesh::addVertexBuffer() and
@ref GL::Mesh::addVertexBufferInstanced() were sometimes errorneously
picked up instead of the @ref GL::DynamicAttribute overloads when stride
and offset were of a slightly different type.
- @ref Platform::Sdl2Application::viewportEvent() gets properly fired also
when window size changes programmatically (such as through
@ref Platform::Sdl2Application::setMinWindowSize() "setMinWindowSize()")
- @ref Platform::GlfwApplication::setMinWindowSize() /
@ref Platform::GlfwApplication::setMaxWindowSize() and equivalent APIs in
@ref Platform::Sdl2Application now correctly take DPI scaling into account
- The @ref Primitives::cylinderSolid() and @ref Primitives::coneSolid()
primitives were missing a face when both caps and texture coordinates were
enabled (see [mosra/magnum#386](https://github.com/mosra/magnum/issues/386))
- @ref Platform::Sdl2Application::Configuration::WindowFlag::Vulkan was
enabled conditionally only for SDL >= 2.0.6, but the version defines were
never included so it was always disabled
- Fixed missing handling of
@ref Platform::EmscriptenApplication::KeyEvent::Key::LeftBracket "Key::LeftBracket",
@ref Platform::EmscriptenApplication::KeyEvent::Key::RightBracket "Key::RightBracket",
@ref Platform::EmscriptenApplication::KeyEvent::Key::Semicolon "Key::Semicolon" and
@ref Platform::EmscriptenApplication::KeyEvent::Key::Backquote "Key::Backquote"
in @ref Platform::EmscriptenApplication
- Fixed broken @ref Platform::EmscriptenApplication mouse event coordinates
when `-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1` is enabled (see
[mosra/magnum#408](https://github.com/mosra/magnum/issues/408))
- Fixed compilation of @ref Platform::EmscriptenApplication on recent
Emscripten versions (see [mosra/magnum#434](https://github.com/mosra/magnum/pull/434))
- Due to Windows- and macOS-specific issues in GLFW,
@ref Platform::GlfwApplication::viewportEvent() and/or
@ref Platform::GlfwApplication::drawEvent() could get fired already during
class construction, potentially causing crashes or
`pure virtual method call` aborts. To prevent these issues, event callback
setup is delayed to the first time the application main loop is entered.
- @ref Platform::GlfwApplication was polling for events instead of waiting,
using 100% CPU even if not constantly redrawing
- In 2019.01 @ref Magnum/Platform/Sdl2Application.h went through an include
cleanup, removing 50k lines; but unfortunately we forgot to add back
@cpp #include <SDL_main.h> @ce, causing iOS builds to fail to initialize.
The include got added back and initialization failures are reported with
more information now.
- Calling @ref Platform::Sdl2Application::setSwapInterval() with @cpp 0 @ce
caused @ref Platform::Sdl2Application::setMinimalLoopPeriod() "setMinimalLoopPeriod()"
to be ignored even though Vsync was in fact not enabled.
- It was not possible to override DPI scaling using
@ref Platform::Sdl2Application::Configuration as command-line arguments
always got a priority (see [mosra/magnum#416](https://github.com/mosra/magnum/issues/416))
- Fixed an otherwise harmless OOB access in @ref MeshTools::tipsifyInPlace()
that could trigger ASan or debug iterator errors
- With @ref Corrade/Utility/DebugStl.h not being included, @ref std::string
instances could get accidentally printed as @ref ResourceKey instances.
Added and explicit header dependency to avoid such cases.
- The @ref Magnum/Image.h, @ref Magnum/ImageView.h and
@ref Magnum/Trade/ImageData.h headers required
@ref Corrade/Containers/StridedArrayView.h to be included *before* in order
to use the @ref ImageView::pixels() "pixels()" function. Now it's enough
to just include it at any point, with no order dependency anymore.
- Dynamic plugins on static Magnum builds on Windows were accidentally
searched for in the `lib/` directory instead of `bin/`, and in some cases
in `bin/` instead of `lib/` on Unix platforms.
- @ref Resource was unnecessarily querying the @ref ResourceManager for
updated data even in cases where no resource update was done since last
check
- For a @cpp Shaders::Phong @ce with zero lights, alpha mask default value
was incorrectly @cpp 0.0f @ce instead of @cpp 0.5f @ce on OpenGL ES
- @cpp Shaders::MeshVisualizer3D @ce accidentally didn't enable
@glsl noperspective @ce interpolation on desktop, resulting in minor
wireframe rendering artifacts
- @ref Math::angle() got fixed to not produce NaN results for vectors,
complex numbers or quaternions very close to each other
- @ref Math::Range was made to be implicitly convertible from @ref std::pair
in 2018.10, but the @ref Math::Range2D and @ref Math::Range3D were only
explicitly, and even that only by an accident
- Fixed various cases where @ref GL::Context would call GL 3+ APIs on GL 2.1
contexts, causing GL errors. This makes context creation completely
error-free on Mesa's Zink GL-over-Vulkan driver.
@subsection changelog-2020-06-deprecated Deprecated APIs
- @cpp GL::Mesh::draw() @ce and @cpp GL::MeshView::draw() @ce are deprecated
in favor of @ref GL::AbstractShaderProgram::draw() and
@ref GL::AbstractShaderProgram::drawTransformFeedback(), as the API makes
much more sense to have on a shader and not on a mesh
- @cpp GL::Attribute::DataType::HalfFloat @ce,
@cpp GL::DynamicAttribute::DataType::HalfFloat @ce and
@cpp GL::PixelType::HalfFloat @ce is deprecated in favor of
@ref GL::Attribute::DataType::Half,
@ref GL::DynamicAttribute::DataType::Half and @ref GL::PixelType::Half that
are consistent with the @ref Half type used elsewhere.
- @cpp GL::Attribute::vectorSize() @ce is deprecated as the name is
misleading now, use @ref GL::Attribute::vectorStride() instead
- @cpp GL::Attribute::VectorCount @ce is deprecated in favor of
@ref GL::Attribute::Vectors to have a name consistent with
@ref GL::Attribute::components()
- @cpp Trade::AbstractImporter::mesh2D() @ce,
@cpp Trade::MeshData2D @ce, @cpp Trade::MeshData3D @ce,
@cpp Trade::AbstractImporter::mesh2D() @ce,
@cpp Trade::AbstractImporter::mesh3D() @ce and related APIs are
deprecated in favor of @ref Trade::AbstractImporter::mesh() and the new
@ref Trade::MeshData API. For backwards compatibility, importers
implementing the new API have it exposed through @cpp mesh3D() @ce as well,
returning a subset of @ref Trade::MeshData functionality supported by the
old @cpp Trade::MeshData3D @ce APIs
- @cpp Platform::GlfwApplication::Configuration::setCursorMode() @ce and
related enum & getter are deprecated in favor of the new extended and more
flexible @ref Platform::GlfwApplication::setCursor(). The setting didn't
allow changing the cursor later, which made it pretty useless.
- @cpp Platform::Sdl2Application::Configuration::setMouseLocked() @ce and
@cpp Platform::Sdl2Application::Configuration::isMouseLocked() @ce is
deprecated in favor of the new @ref Platform::Sdl2Application::setCursor()
together with @ref Platform::Sdl2Application::Cursor::HiddenLocked
- @cpp Platform::GlfwApplication::Configuration::WindowFlag::Floating @ce is
deprecated in favor of a more descriptive
@ref Platform::GlfwApplication::Configuration::WindowFlag::AlwaysOnTop,
which is also consistent with @ref Platform::Sdl2Application
- @cpp Audio::AbstractImporter::Features @ce,
@cpp Text::AbstractFont::Features @ce,
@cpp Text::AbstractFontConverter::Features @ce,
@cpp Trade::AbstractImporter::Features @ce,
@cpp Trade::AbstractImageConverter::Features @ce enum sets and their
corresponding `Feature` enums are deprecated in favor of
@ref Audio::ImporterFeatures, @ref Text::FontFeatures,
@ref Text::FontConverterFeatures, @ref Trade::ImporterFeatures,
@ref Trade::ImageConverterFeatures enum sets and their corresponding enums
placed directly in the namespace to have them shorter and unambiguous
- @cpp MeshTools::compressIndices() @ce taking a @ref std::vector is
deprecated in favor of @ref MeshTools::compressIndices(const Containers::StridedArrayView1D<const UnsignedInt>&, MeshIndexType, Long)
and its 8- and 16-byte overloads
- @cpp MeshTools::flipNormals() @ce and @cpp MeshTools::flipFaceWinding() @ce
and @cpp MeshTools::tipsify() @ce are deprecated in favor of
@ref MeshTools::flipNormalsInPlace(),
@ref MeshTools::flipFaceWindingInPlace() and @ref MeshTools::tipsifyInPlace()
that accept a @ref Corrade::Containers::StridedArrayView instead of a
@ref std::vector and work with 8- and 16-byte index types as well.
- `Magnum/MeshTools/CombineIndexedArrays.h`,
@cpp MeshTools::combineIndexArrays() @ce and
@cpp MeshTools::combineIndexedArrays() @ce are deprecated in favor of a more
flexible @ref MeshTools::combineIndexedAttributes() in the
@ref Magnum/MeshTools/Combine.h header
- @cpp MeshTools::compressIndicesAs() @ce, @cpp MeshTools::duplicate() @ce,
@cpp MeshTools::removeDuplicates() @ce and @cpp MeshTools::subdivide() @ce
operating on a @ref std::vector are deprecated, use the STL-free
@ref MeshTools::compressIndices(), @ref MeshTools::duplicate(),
@ref MeshTools::removeDuplicatesFuzzyInPlace() and
@ref MeshTools::subdivide() / @ref MeshTools::subdivideInPlace() overloads
instead
- @cpp Primitives::CapsuleTextureCoords @ce,
@cpp Primitives::CircleTextureCoords @ce,
@cpp Primitives::PlaneTextureCoords @ce,
@cpp Primitives::SquareTextureCoords @ce,
@cpp Primitives::UVSphereTextureCoords @ce enums and
@ref Primitives::capsule3DSolid(), @ref Primitives::circle2DSolid(),
@ref Primitives::circle3DSolid(), @ref Primitives::planeSolid(),
@ref Primitives::squareSolid() and @ref Primitives::uvSphereSolid()
overloads taking those are deprecated in favor of
@ref Primitives::CapsuleFlags, @ref Primitives::Circle2DFlags,
@ref Primitives::Circle3DFlags, @ref Primitives::PlaneFlags,
@ref Primitives::SquareFlags and @ref Primitives::UVSphereFlags
- @cpp Primitives::ConeFlag::GenerateTextureCoords @ce,
@cpp Primitives::CylinderFlag::GenerateTextureCoords @ce,
@cpp Primitives::GridFlag::GenerateTextureCoords @ce and
@cpp Primitives::GridFlag::GenerateNormals @ce is deprecated in favor of
@ref Primitives::ConeFlag::TextureCoordinates,
@ref Primitives::CylinderFlag::TextureCoordinates,
@ref Primitives::GridFlag::TextureCoordinates and
@ref Primitives::GridFlag::Normals for naming consistency
- @cpp Shaders::MeshVisualizer @ce is deprecated as the shader can now handle
both 2D and 3D, use @cpp Shaders::MeshVisualizer3D @ce instead
- Default constructor of @cpp Shaders::MeshVisualizer3D @ce is deprecated,
you're now required to enable at least one visualization feature when
constructing it
- @cpp Shaders::MeshVisualizer::setTransformationProjectionMatrix() @ce is
deprecated on the 3D variant, use separate
@cpp Shaders::MeshVisualizer3D::setTransformationMatrix() @ce and
@cpp Shaders::MeshVisualizer3D::setProjectionMatrix() @ce instead
- Mutable access to @ref Trade::PhongMaterialData color and texture
information is deprecated. This was mainly used to populate the contents
in asset importers, but the class was redesigned and this is no longer
needed.
- The unprefixed and alien-looking @cpp FLOAT_EQUALITY_PRECISION @ce,
@cpp DOUBLE_EQUALITY_PRECISION @ce and @cpp LONG_DOUBLE_EQUALITY_PRECISION @ce
macros are no longer used by any code and thus deprecated in favor of using
@ref Math::TypeTraits::epsilon() instead, which is also consistent with how
This also means it's no longer
possible to override equality comparison epsilons at compile time, but that
was a rarely (if ever) used feature.
- @cpp DebugTools::Profiler @ce is obsolete, replaced with a much more
flexible and extensible @ref DebugTools::FrameProfiler
- @cpp Math::NoInitT @ce and @cpp Math::NoInit @ce constructor tags are
deprecated in favor of @ref NoInitT and @ref NoInit directly in the
@ref Magnum namespace
@subsection changelog-2020-06-compatibility Potential compatibility breakages, removed APIs
- @ref Animation::TrackView "TrackView" in the still-experimental
@ref Animation library was changed to allow mutable access to the keys &
values it references. Existing code needs to be changed to say
@cpp TrackView<const K, const V> @ce instead of @cpp TrackView<K, V> @ce.
Following this change, @ref Trade::AnimationData now also return instances
with @cpp const @ce types and the non-const
@ref Trade::AnimationData::data() was renamed to
@ref Trade::AnimationData::mutableData() "mutableData()".
- The 4-argument @ref GL::DynamicAttribute constructor was not marked as
@cpp explicit @ce by mistake, it's done now to enforce readability in long
expressions.
- The @ref Magnum/Math/FunctionsBatch.h header is no longer included from
@ref Magnum/Math/Functions.h for backwards compatibility in order to speed
up compile times.
- @ref Trade::AnimationTrackData constructors are now explicit as that
enforces better readability in long initializer expressions
- Non-const @ref Trade::ImageData::data() and @ref Trade::ImageData::pixels()
were renamed to @ref Trade::ImageData::mutableData() and
@ref Trade::ImageData::mutablePixels() to follow the new
@ref Trade::MeshData API and similar changes in @ref Trade::AnimationData.
- @ref Platform::GlfwApplication::setMinWindowSize() /
@ref Platform::GlfwApplication::setMaxWindowSize() and equivalent APIs in
@ref Platform::Sdl2Application now premultiply the value with
@ref Platform::GlfwApplication::dpiScaling() "dpiScaling()" to work
independently on display DPI. This might break existing uses.
- @ref Primitives::uvSphereWireframe() now correctly asserts when the
@p segments parameter isn't divisible by four. Before it mistakenly
asserted only if @p segments wasn't divisible by two, and now code that
mistakenly used a disallowed value will start asserting.
- @ref ResourceManager singleton accessible through @cpp instance() @ce 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.
5 years ago
- 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
@ref MeshTools::compile(). To avoid further breakages you're advised to
reuse the definitions from @cpp Shaders::Generic @ce (and propagating them
to shader code as well) instead of hardcoding the locations directly.
- @cpp Shaders::Generic::Color3 @ce / @cpp Shaders::Generic::Color4 @ce
location changed from @cpp 3 @ce to @cpp 2 @ce
- @cpp Shaders::Generic::Normal @ce location changed from @cpp 2 @ce to
@cpp 5 @ce
- @cpp Shaders::Generic::Tangent @ce location changed from @cpp 4 @ce to
@cpp 3 @ce
- Removed remaining APIs deprecated in version 2018.04:
- @cpp Audio::Buffer::Format @ce, use @ref Audio::BufferFormat instead
- @cpp Shaders::*Vector::setVectorTexture() @ce,
@cpp Shaders::Flat::setTexture() @ce,
@cpp Shaders::Phong::setAmbientTexture() @ce,
@cpp Shaders::Phong::setDiffuseTexture() @ce,
@cpp Shaders::Phong::setSpecularTexture() @ce and
@cpp Shaders::Phong::setTextures() @ce, use
@cpp Shaders::*Vector::bindVectorTexture() @ce,
@cpp Shaders::Flat::bindTexture() @ce,
@cpp Shaders::Phong::bindAmbientTexture() @ce,
@cpp Shaders::Phong::bindDiffuseTexture() @ce,
@cpp Shaders::Phong::bindSpecularTexture() @ce and
@cpp Shaders::Phong::bindTextures() @ce instead
- @ref MeshPrimitive is now four bytes instead of one, to allow wrapping
implementation-specific values using @ref meshPrimitiveWrap() and
@ref meshPrimitiveUnwrap()
- @ref MeshPrimitive and @ref 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, @ref SamplerFilter, @ref SamplerMipmap and
@ref SamplerWrapping keep the zero value as a reasonable default. This
follows a similar change done for @ref PixelFormat and
@ref CompressedPixelFormat in 2019.10.
@subsection changelog-2020-06-documentation Documentation
- Various fixes, improvements and clarifications (see
[mosra/magnum#390](https://github.com/mosra/magnum/pull/390),
[mosra/magnum#394](https://github.com/mosra/magnum/pull/394),
[mosra/magnum#418](https://github.com/mosra/magnum/pull/418),
[mosra/magnum#424](https://github.com/mosra/magnum/pull/424))
- @cpp Shaders::Generic @ce now shows the recommended way how to propagate
generic attribute locations to custom shader code (see
[mosra/magnum#443](https://github.com/mosra/magnum/issues/443))
@section changelog-2019-10 2019.10
Released 2019-10-24, tagged as
[v2019.10](https://github.com/mosra/magnum/releases/tag/v2019.10).
@subsection changelog-2019-10-dependencies 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.
@subsection changelog-2019-10-new New features
- MSVC 2019 compatibility, with slightly less workarounds needed compared to
7 years ago
MSVC 2017. See also [mosra/magnum-bootstrap#18](https://github.com/mosra/magnum-bootstrap/issues/18),
[mosra/magnum#343](https://github.com/mosra/magnum/pull/343) and
[mosra/magnum#354](https://github.com/mosra/magnum/issues/354).
- When using Magnum as a CMake subproject, it now puts all binaries into a
common directory to simplify `PATH` handling and dynamic plugin loading.
For more information see @ref cmake-subproject,
[mosra/magnum#357](https://github.com/mosra/magnum/issues/357) and
[mosra/magnum-plugins#63](https://github.com/mosra/magnum-plugins/issues/63).
- New @ref Image::pixels(), @ref ImageView::pixels() and
@ref Trade::ImageData::pixels() accessors for convenient direct access to
pixel data of any image
- New @ref BasicMutableImageView "MutableImageView*D" and
@ref BasicMutableCompressedImageView "MutableCompressedImageView*D" types
for mutable views onto image data
- Added sRGB BC1-3, BC4, BC5, BC6h, BC7, ETC2, EAC, 2D/3D ASTC and PVRTC
formats to @ref CompressedPixelFormat as well as their conversion to
corresponding GL/Vulkan formats in @ref GL::compressedPixelFormat() and
@ref Vk::vkFormat(Magnum::CompressedPixelFormat)
- New @ref PixelFormat::R8Srgb, @ref PixelFormat::RG8Srgb,
@ref PixelFormat::RGB8Srgb and @ref PixelFormat::RGBA8Srgb sRGB pixel
formats as well as their conversion to corresponding GL/Vulkan formats in
@ref GL::pixelFormat() and @ref Vk::vkFormat(Magnum::PixelFormat)
- New @ref compressedBlockSize() and @ref compressedBlockDataSize() utilities
for querying parameters of @ref CompressedPixelFormat entries, similar to
what @ref pixelSize() is for @ref PixelFormat
@subsubsection changelog-2019-10-new-audio Audio library
- Ability to (un)queue buffers in @ref Audio::Source (see
[mosra/magnum#338](https://github.com/mosra/magnum/pull/338))
- Added getters for basic @ref Audio::Buffer properties (see
[mosra/magnum#342](https://github.com/mosra/magnum/pull/342))
- Implemented support for @al_extension{SOFT,loop_points} in
@ref Audio::Buffer (see [mosra/magnum#342](https://github.com/mosra/magnum/pull/342))
- @ref Audio::Context can now take command-line arguments and supports
the `--magnum-log` and `--magnum-disable-extensions` options similarly to
@ref GL::Context (see
[mosra/magnum#362](https://github.com/mosra/magnum/pull/362))
@subsubsection changelog-2019-10-new-debugtools DebugTools library
- New @ref DebugTools::screenshot() function for convenient saving of
screenshots
- @ref DebugTools::CompareImage and variants now properly handle
floating-point specials such as NaN or @f$ \infty @f$ in compared data
- @ref DebugTools::CompareImageFile and @ref DebugTools::CompareImageToFile
now support the new @ref TestSuite-Tester-save-diagnostic "--save-diagnostic option",
making it possible to save images when a comparison fails
- @ref DebugTools::CompareImage and variants can now print a verbose
diagnostic also if the `--verbose` @ref TestSuite-Tester-command-line "command-line option"
is specified and comparison delta is non-zero
- @ref DebugTools::CompareImage and @ref DebugTools::CompareImageToFile now
accept also @ref Corrade::Containers::StridedArrayView2D on the left side
of the comparison for added flexibility. See
5 years ago
@ref DebugTools-CompareImage-pixels for more information.
@subsubsection changelog-2019-10-new-gl GL library
- Additions to @ref GL::CompressedPixelFormat and compressed
@link GL::TextureFormat @endlink:
- sRGB S3TC formats as defined by the @gl_extension{EXT,texture_sRGB}
desktop, @gl_extension{EXT,texture_compression_s3tc_srgb} ES and
@webgl_extension{WEBGL,compressed_texture_s3tc_srgb} WebGL extension
- Recognizing @gl_extension{EXT,texture_compression_dxt1} desktop and ES
extension and the @gl_extension2{ANGLE,texture_compression_dxt1,ANGLE_texture_compression_dxt} /
@gl_extension2{ANGLE,texture_compression_dxt3,ANGLE_texture_compression_dxt} /
@gl_extension2{ANGLE,texture_compression_dxt5,ANGLE_texture_compression_dxt}
family of extensions in order to enable S3TC formats on a wider range
of OpenGL ES devices
- Recognizing the @gl_extension{KHR,texture_compression_astc_sliced_3d}
extension
- @gl_extension{EXT,texture_compression_rgtc} /
@gl_extension{EXT,texture_compression_bptc} OpenGL ES and
@webgl_extension{EXT,texture_compression_rgtc} /
@webgl_extension{EXT,texture_compression_bptc} WebGL extensions,
complementing the desktop support for BC4, BC5, BC6H and BC7 formats
- @webgl_extension{WEBGL,texture_compression_astc} WebGL extension,
complementing the desktop and ES support for ASTC
- @gl_extension{OES,texture_compression_astc} OpenGL ES extension, adding
3D ASTC compression (unfortunately there's no desktop equivalent yet)
- PVRTC formats defined by the @gl_extension{IMG,texture_compression_pvrtc}
/ @gl_extension{IMG,pvrtc_sRGB} OpenGL ES and
@webgl_extension{WEBGL,compressed_texture_pvrtc} WebGL extensions
- Implemented @gl_extension{EXT,texture_sRGB_R8} and
@gl_extension{EXT,texture_sRGB_RG8} extensions adding
@ref GL::TextureFormat::SR8 and @ref GL::TextureFormat::SRG8 formats to
complement new sRGB formats in @ref GL::PixelFormat
- Added ES-only @ref GL::TextureFormat::BGRA and @ref GL::TextureFormat::BGRA8
and clarified their purpose in relation to @ref GL::PixelFormat::BGRA
- New @ref GL::AbstractFramebuffer::implementationColorReadFormat() and
@ref GL::AbstractFramebuffer::implementationColorReadType() queries for
more robust checks when doing framebuffer readbacks; together with three
new workarounds @cpp "nv-implementation-color-read-format-dsa-broken" @ce,
@cpp "intel-windows-implementation-color-read-format-completely-broken" @ce
and @cpp "mesa-implementation-color-read-format-dsa-explicit-binding" @ce,
because it's 2019 and GL drivers are *still* awful. See
@ref opengl-workarounds for more information.
- Added @ref GL::BufferTexture::size() as it was the only texture type were
this query was missing.
- New @cpp "swiftshader-no-es2-draw-instanced-entrypoints" @ce and
@cpp "swiftshader-no-es2-oes-texture-3d-entrypoints" @ce workarounds
disabling @gl_extension{ANGLE,instanced_arrays} and
@gl_extension{OES,texture_3D} extensions on SwiftShader due to missing
suffixed entry points. See @ref opengl-workarounds for more information.
- New @cpp "swiftshader-broken-xfb-buffer-binding-target" @ce workaround
that's fixing misbehaving buffers when using
@ref GL::Buffer::TargetHint::TransformFeedback. See @ref opengl-workarounds
for more information.
- New pseudo-extension `GL_MAGNUM_shader_vertex_id` denoting support of the
@glsl gl_VertexID @ce shader builtin. Present on all GL 3.0+, GLES 3.0+ and
WebGL 2 contexts, but disabled for SwiftShader as its support is broken
(see the @cpp "swiftshader-broken-shader-vertex-id" @ce workaround in
@ref opengl-workarounds for more information). This pseudo-extension can be
also explicitly disabled using the usual `--magnum-disable-extensions`
@ref GL-Context-usage-command-line "command-line option" for testing
purposes.
- An assorted collection of workarounds for Intel Windows drivers "fixing"
various issues related to @gl_extension{ARB,direct_state_access} by using a
non-DSA code path in the affected cases --- see
@ref opengl-workarounds for more information:
- @cpp "intel-windows-buggy-dsa-bufferdata-for-index-buffers" @ce
fixing a nasty hard-to-reproduce synchronization bug when
@ref GL::Buffer::setData() is followed by
@ref GL::Mesh::setIndexBuffer()
- @cpp "intel-windows-broken-dsa-for-cubemaps" @ce fixing everything
about @ref GL::CubeMapTexture (see [mosra/magnum-examples#55](https://github.com/mosra/magnum-examples/issues/55))
- @cpp "intel-windows-half-baked-dsa-texture-bind" @ce fixing texture
binding inconsistencies (affected [mosra/magnum-examples#55](https://github.com/mosra/magnum-examples/issues/55)
as well)
- @cpp "intel-windows-broken-dsa-layered-cubemap-array-framebuffer-attachment" @ce
fixing @ref GL::Framebuffer::attachLayeredTexture() with
@ref GL::CubeMapTextureArray
- @cpp "intel-windows-broken-dsa-framebuffer-clear" @ce
fixing @ref GL::Framebuffer::clearColor()
- @cpp "intel-windows-broken-dsa-indexed-queries" @ce fixing
@ref GL::PrimitiveQuery::begin(UnsignedInt)
- @cpp "intel-windows-broken-dsa-integer-vertex-attributes" @ce fixing
@ref GL::Mesh::addVertexBuffer() with @ref Magnum::Short "Short"
attributes
- New AMD Windows driver workarounds, related to
@gl_extension{ARB,direct_state_access} as well --- see
@ref opengl-workarounds for more information:
- @cpp "amd-windows-cubemap-image3d-slice-by-slice" @ce for broken
handling of cube map image download and upload in DSA APIs
- @cpp "amd-windows-broken-dsa-cubemap-copy" @ce for broken
framebuffer-to-cubemap copies in DSA APIs
- @cpp "amd-windows-dsa-createquery-except-xfb-overflow" @ce using a
non-DSA code path for creating
7 years ago
@ref GL::PrimitiveQuery::Target::TransformFeedbackOverflow queries
- New @cpp "arm-mali-timer-queries-oom-in-shell" @ce workaround for
@ref GL::Context::DetectedDriver::ArmMali "ARM Mali" drivers on Android
disabling the @gl_extension{EXT,disjoint_timer_query} extension in Android
shell (as opposed to an APK) because using it causes the
@ref GL::Renderer::Error::OutOfMemory error. See @ref opengl-workarounds
for more information.
- Implemented @webgl_extension{EXT,disjoint_timer_query} and
@webgl_extension{EXT,disjoint_timer_query_webgl2} for WebGL, together with
a new @cpp "firefox-fake-disjoint-timer-query-webgl2" @ce workaround. See
@ref opengl-workarounds, @ref platforms-html5-webgl-timer-queries and
@ref platforms-html5-webgl-queries-zero for more information about various
caveats.
- Explicitly calling @cpp glEnable(GL_POINT_SPRITE) @ce on compatibility
contexts in order to ensure the GLSL @cpp gl_PointCoord @ce variable has
a defined output. On core and ES/WebGL contexts this is enabled implicitly,
but for example NVidia drivers have @cpp gl_PointCoord @ce undefined when
`GL_POINT_SPRITE` is not enabled on compatibility contexts.
- New `--magnum-gpu-validation` @ref GL-Context-usage-command-line "command-line option"
and a corresponding environment variable to conveniently enable
@gl_extension{KHR,debug} debug output. This flag also causes
@ref Platform::Sdl2Application::GLConfiguration::Flag::Debug "GLConfiguration::Flag::Debug"
to be enabled for context creation on both windowed and windowless
applications
- Detection of SwiftShader and ARM Mali drivers with
@ref GL::Context::DetectedDriver::SwiftShader and
@ref GL::Context::DetectedDriver::ArmMali
- It's now possible to pass @ref std::initializer_list to
@ref GL::Buffer::setData() / @ref GL::Buffer::setSubData() for a succint
upload of basic types
- Added an ability to use Magnum with multiple OpenGL contexts using
@ref GL::Context::makeCurrent(), see @ref GL-Context-usage-multiple for more
information
- @ref GL::AbstractFramebuffer::read(), @ref GL::Texture::image(),
@ref GL::Texture::subImage(), @ref GL::Texture::compressedImage(),
@ref GL::Texture::setCompressedSubImage() and equivalent APIs in other
texture classes now can read the pixels into
@ref BasicMutableImageView "MutableImageView*D" and
@ref BasicMutableCompressedImageView "MutableCompressedImageView*D" as well
- @ref GL::hasTextureFormat() and @ref GL::textureFormat() helpers for
converting @ref PixelFormat / @ref CompressedPixelFormat to
@ref GL::TextureFormat, similar to @ref GL::hasPixelFormat() /
@ref GL::pixelFormat() used for converting to @ref GL::PixelFormat
@subsubsection changelog-2019-10-new-math Math library
- @ref Math::Frustum::begin() / @ref Math::Frustum::end() accessors for
easy range-for access to @ref Math::Frustum planes
- New @ref Math::Matrix4::perspectiveProjection(const Vector2<T>&, const Vector2<T>&, T, T)
overload for calculating off-center projection matrices
- @ref Color3ub and @ref Color4ub can be printed with
@ref Corrade::Utility::Debug as actual colors using the
@ref Corrade::Utility::Debug::color modifier
- Added convenience @ref BoolVector2, @ref BoolVector3 and @ref BoolVector4
typedefs to the root namespace
- New @ref Math::IsScalar, @ref Math::IsVector, @ref Math::IsIntegral,
@ref Math::IsFloatingPoint and @ref Math::IsUnitless type traits and a
@ref Math::UnderlyingTypeOf utility
- Added batch versions of @ref Math::isInf() and @ref Math::isNan()
- Scalar and vector @ref Math::equal() and @ref Math::notEqual() which do a
component-wise comparison in the vector case, as the equality/non-equality
operators return a single @cpp bool @ce
7 years ago
- @ref Math::scatter() as an inverse operation to @ref Math::gather(), both
functions now support addressing via component indices as well
- Added @ref Math::Matrix::cofactor(), @ref Math::Matrix::comatrix() and
a new @ref Math::Matrix4::normalMatrix() accessor that implements a faster
and more robust normal matrix calculation; and mainly for testing purposes
exposed @ref Math::Matrix::adjugate() that was an internal part of
@ref Math::Matrix::inverted() before
@subsubsection changelog-2019-10-new-meshtools MeshTools library
- @ref MeshTools::duplicateInto() alternative to @ref MeshTools::duplicate()
that writes the output to an existing location
- @ref MeshTools::generateFlatNormalsInto() alternative to
@ref MeshTools::generateFlatNormals() that writes the output to an existing
location
- @ref MeshTools::generateSmoothNormals() for generating weighted smooth
normals of indexed meshes (see [mosra/magnum#229](https://github.com/mosra/magnum/pull/229))
- @cpp MeshTools::compile(const Trade::MeshData3D&, CompileFlags) @ce now
accepts optional flags to control normal generation
@subsubsection changelog-2019-10-new-platform Platform libraries
- Added @ref Platform::EmscriptenApplication, implementing a lightweight and
more flexible alternative to @ref Platform::Sdl2Application for Emscripten.
This is now the recommended application to use for WebGL builds. See
[mosra/magnum#300](https://github.com/mosra/magnum/pull/300) and
[mosra/magnum-bootstrap#17](https://github.com/mosra/magnum-bootstrap/pull/17).
- @ref Platform::Sdl2Application and @ref Platform::GlfwApplication are now
DPI-aware on Windows as well. See their documentation,
@ref platforms-windows-hidpi, [mosra/magnum#243](https://github.com/mosra/magnum/issues/243)
and [mosra/magnum#349](https://github.com/mosra/magnum/pull/349) for more
information.
- Added @ref Platform::Sdl2Application::glContext() to access the underlying
`SDL_GLContext` (see [mosra/magnum#325](https://github.com/mosra/magnum/pull/325))
- Added @ref Platform::Sdl2Application::setMinWindowSize() and
@ref Platform::Sdl2Application::setMinWindowSize() + equivalent APIs for
@ref Platform::GlfwApplication (see [mosra/magnum#335](https://github.com/mosra/magnum/pull/335))
- New [base-wxwidgets](https://github.com/mosra/magnum-bootstrap/tree/base-wxwidgets)
bootstrap project for using Magnum together with wxWidgets (see
[mosra/magnum-bootstrap#19](https://github.com/mosra/magnum-bootstrap/pull/19))
- Added @ref Platform::Sdl2Application::setWindowTitle() (and equivalents
in @ref Platform::GlfwApplication and @ref Platform::EmscriptenApplication)
for changing window title at runtime as opposed to setting them on
application startup
- Added @ref Platform::Sdl2Application::Configuration::WindowFlag::OpenGL and
@ref Platform::Sdl2Application::Configuration::WindowFlag::Vulkan "WindowFlag::Vulkan",
meant to be used together with @ref Platform::Sdl2Application::Configuration::WindowFlag::Contextless for
manual creation of OpenGL contexts and Vulkan instances
- @ref Platform::WindowlessEglApplication now uses the
@m_class{m-doc-external} [EGL_EXT_device_enumeration](https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_enumeration.txt),
@m_class{m-doc-external} [EGL_EXT_platform_base](https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_base.txt) and
@m_class{m-doc-external} [EGL_EXT_platform_device](https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_device.txt) extensions where
available instead of `EGL_DEFAULT_DISPLAY`, working better on headless
setups and allowing selection of an arbitrary GPU device on multi-GPU
systems
@subsubsection changelog-2019-10-new-primitives Primitives library
- @ref Primitives::circle2DSolid() and @ref Primitives::circle3DSolid()
can now generate a textured mesh
@subsubsection changelog-2019-10-new-scenegraph SceneGraph library
- Added @ref SceneGraph::AbstractObject::Type /
@ref SceneGraph::AbstractFeature::Type /
@ref SceneGraph::AbstractFeatureGroup::Type typedefs and
@ref SceneGraph::AbstractObject::Dimensions /
@ref SceneGraph::AbstractFeature::Dimensions /
@ref SceneGraph::AbstractFeatureGroup::Dimensions constants for querying
underlying type and dimension template parameters
@subsubsection changelog-2019-10-new-shaders Shaders library
- Normal texture support in @cpp Shaders::Phong @ce
- Added @cpp Shaders::Generic3D::Tangent @ce generic vertex attribute
definition
- Object ID output in @cpp Shaders::Flat @ce and @cpp Shaders::Phong @ce
- Vertex color support in @cpp Shaders::Flat @ce and @cpp Shaders::Phong @ce
@subsubsection changelog-2019-10-new-text Text library
- A new @ref Text::AbstractGlyphCache base now makes @ref Text::AbstractFont
and @ref Text::AbstractFontConverter independent on the graphics API used,
meaning the @ref Text library now has just an optional dependency on
@ref GL. The @ref Text::Renderer, @ref Text::GlyphCache and
@ref Text::DistanceFieldGlyphCache classes are now built only if
`TARGET_GL` is enabled (done by default).
- New @ref Text::AbstractFont::setFileCallback() to allow opening multi-file
fonts with an API similar to @ref Trade::AbstractImporter
@subsubsection changelog-2019-10-new-trade Trade library
- The @ref magnum-imageconverter "magnum-imageconverter" utility now
implements new `-i` / `--importer-options` and `-c` / `--converter-options`
command-line options for setting plugin-specific configuration
@subsection changelog-2019-10-changes Changes and improvements
- The @ref ResourceManager class now accepts also
@ref Corrade::Containers::Pointer instances in addition to raw pointers
- The @ref AbstractResourceLoader::set() function now accepts also
@cpp nullptr @ce for explicitly setting @ref ResourceDataState::Loading or
@ref ResourceDataState::NotFound resources
- Added comparison operators to @ref Resource (see
[mosra/magnum#346](https://github.com/mosra/magnum/pull/346))
- @ref ImageView and @ref CompressedImageView of smaller dimension count are
now implicitly convertible to views of higher dimension count to make
slice-by-slice uploads to @ref GL::TextureArray and others easier
- @ref Image::data(), @ref CompressedImage::data() and
@ref Trade::ImageData::data() called on a r-value now return
@ref Corrade::Containers::Array instead of being deleted
- Global state used by @ref GL::Context and @ref Audio::Context is no longer
duplicated when Magnum is built statically and linked to more than one
dynamic library or executable. This works on all platforms except for
Python bindings on Windows at the moment, where the workaround is to build
both Corrade and Magnum dynamically.
- The [base-qt](https://github.com/mosra/magnum-bootstrap/tree/base-qt)
bootstrap project is fixed to use OpenGL 4.1 on macOS instead of being
stuck on 2.1 (see [mosra/magnum-bootstrap#22](https://github.com/mosra/magnum-bootstrap/issues/22))
- Since asm.js days are long over and WebAssembly supports 64-bit integers
natively, the @ref UnsignedLong and @ref Long types are now exposed on
@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten" as well
7 years ago
@subsubsection changelog-2019-10-changes-animation Animation library
7 years ago
- Default extrapolation of @ref Animation::TrackView was changed from
@ref Animation::Extrapolation::Extrapolated to
@ref Animation::Extrapolation::Constant to be consistent with
@ref Animation::Track
@subsubsection changelog-2019-10-changes-audio Audio library
- The @ref Audio::AnyImporter "AnyAudioImporter" plugin now correctly
recognizes also uppercase file extensions (see
[mosra/magnum#312](https://github.com/mosra/magnum/pull/312))
@subsubsection changelog-2019-10-changes-debugtools DebugTools library
- @ref DebugTools::CompareImage, @ref DebugTools::CompareImageToFile and
other variants are now usable directly through @ref CORRADE_COMPARE_AS(),
no need to pass an explicit instance to @ref CORRADE_COMPARE_WITH() when
just the default parameters are needed
- @ref DebugTools::textureSubImage() for float textures was updated to work
with SwiftShader (which has broken @glsl gl_VertexID @ce)
@subsubsection changelog-2019-10-changes-gl GL library
- Fully dropped support for @gl_extension{EXT,direct_state_access}. All
contemporary drivers supporting @gl_extension{EXT,direct_state_access}
support the (newer and better designed) @gl_extension{ARB,direct_state_access},
while drivers that don't support the ARB version don't support the EXT
flavor either. See also [mosra/magnum#81](https://github.com/mosra/magnum/issues/81).
- Reworked @ref GL::Mesh internals to make use of
@gl_extension{ARB,direct_state_access} instead of being the last code path
stuck on @gl_extension{EXT,direct_state_access}
- @ref GL::DebugOutput::setCallback() no longer assumes the debug message
callback is called from the same thread as the one with the corresponding
GL context (which is the case on Mesa AMD drivers). The documentation was
updated to reflect that as well.
- @ref GL::AbstractTexture::unbindImage() "GL::*Texture::unbindImage()" now
uses a RGBA format instead of a single-channel format because
@ref GL::Context::DetectedDriver::ArmMali "ARM Mali" drivers complain about
R8 not being renderable (even though the format shouldn't matter when
unbinding a texture)
- The engine was silently doing an explicit initial call to @fn_gl{Viewport}
when it detected it's running under ApiTrace, because otherwise ApiTrace
would assume a zero-sized framebuffer. This behavior is no longer silent
but advertised as a @cpp "apitrace-zero-initial-viewport" @ce workaround.
See @ref opengl-workarounds for more information.
- @ref GL::OpenGLTester no longer implicitly enables @ref GL::DebugOutput as
it can be quite spammy when complex shaders or benchmarks are allowed. For
easier debugging, users are encouraged to use the new
`--magnum-gpu-validation` @ref GL-Context-usage-command-line "command line option"
instead.
- Added an ability to create @ref GL::DynamicAttribute directly from a
@ref GL::Attribute
@subsubsection changelog-2019-10-changes-math Math library
7 years ago
- @ref Math::BoolVector now implements component-wise @cpp && @ce,
@cpp || @ce and @cpp ! @ce for better consistency with boolean operations
done on scalar types
- Construction using @ref Math::ZeroInit and @ref Math::IdentityInit is
now explicit, to be consistent with @ref Math::NoInit construction and
avoid ambiguous cases
- All scalar/vector functions in the @ref Math namespace now work also with
special types such as @ref Deg or @ref Rad --- the only exception is
power functions such as @ref Math::sqrt() or @ref Math::log(), as the
resulting unit can't be represented. Those accept only unitless types.
- All batch functions in @ref Magnum/Math/FunctionsBatch.h now accept
@ref Corrade::Containers::StridedArrayView instead of a dense array view to
make them usable in more contexts
- @ref Math::Vector::min(), @ref Math::Vector::max(),
@ref Math::Vector::minmax() and batch
@ref Math::min(const Containers::StridedArrayView1D<const T>&),
@ref Math::max(const Containers::StridedArrayView1D<const T>&) and
@ref Math::minmax(const Containers::StridedArrayView1D<const T>&) functions now
ignore NaNs in the data, if possible. Use
@ref Math::isNan(const Vector<size, T>&) or the batch
@ref Math::isNan(const Containers::StridedArrayView1D<const T>&) to detect
presence of NaN values if needed.
- Changed the way @ref Math::operator<<(Corrade::Utility::Debug&, const BoolVector<size>&)
works --- the output now has the same bit order as when constructing it
using binary literals
- @ref Math::sincos() now uses the `__builtin_sincos` intrinsic on GCC,
making it potentially faster in case the optimizer doesn't figure out the
same
- @ref Math::Vector::operator-() and @ref Math::Vector2::perpendicular() are
now enabled only for signed types to prevent accidents
7 years ago
@subsubsection changelog-2019-10-changes-meshtools MeshTools library
- @ref MeshTools::fullScreenTriangle() was updated to work on ES3 SwiftShader
contexts (which have broken @glsl gl_VertexID @ce)
- @ref MeshTools::interleave() and @ref MeshTools::interleaveInto() now works
also with @ref Corrade::Containers::ArrayView,
@ref Corrade::Containers::StridedArrayView and friends
@subsubsection changelog-2019-10-changes-shaders Shaders library
- All shaders now have rendering output tests, making them more robust for
future additions and refactorings. See also [mosra/magnum#382](https://github.com/mosra/magnum/pull/382).
- @cpp Shaders::Phong @ce now clamps the specular factor to minimize artifacts
when shininess is near zero
- @cpp Shaders::Phong @ce can now handle zero lights, in which case its output
is equivalent to @cpp Shaders::Flat3D @ce. See
@ref Shaders-PhongGL-lights-zero for more information.
- @cpp Shaders::MeshVisualizer @ce is fixed to work properly on Intel Windows
drivers, adding a new
@cpp "intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped" @ce
workaround
@subsubsection changelog-2019-10-changes-texturetools TextureTools library
- @ref TextureTools::DistanceField was updated to work on ES3 SwiftShader
contexts (which have broken @glsl gl_VertexID @ce)
@subsubsection changelog-2019-10-changes-platform Platform libraries
- @ref Platform::Sdl2Application::anyEvent() is now fired also for window
events that are not exposed through
@ref Platform::Sdl2Application::viewportEvent() "viewportEvent()" or
@ref Platform::Sdl2Application::exitEvent() "exitEvent()"
- On OpenGL ES builds, @ref Platform::Sdl2Application now tells SDL whether
to use a system GL driver or a dedicated GLES driver based on whether
@ref MAGNUM_TARGET_DESKTOP_GLES is defined. This allows for a smoother
experience for example when using ANGLE on Windows. See
@ref Platform-Sdl2Application-usage-gles for more information.
- Replaced uses of `Pointer_stringify()` in @ref Platform::Sdl2Application
which was removed in Emscripten 1.38.27
- @ref Platform::Sdl2Application and all Emscripten markup was updated to
work correctly both with the
[`-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1`](https://github.com/emscripten-core/emscripten/pull/7977)
option available since Emscripten 1.38.27 and with older versions
- @ref Platform::WindowlessEglApplication was adapted to properly create
WebGL 2 contexts both in Emscripten 1.38.24 and in older versions
- @ref Platform::Sdl2Application::exit() and
@ref Platform::GlfwApplication::exit() now have an optional parameter to
specify the actual application return code (see
[mosra/magnum#332](https://github.com/mosra/magnum/pull/332))
- @ref Platform::Sdl2Application::mainLoopIteration() now returns a
@cpp bool @ce to indicate if the application should exit
- @ref Platform::GlfwApplication, @ref Platform::EmscriptenApplication and
@ref Platform::AndroidApplication now implement
@ref Platform::GlfwApplication::MouseMoveEvent::relativePosition() as well
for better compatibility with @ref Platform::Sdl2Application. The relative
position is not supplied by the underlying toolkits, so it's emulated on
the application side.
- Extended @ref Platform::BasicScreen with
@ref Platform::BasicScreen::mouseScrollEvent() "mouseScrollEvent()",
@ref Platform::BasicScreen::textInputEvent() "textInputEvent()" and
@ref Platform::BasicScreen::textEditingEvent() "textEditingEvent()" on
application implementations that provide such events
- @ref Platform::BasicScreenedApplication is now available also for
@ref Platform::AndroidApplication
7 years ago
- New @ref Platform::BasicScreen::BasicScreen(BasicScreenedApplication<Application>&, PropagatedEvents)
constructor that directly adds the newly-created screen to an application
in a RAII manner, without needing to explicitly call
@ref Platform::BasicScreenedApplication::addScreen() and
@ref Platform::BasicScreen::setPropagatedEvents() later
- @ref Platform::BasicScreen::application() now returns a reference instead
of a pointer, checking that the screen is actually added to the
application. Users are encouraged to call
@ref Platform::BasicScreen::hasApplication() to check if the application is
accessible.
@subsubsection changelog-2019-10-changes-text Text library
- For consistency with @ref Trade::AbstractImporter, @ref Text::AbstractFont
now doesn't fail when opening empty files --- instead this is handled in
the particular plugin implementations
- @ref Text::AbstractFont::size(), @ref Text::AbstractFont::ascent(),
@ref Text::AbstractFont::descent() and @ref Text::AbstractFont::lineHeight()
now expect that a font is opened, consistently with other accessor
functions
@subsubsection changelog-2019-10-changes-trade Trade library
- The @ref Trade::AnyImageImporter "AnyImageImporter",
@ref Trade::AnyImageConverter "AnyImageConverter" and
@ref Trade::AnySceneImporter "AnySceneImporter" plugins now correctly
recognize also uppercase file extensions (see
[mosra/magnum#312](https://github.com/mosra/magnum/pull/312))
- @ref Trade::TgaImporter "TgaImporter" now properly reports an error message
when opening an empty file
- @ref Trade::AbstractImporter::setFileCallback() now accepts callbacks with
@cpp const @ce references to user data as well
- @ref Trade::AnyImageImporter "AnyImageImporter" and
@ref Trade::AnyImageConverter "AnyImageConverter" plugins now recognize
Basis Universal files (see [mosra/magnum#370](https://github.com/mosra/magnum/pull/370))
@subsection changelog-2019-10-buildsystem Build system
- @ref building-packages-msys "MSYS2 packages" are now in official
repositories, installable directly via `pacman`
- Plugin search path on Windows is now discovered relative to location of the
@ref Trade, @ref Text or @ref 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, @ref Platform::GlfwApplication and
@ref 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](https://github.com/mosra/magnum/pull/347) for
more information.
- Updated *extremely* outdated Emscripten boilerplate from the
[base-emscripten bootstrap project](https://github.com/mosra/magnum-bootstrap/tree/base-emscripten)
(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](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/magnum/issues/219))
- Updated the Vcpkg package to work correctly with Vcpkg's own SDL2 (see
[Microsoft/vcpkg#5730](https://github.com/Microsoft/vcpkg/pull/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](https://cmake.org/cmake/help/v3.11/module/FindOpenGL.html#linux-specific)
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 @ref building as it doesn't
seem to be maintained anymore (see
[mosra/magnum-examples#61](https://github.com/mosra/magnum-examples/issues/61))
- Worked around a bug in the NVCC compiler on Windows involving
@ref Math::RectangularMatrix::DiagonalSize to make Magnum usable with CUDA
(see [mosra/magnum#345](https://github.com/mosra/magnum/issues/345))
- Fixed a 64-to-32-bit conversion warning on MSVC in @ref GL::Mesh internals
(see [mosra/magnum#352](https://github.com/mosra/magnum/issues/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](https://github.com/emscripten-core/emscripten/issues/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.
@subsection changelog-2019-10-bugfixes Bug fixes
- Fixed compilation of the @ref Vk library on 32-bit Windows
- @ref Math::pack() was incorrectly not selecting the nearest integral value,
causing @ref Math::Color3::toSrgbInt() to not roundtrip, among other
things.
- The @cb{.cmake} android_create_apk() @ce macro for
@ref platforms-android-apps-cmake "Gradle-less Android builds" now properly
creates the library output directory beforehand
- Fixed a bad interaction of @ref GL::Mesh and @ref GL::Buffer state trackers
resulting in corrupted rendering on ES/WebGL platforms and systems without
@gl_extension{ARB,direct_state_access}
- Fixed @ref GL::Mesh instanced drawing to properly take into account all
five @gl_extension{ANGLE,instanced_arrays},
@gl_extension{EXT,instanced_arrays}, @gl_extension{EXT,draw_instanced},
@gl_extension{NV,instanced_arrays} and @gl_extension{NV,draw_instanced}
extensions
- @ref Platform::GLContext would crash on destruction if it was constructed
with @ref NoCreate but @ref Platform::GLContext::create() was never called
(see [mosra/magnum#331](https://github.com/mosra/magnum/pull/331)
- Reading of float textures on ES3 contexts using
@ref DebugTools::textureSubImage() returned a zero-sized image by accident
- @ref MeshTools::compile() was producing an incorrect mesh when
@cpp Trade::MeshData @ce had both colors and texture coordinates
- Properly zero-initializing the UTF-8 buffer in
@ref Platform::GlfwApplication::textInputEvent() (see
[mosra/magnum#324](https://github.com/mosra/magnum/pull/324))
- @ref Platform::Sdl2Application::viewportEvent() and
@ref Platform::GlfwApplication::viewportEvent() is fixed to behave
correctly with @ref platforms-macos-hidpi "Retina-aware" apps on macOS/iOS
7 years ago
- @ref Text::AbstractFontConverter::exportFontToFile() and
@ref Text::AbstractFontConverter::exportGlyphCacheToFile() now properly
returns failure when the underlying data export function returns an empty
list of files
- Updated the `base-qt` bootstrap project to correctly reset state tracker
when going from and back to Qt code, and to use the framebuffer provided by
Qt instead of @ref GL::defaultFramebuffer (see
[mosra/magnum#322](https://github.com/mosra/magnum/issues/322) and
[mosra/magnum-bootstrap#15](https://github.com/mosra/magnum-bootstrap/pull/15))
- @ref Trade::TgaImporter "TgaImporter" now properly handles files with too
short data (see [mosra/magnum#359](https://github.com/mosra/magnum/issues/359))
- When context creation fails *really bad* with
@ref Platform::Sdl2Application, @ref Platform::GlfwApplication,
@ref Platform::WindowlessGlxApplication or
@ref Platform::WindowlessWglApplication, driver detection for the
@cpp "no-forward-compatible-core-context" @ce now properly handles
@fn_gl{GetString} returning a @cpp nullptr @ce
- @ref GL::Texture::imageSize() was present on WebGL 2 by mistake (see
[mosra/magnum#365](https://github.com/mosra/magnum/pull/365))
- @ref GL::BufferTexture::setBuffer() now creates the passed buffer if not
already (and if it was not created by @fn_gl{CreateBuffers}). Before that,
passing a freshly created @ref GL::Buffer to it was causing
@ref GL::Renderer::Error::InvalidOperation on systems without
@gl_extension{ARB,direct_state_access}.
- Fixed @cpp Shaders::Vector @ce and @cpp Shaders::DistanceFieldVector @ce to
work on iOS, which has only 8 texture binding slots in total (see
[mosra/magnum-examples#65](https://github.com/mosra/magnum-examples/issues/65)
and [mosra/magnum#374](https://github.com/mosra/magnum/pull/374))
@subsection changelog-2019-10-docs Documentation
- Extended @ref platforms-html5-code-size "Emscripten" documentation with
available compiler switches for code size / compile time tradeoffs (instead
of unconditionally enabling them by default, see
[mosra/magnum#211](https://github.com/mosra/magnum/issues/211))
- Fixed Gentoo build instructions (see
[mosra/magnum#344](https://github.com/mosra/magnum/pull/344))
- Various documentation improvements and copy editing (see
[mosra/magnum#341](https://github.com/mosra/magnum/issues/341),
[mosra/magnum#361](https://github.com/mosra/magnum/pull/361))
- Populating the Troubleshooting section of
@ref platforms-windows "Windows-specific platform notes" (see
[mosra/magnum#355](https://github.com/mosra/magnum/issues/355))
- Extended info about the `--head` option in @ref building-packages-vcpkg
(see [mosra/magnum#367](https://github.com/mosra/magnum/issues/367))
- The @ref getting-started "Getting Started Guide" was rewritten to be easier
to follow for Windows users, removing usual pain points (see
[mosra/magnum#377](https://github.com/mosra/magnum/issues/377) and
[mosra/magnum#378](https://github.com/mosra/magnum/issues/378))
@subsection changelog-2019-10-deprecated Deprecated APIs
- @cpp Math::Color3::Hsv @ce and @cpp Math::Color4::Hsv @ce tuple typedefs
are deprecated in favor of tuple-less @ref Math::ColorHsv, working
correctly with the usual @ref Math::NoInit / @ref Math::ZeroInit tags while
being faster to compile
- @cpp Math::Frustum::planes() @ce are deprecated due to redundancy, use
either @ref Math::Frustum::operator[](), @ref Math::Frustum::data() or
range access using @ref Math::Frustum::begin() / @ref Math::Frustum::end()
- Batch @ref Math::min(const Containers::StridedArrayView1D<const T>&),
@ref Math::max(const Containers::StridedArrayView1D<const T>&) and
@ref Math::minmax(const Containers::StridedArrayView1D<const T>&) are moved
to a new @ref Magnum/Math/FunctionsBatch.h header in order to speed up
compile times. This header is included from @ref Magnum/Math/FunctionsBatch.h
when building with @ref MAGNUM_BUILD_DEPRECATED enabled, include it
explicitly to ensure forward compatibility
- @cpp Trade::ImporterFileCallbackPolicy @ce is deprecated as it was moved
to @ref InputFileCallbackPolicy in the root namespace to be shared with
APIs outside of the @ref Trade namespace. Moreover,
@cpp InputFileCallbackPolicy::LoadPernament @ce is deprecated due to a
typo, use @ref InputFileCallbackPolicy::LoadPermanent instead.
- @cpp DebugTools::ForceRendererOptions::scale() @ce is deprecated in favor
of @ref DebugTools::ForceRendererOptions::size(), as that's more consistent
with the documentation and the corresponding setter.
- @cpp Text::AbstractFont::openSingleData() @ce and
@cpp Text::AbstractFont::openData() @ce taking a list of files are
deprecated in favor of
@ref Text::AbstractFont::openData(Containers::ArrayView<const void>, Float)
and @ref Text::AbstractFont::setFileCallback()
- @ref GL::Buffer::setData() and @ref GL::Buffer::setSubData() no longer has
overloads taking @ref std::vector / @ref std::array, but instead relies on
@ref Corrade/Containers/ArrayViewStl.h to provide conversion from these to
@ref Corrade::Containers::ArrayView. This header is included automatically
when @ref MAGNUM_BUILD_DEPRECATED is enabled, include it explicitly to stay
forward compatible.
- @cpp GL::TextureFormat::R3B3G2 @ce had a misleading typo in the name, use
@ref GL::TextureFormat::R3G3B2 instead.
- @ref GL::AbstractTexture destructor is now @cpp protected @ce on builds
with @ref MAGNUM_BUILD_DEPRECATED disabled in order to avoid accidents with
subclass destructors not being called. Right now all subclasses themselves
have trivial destruction, but that may change in the future due to driver
workarounds being added.
- @cpp Magnum/MeshTools/GenerateFlatNormals.h @ce is deprecated, use
@ref Magnum/MeshTools/GenerateNormals.h instead
- @cpp MeshTools::generateFlatNormals(const std::vector<UnsignedInt>&, const std::vector<Vector3>&) @ce
is deprecated for doing too many things at once and being too tied to one
particular STL container, use @ref MeshTools::generateFlatNormals(const Containers::StridedArrayView1D<const Vector3>&)
instead
- Templated versions of @ref Image::data(), @ref ImageView::data(),
@ref CompressedImage::data(), @ref CompressedImageView::data() and
@ref Trade::ImageData::data() that returned a raw pointer are deprecated,
use the non-templated version together with
@ref Corrade::Containers::arrayCast() instead for properly bounds-checked
type conversion
- Passing @cpp nullptr @ce to @ref ImageView constructors is deprecated and
will print a warning at runtime. Use a constructor without the @p data
parameter instead.
- The @cpp ResourceManager::instance() @ce singleton (and its implicit use in
@ref DebugTools::ForceRenderer and @ref DebugTools::ObjectRenderer) is
deprecated as it makes some use cases harder than they should be. Make your
own singleton or explicitly pass a @ref ResourceManager reference around
instead.
- @ref Platform::BasicScreen::application() now returns a reference instead
of a pointer and together with @ref Platform::BasicScreen::redraw() checks
that the screen is actually added to the application instead of returning
@cpp nullptr @ce (and requiring excessive error checking in user code) or,
in case of @ref Platform::BasicScreen::redraw() "redraw()" silently doing
the wrong thing. For backwards compatibility
@ref Platform::BasicScreenedApplication is convertible to a pointer and
implements @cpp operator-> @ce, but this conversion is deprecated.
- @cpp Math::swizzle() @ce is deprecated, use @ref Math::gather() instead as
that fits better with the new @ref Math::scatter()
@subsection changelog-2019-10-compatibility Potential compatibility breakages, removed APIs
- Configuration value parsers and writers for @ref Math types were moved to
a dedicated @ref Magnum/Math/ConfigurationValue.h header in order to speed
up compile times. Backwards compatibility is not provided, when using
@ref Math types with @ref Corrade::Utility::Configuration or
@ref Corrade::Utility::Arguments you have to include the header explicitly
- @ref Audio::Extension::extensions() and @ref GL::Extension::extensions()
now return a @ref Corrade::Containers::ArrayView instead of a reference to
@ref std::vector in order to reduce binary bloat and compile times
- Removed all aliases to @ref GL library functionality in the root namespace
(and root include path) which were deprecated in 2018.04 and everything
related to this change:
- @cpp GL::Mesh::IndexType @ce and @cpp GL::Mesh::indexSize() @ce,
use @ref GL::MeshIndexType and @ref GL::Mesh::indexTypeSize() instead
- Removed @cpp Primitives::Capsule2D @ce, @cpp Primitives::Capsule3D @ce,
@cpp Primitives::Circle @ce, @cpp Primitives::Crosshair2D @ce,
@cpp Primitives::Crosshair3D @ce, @cpp Primitives::Cube @ce,
@cpp Primitives::Cylinder @ce, @cpp Primitives::Icosphere @ce,
@cpp Primitives::Line @ce, @cpp Primitives::Plane @ce,
@cpp Primitives::Square @ce and @cpp Primitives::UVSphere @ce classes
deprecated in 2018.04. The same functionality is available through free
functions in the @ref Primitives namespace, use those instead.
- Removed templated overloads of @ref GL::Buffer::data(),
@ref GL::Buffer::subData() and @ref GL::Buffer::map() deprecated
since 2017. Use the non-templated versions together with
@ref Corrade::Containers::arrayCast().
- Removed @cpp GL::Context::DetectedDriver::AMD @ce and
@cpp GL::Context::DetectedDriver::ProbablyAngle @ce aliases deprecated
since 2017, use consistently-named @ref GL::Context::DetectedDriver::Amd
and @ref GL::Context::DetectedDriver::Angle instead
- Removed @cpp GL::CubeMapTexture::Coordinate @ce deprecated since 2016, use
@ref GL::CubeMapCoordinate instead
- Removed remaining @ref Platform::Sdl2Application "Platform::*Application"
constructors taking @cpp nullptr @ce instead of @ref NoCreate, deprecated
since 2017
- Removed compatibility code in @ref Audio::Context where
@ref Audio::Context::current() would be usable with both @cpp . @ce and
@cpp -> @ce, deprecated since 2017
- Removed @cpp Audio::Context::hrtfSpecifier() @ce deprecated since 2018.02.
Use @ref 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](https://github.com/mosra/magnum/issues/148))
- Removed the `Platform::GlutApplication` as it was based on an outdated
toolkit and deprecated since version 2018.10 (see
[mosra/magnum#148](https://github.com/mosra/magnum/issues/148) and
[mosra/magnum#195](https://github.com/mosra/magnum/pull/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 @cb{.html} <canvas> @ce element identified by @cb{.css} #canvas @ce. You need to:
- update your HTML markup to use
@cb{.html} <canvas id="canvas"> @ce instead of
@cb{.html} <canvas id="module"> @ce
- in case you have a copy or a fork of the JS driver file, it needs to
define @cb{.js} Module.canvas @ce as
@cb{.js} document.getElementById('canvas') @ce (instead of
@cb{.js} 'module' @ce)
- and for CSS files, all references to @cb{.css} #module @ce need to be
@cb{.css} #canvas @ce 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 @ref CORRADE_BUILD_MULTITHREADED
instead
- @ref PixelFormat and @ref 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.
- @cpp Shaders::MeshVisualizer @ce now asserts if its wireframe-related
setters are called when the @cpp Shaders::MeshVisualizer::Flag::Wireframe @ce
flag was not set, consistently with other shaders. This might cause
failures in code that was calling them unnecessarily before.
@section changelog-2019-01 2019.01
Released 2019-02-04, tagged as
[v2019.01](https://github.com/mosra/magnum/releases/tag/v2019.01).
@subsection changelog-2019-01-dependencies 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](https://github.com/mosra/magnum/issues/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](https://github.com/mosra/magnum/issues/274).
@subsection changelog-2019-01-new New features
@subsubsection changelog-2019-01-new-animation Animation library
- New @ref Animation::Easing namespace with a collection of well-documented
easing functions
- New @ref Animation::ease(), @ref Animation::easeClamped(),
@ref Animation::unpack(), @ref Animation::unpackEase() and
@ref Animation::unpackEaseClamped() utilities for combining interpolators
with easing functions and/or unpackers
- @ref Animation::Player::resume() that acts the same as
@ref Animation::Player::play() "play()" except it doesn't restart the
animation from the start if it is already playing
- Added @ref Animation::Player::advance(T, std::initializer_list<Containers::Reference<Player<T, K>>>)
for advancing multiple players at the same time
@subsubsection changelog-2019-01-new-math Math library
- Support for using the @ref Math::Deg, @ref Math::Rad, @ref Math::Half,
@ref Math::Color3 and @ref Math::Color4 literals with the new experimental
@ref Corrade::Utility::Tweakable utility. See also @ref tweakableliterals.
- New @ref Math::StrictWeakOrdering functor making it possible to use Magnum
math types as keys in ordered STL containers such as @ref std::map or
@ref std::set (see also [mosra/magnum#299](https://github.com/mosra/magnum/pull/299))
@subsubsection changelog-2019-01-new-platform Platform libraries
- Added @ref Platform::AndroidApplication::framebufferSize(),
@ref Platform::AndroidApplication::dpiScaling(),
@ref Platform::AndroidApplication::ViewportEvent::dpiScaling(),
@ref Platform::GlfwApplication::ViewportEvent::framebufferSize() and
@ref Platform::GlfwApplication::ViewportEvent::dpiScaling() to ensure
feature parity with @ref Platform::Sdl2Application
- Clarified HiDPI behavior of Android apps and mentioning
@ref platforms-android-apps-manifest-screen-compatibility-mode "the necessary steps"
in the docs
- Implemented handling of @ref Platform::AndroidApplication::viewportEvent()
and documenting how to get Android to call it instead of relaunching the
app from scratch
- New @ref Platform::Sdl2Application::exitEvent() and
@ref Platform::GlfwApplication::exitEvent() events for responding to
application window close and possibility to cancel it (for example to
show an exit confirmation dialog)
- New @ref Platform::Sdl2Application::anyEvent() event together with
@ref Platform::Sdl2Application::InputEvent::event() "event()" accessors to
make it possible to access raw `SDL_Event` data
@subsubsection changelog-2019-01-new-vk Vk library
- Conversion between Magnum math types and math-related Vulkan types in a
new @ref Magnum/Vk/Integration.h header
@subsection changelog-2019-01-changes Changes and improvements
@subsubsection changelog-2019-01-changes-audio Audio library
- @ref Audio::Source::play(), @ref Audio::Source::pause(),
@ref Audio::Source::rewind() and @ref Audio::Source::stop() now return
a self-reference like all other methods for easier method chaining
@subsubsection changelog-2019-01-changes-gl GL library
- Added a @cpp "nv-egl-incorrect-gl11-function-pointers" @ce 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
@fn_gl{GetString} behave incorrectly when linked statically. See also
[mosra/magnum#308](https://github.com/mosra/magnum/pull/308).
- New @ref 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)
@subsubsection changelog-2019-01-changes-platform Platform libraries
- @ref Platform::Sdl2Application::swapBuffers(), "Platform::*Application::swapBuffers()"
@ref Platform::Sdl2Application::swapInterval() "swapInterval() const" const,
@ref Platform::Sdl2Application::setSwapInterval() "setSwapInterval()",
@ref Platform::Sdl2Application::setMinimalLoopPeriod() "setMinimalLoopPeriod()" and
@ref Platform::Sdl2Application::redraw() "redraw()" were changed from
protected to public to allow calling them from outside
@subsubsection changelog-2019-01-changes-text Text library
- The @ref Text::AbstractFont and @ref Text::AbstractFontConverter plugin
APIs now return @ref Corrade::Containers::Pointer instead of
@ref std::unique_ptr for improved compile times
@subsubsection changelog-2019-01-changes-texturetools TextureTools library
- Further performance and output quality improvements for
@ref 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.
@subsubsection changelog-2019-01-changes-trade Trade library
- The @ref Trade::AbstractImporter plugin API now returns
@ref Corrade::Containers::Pointer instead of @ref std::unique_ptr for
improved compile times
@subsection changelog-2019-01-buildsystem Build system
- Experimental support for creating Android APKs directly using CMake without
Gradle involved. See @ref platforms-android-apps for more information. See
7 years ago
also [mosra/toolchains#5](https://github.com/mosra/toolchains/pull/5) and
[mosra/toolchains#6](https://github.com/mosra/toolchains/pull/6).
- Initial scaffolding for [Hunter](https://hunter.sh) package support (see
[mosra/magnum#298](https://github.com/mosra/magnum/pull/298))
- The `package/msys` directory now contains `PKGBUILD`s for
[MSYS2](https://www.msys2.org/). See @ref building-packages-msys for more
information. See also [mosra/magnum#307](https://github.com/mosra/magnum/pull/307).
- The `Magnum::AndroidApplication` target was missing a few dependency
libraries when Magnum was used as a CMake subproject
- Fixed an ambiguous overload error in @ref Text::GlyphCache when compiling
this library under C++17 (see
[mosra/magnum#297](https://github.com/mosra/magnum/pull/297))
- Imroved initial Emscripten setup on Windows to be more frictionless (see
[mosra/toolchains#4](https://github.com/mosra/toolchains/pull/4))
- @ref DebugTools no longer unconditionally requires the @ref Trade library
in case @ref Corrade::TestSuite is found. The @ref DebugTools::CompareImage
documentation was updated to mention the optionality.
@subsection changelog-2019-01-bugfixes Bug fixes
- Fixed @ref Platform::Sdl2Application and @ref Platform::GlfwApplication to
properly support the @cb{.sh} $MAGNUM_DPI_SCALING @ce environment variable
as an alternative to `--magnum-dpi-scaling` command-line parameter. It was
also not documented anywhere. Besides that, the default `--magnum-dpi-scaling`
value should have been `default` as documented, not `virtual`.
- Don't assert in DPI scaling detection in @ref Platform::Sdl2Application and
@ref Platform::GlfwApplication on X11 DEs that don't create any
`RESOURCE_MANAGER` (see [mosra/magnum#290](https://github.com/mosra/magnum/issues/290))
- Properly escaping log output on Emscripten @ref Platform::WindowlessEglApplication
- The @ref GL::Context::States enum set was missing value combining operators
- Fixed @ref Text::DistanceFieldGlyphCache internal formats on ES2 devices
that support @gl_extension{EXT,texture_storage} (see
[mosra/magnum#289](https://github.com/mosra/magnum/pull/289))
- @ref PixelStorage::imageHeight() and Z value of @ref PixelStorage::skip()
was not properly handled on ES3 / WebGL 2 builds.
@subsection changelog-2019-01-docs Documentation
- Fixed various broken links (see [mosra/magnum#291](https://github.com/mosra/magnum/issues/291))
- A dedicated @ref types-thirdparty-integration section listing all
provided integrations with 3rd party math APIs
@subsection changelog-2019-01-deprecated Deprecated APIs
- All uses of @ref std::unique_ptr in @ref Text::AbstractFont,
@ref Text::AbstractFontConverter and @ref Trade::AbstractImporter are
replaced with @ref Corrade::Containers::Pointer. The types are implicitly
move-convertible to each other if the
@ref Corrade/Containers/PointerStl.h header is included. The header is
included where needed if @ref MAGNUM_BUILD_DEPRECATED is enabled. To ensure
your code keeps with future versions of Magnum, either switch your
code to use @ref Corrade::Containers::Pointer as well or include the
@ref Corrade/Containers/PointerStl.h header explicitly.
- @cpp TextureTools::distanceField() @ce is deprecated due to inefficiency of
its statelessness when doing batch processing. Use the
@ref TextureTools::DistanceField class instead.
- @cpp Platform::GlfwApplication::KeyEvent::Key::Smicolon @ce has a typo and
so is deprecated in favor of
@ref Platform::GlfwApplication::KeyEvent::Key::Semicolon
@subsection changelog-2019-01-compatibility Potential compatibility breakages, removed APIs
- The @ref MeshTools::fullScreenTriangle() function now returns just a
@ref GL::Mesh instead of @ref 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.
- @ref Animation::Player, @ref Audio::Listener, @ref GL::AbstractShaderProgram,
@ref GL::MeshView and @ref GL::Shader APIs that take a
@ref std::initializer_list of references were changed to use
@ref Corrade::Containers::Reference instead of a @ref 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
@cpp #include <Corrade/Containers/Reference.h> @ce where appropriate.
- Removed deprecated implicit conversion @ref Corrade::Containers::Optional
to @ref 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
@cpp #include <Corrade/Containers/Optional.h> @ce where appropriate.
- Removed the `Magnum/Test/AbstractOpenGLTester.h` header that was deprecated
in January 2017. Use @ref Magnum/GL/OpenGLTester.h and the
@ref 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 @cpp Trade::MeshData2D @ce and six-argument
@cpp Trade::MeshData3D @ce constructors that were deprecated since February
2017. Use the full six/seven-argument versions instead.
- Removed @ref Platform application constructors taking @cpp nullptr @ce,
deprecated in June 2016 for windowless apps and in March 2017 for windowed
apps. Use constructors taking the @ref NoCreate tag instead.
- Removed availability of @ref Math::Color3 and @ref Math::Color4 literals in
the root namespace, deprecated since April 2016. Explicitly call
@cpp using namespace Math::Literals; @ce instead.
- Removed uppercase `*HSV` APIs from @ref Math::Color3 and @ref Math::Color4,
deprecated since December 2016. Use the CamelCased `*Hsv` APIs instead.
- Removed @cpp Math::normalize() @ce and @cpp Math::denormalize() @ce
functions, deprecated since December 2016. Use @ref Math::pack() and
@ref Math::unpack() instead.
- Removed @cpp Platform::*Application::MouseEvent::Button::WheelUp @ce and
@cpp Platform::*Application::MouseEvent::Button::WheelDown @ce, deprecated
since June 2016. Use the dedicated
@ref Platform::Sdl2Application::mouseScrollEvent() "mouseScrollEvent()"
API instead.
- Removed @cpp Platform::GlfwApplication::Configuration::WindowFlag::Resizeable @ce,
deprecated since February 2017. Use @ref 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.
@section changelog-2018-10 2018.10
Released 2018-10-23, tagged as
[v2018.10](https://github.com/mosra/magnum/releases/tag/v2018.10).
@subsection changelog-2018-10-new New features
@subsubsection changelog-2018-10-new-animation Animation library
- New experimental @ref Animation library for keyframe-based animation
playback (see [mosra/magnum#191](https://github.com/mosra/magnum/pull/191),
[mosra/magnum#267](https://github.com/mosra/magnum/pull/267))
@subsubsection changelog-2018-10-new-debugtools DebugTools library
- New @ref DebugTools::CompareImageFile, @ref DebugTools::CompareImageToFile
and @ref DebugTools::CompareFileToImage comparators extending
@ref DebugTools::CompareImage with convenient image file loading
@subsubsection changelog-2018-10-new-gl GL library
- Exposing @ref GL::Context::Flag::ForwardCompatible through
@ref GL::Context::flags(), which was deliberately ignored before.
- New @ref GL::Renderer::lineWidthRange() limit query. The reported maximum
can be over @cpp 1.0f @ce only in non-forward-compatible contexts, a new
@cpp "mesa-forward-compatible-line-width-range" @ce workaround fixes that
for Mesa. See @ref opengl-workarounds for more information.
- Implemented the @gl_extension{ARB,sample_shading} desktop extension and the
equivalent functionality in OpenGL ES 3.2 / @gl_extension{OES,sample_shading}
ES3 extension
@subsubsection changelog-2018-10-new-math Math library
- New @ref Math::CubicHermite class for cubic Hermite spline interpolation,
convertible to and from cubic Bézier curves using
@ref Math::Bezier::fromCubicHermite() and @ref Math::CubicHermite::fromBezier()
(see [mosra/magnum#267](https://github.com/mosra/magnum/pull/267))
- Added @ref Math::Intersection::rangeFrustum(),
@ref Math::Intersection::aabbFrustum(),
@ref Math::Intersection::sphereFrustum(),
@ref Math::Intersection::pointCone(),
@ref Math::Intersection::pointDoubleCone(),
@ref Math::Intersection::sphereConeView(),
@ref Math::Intersection::sphereCone(),
@ref Math::Intersection::aabbCone(),
@ref Math::Intersection::rangeCone() (see
[mosra/magnum#226](https://github.com/mosra/magnum/pull/226))
- Added @ref Math::Matrix3::rotationShear(),
@ref Math::Matrix4::rotationShear(), @ref Math::Matrix3::scalingSquared(),
@ref Math::Matrix4::scalingSquared(), @ref Math::Matrix3::scaling() const
and @ref Math::Matrix4::scaling() const getters for extracting further
properties from the rotation/scaling part of a matrix
- Added @ref Math::Color3::fromSrgb(UnsignedInt),
@ref Math::Color4::fromSrgbAlpha(UnsignedInt),
@ref Math::Color4::fromSrgb(UnsignedInt, T), @ref Math::Color3::toSrgbInt(),
and @ref Math::Color4::toSrgbAlphaInt() for easier conversion of packed
24-/32-bit sRGB colors to and from @ref Math::Color3 / @ref Math::Color4
- Added @ref Math::lerp(const Complex<T>&, const Complex<T>&, T) and
@ref Math::slerp(const Complex<T>&, const Complex<T>&, T) for feature
parity with @ref Math::Quaternion
- Added @ref Math::lerpShortestPath(const Quaternion<T>&, const Quaternion<T>&, T),
@ref Math::slerpShortestPath(const Quaternion<T>&, const Quaternion<T>&, T)
and @ref Math::sclerpShortestPath(const DualQuaternion<T>&, const DualQuaternion<T>&, T)
variants; clarified that the original versions are explicitly *not*
shortest-path
- Added @ref Math::Range2D::x(), @ref Math::Range3D::x(),
@ref Math::Range2D::y(), @ref Math::Range3D::y(), @ref Math::Range3D::z()
and @ref Math::Range3D::xy() for slicing ranges into lower dimensions
- Added @ref Math::intersect() and @ref Math::intersects() as a counterpart
to @ref Math::join() for operating with @ref Math::Range instances
- Added @ref Math::Range::contains() overloading taking a range, in addition
to vector
- Added @ref Math::Range::fromCenter() and documented a hint how to create
integral centered ranges
- Added @ref Math::Range::scaledFromCenter() as a counterpart to
@ref Math::Range::scaled()
- @ref Math::Range is now constructible from a @ref std::pair of values,
making it usable in combination with @ref Math::minmax(), for example
- Added @ref Math::Constants::piQuarter(), @ref Math::Constants::sqrtHalf()
- Added a convenience function @ref Math::select() as a constant
interpolation counterpart to @ref Math::lerp()
- Added a convenience function @ref Math::planeEquation() to aid with passing
passing parameters to @ref Math::Intersection::planeLine(),
@ref Math::Distance::pointPlane() and others
- Ability to convert @ref Math::BoolVector from and to external
representation
- Ability to construct @ref Math::Matrix from a smaller or larger square
matrix by slicing or expanding it
- Mutable overloads for @ref Math::Complex::real(),
@ref Math::Complex::imaginary(), @ref Math::Dual::real(),
@ref Math::Dual::dual(), @ref Math::Quaternion::vector() and
@ref Math::Quaternion::scalar()
- Ability to do a component-wise multiply and divide of @ref Math::Complex
and a @ref Math::Vector2, in addition to multiplication/division with a
scalar
- Ability to use @ref Math::Complex, @ref Math::DualComplex,
@ref Math::Quaternion, @ref Math::DualQuaternion with
@ref Corrade::Utility::Configuration and @ref Corrade::Utility::Arguments
- Added @ref Math::Complex::data(), @ref Math::Quaternion::data(),
@ref Math::DualComplex::data(), @ref Math::DualQuaternion::data(),
@ref Math::Bezier::data() and @ref Math::CubicHermite::data() for simple
access to underlying memory like with other math types
- New @ref Math::min(), @ref Math::max() and @ref Math::minmax() overloads
taking plain C arrays
- Vector overloads for @ref Math::isInf() and @ref Math::isNan()
@subsubsection changelog-2018-10-new-platform Platform libraries
Platform: initial HiDPI support in SDL2 app on Linux and Emscripten. This is quite complex, actually. The end goal is: when I request an 800x600 window, it should create a window of the same physical size as an 800x600 window would have on a system default DPI. After that, the actual window size (for events), framebuffer size and DPI scaling value (to correctly scale the contents relative to window size) are platform-dependent. On macOS and iOS, the DPI scaling is done simply by having the framebuffer twice the size while the window size (for events) remains the same. Easy to support. On Linux, a non-DPI-aware app is simply having a really tiny window. The worst behavior of all systems. Next to that, SDL_GetDisplayDPI() returns physical DPI, which is quite useless as the value is usually coming from Xorg display autodetection and is usually just 96, unless one goes extra lengths and supplies a correct value via an xorg.conf. The DE is using a different, user-configurable value for scaling the visuals and this one is available through a Xft.dpi property. To get it, we dlopen() self and dlsym() X11 symbols to get this property. If this fails, it might mean the app doesn't run on X11 (maybe Wayland, maybe something's just messed up, who knows) and then we fall back to SDL_GetDisplayDPI(). Which is usually very wrong, so this is also why I'm implementing two ways to override this -- either via the app Configuration or via a command-line / environment variable. On Emscripten / HTML5, all that's needed is querying device pixel ratio and then requesting canvas size scaled by that. The event coordinates are relative to this size, so there's not much more to handle. Physical canvas size on the page is controlled via CSS, so no issues with stuff being too big or too small apply -- in the worst case, things may be blurry. On Windows, the DPI scaling is something in-between -- if the app presents itself as DPI-aware, window size is treated as real pixels (so one gets really what is asked for, i.e. an 800x600 window on a system with 240 DPI is maybe four centimeters wide). If not, the window is upscaled (and blurried) by the compositor. In order to have correct behavior, I first need to query if the app is DPI-aware and then either scale the requested size or not (to avoid extra huge windows when the app is not marked as DPI aware). That will be done in a later commit.
8 years ago
- Initial HiDPI support for Linux and Emscripten in
@ref Platform::Sdl2Application and @ref Platform::GlfwApplication
- Implemented missing resize event support in @ref Platform::Sdl2Application
on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten"
- Ability to modify CSS classes that control layout of
@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten" app canvas using
@ref Platform::Sdl2Application::setContainerCssClass()
- Implemented @ref Platform::GlfwApplication::MouseMoveEvent::buttons() for
feature parity with @ref Platform::Sdl2Application (see
[mosra/magnum#256](https://github.com/mosra/magnum/issues/256))
- Added @ref Platform::Sdl2Application::MouseScrollEvent::position() and
@ref Platform::GlfwApplication::MouseScrollEvent::position()
- Added @ref Platform::Sdl2Application::GLConfiguration::setColorBufferSize() "GLConfiguration::setColorBufferSize()",
@ref Platform::Sdl2Application::GLConfiguration::setDepthBufferSize() "GLConfiguration::setDepthBufferSize()",
@ref Platform::Sdl2Application::GLConfiguration::setStencilBufferSize() "GLConfiguration::setStencilBufferSize()",
to @ref Platform::Sdl2Application, @ref Platform::GlfwApplication and
@ref Platform::AndroidApplication. This also makes the default framebuffer
parameters consistent across the implementations.
- Added numpad keys to @ref Platform::Sdl2Application::KeyEvent::Key,
consistent with GLFW key mapping
- Exposed enabled-by-default @ref Platform::Sdl2Application::GLConfiguration::Flag::ForwardCompatible "GLConfiguration::Flag::ForwardCompatible"
flag in @ref Platform::Sdl2Application and @ref Platform::GlfwApplication,
added @ref Platform::Sdl2Application::GLConfiguration::addFlags() "GLConfiguration::addFlags()"
and @ref Platform::Sdl2Application::GLConfiguration::clearFlags() "GLConfiguration::clearFlags()"
for easier flag handling
- Exposed enabled-by-default @ref Platform::WindowlessEglApplication::Configuration::Flag::ForwardCompatible "Configuration::Flag::ForwardCompatible"
flag in @ref Platform::WindowlessEglApplication,
@ref Platform::WindowlessGlxApplication and
@ref Platform::WindowlessWglApplication,
added @ref Platform::WindowlessEglApplication::Configuration::addFlags() "Configuration::addFlags()"
and @ref Platform::WindowlessEglApplication::Configuration::clearFlags() "Configuration::clearFlags()"
for easier flag handling
@subsubsection changelog-2018-10-new-primitives Primitives library
- New @ref Primitives::gradient2D(), @ref Primitives::gradient2DHorizontal(),
@ref Primitives::gradient2DVertical(), @ref Primitives::gradient3D(),
@ref Primitives::gradient3DHorizontal() and
@ref Primitives::gradient3DVertical() primitives
- New @ref Primitives::line2D(const Vector2&, const Vector2&) and
@ref Primitives::line3D(const Vector3&, const Vector3&) overloads for
easier creation of arbitrary lines, as transforming the line identities is
not worth the mental overhead
@subsubsection changelog-2018-10-new-scenegraph SceneGraph library
- New @ref SceneGraph::TranslationRotationScalingTransformation2D and
@ref SceneGraph::TranslationRotationScalingTransformation3D transformation
implementations that store separate translation, rotation and scaling
parameters for easier use with animated scenes
- Ability to affect order of items drawn by @ref SceneGraph::Camera --- see
@ref SceneGraph-Drawable-draw-order for more information
@subsubsection changelog-2018-10-new-shaders Shaders library
- New dedicated @cpp Shaders::VertexColor::Color3 @ce and
@cpp Shaders::VertexColor::Color4 @ce attribute specifiers for more
convenient distinction between three- and four-component vertex color
attribute.
- Support for multiple lights in @cpp Shaders::Phong @ce
- Classical alpha masking support in @cpp Shaders::Flat @ce and
@cpp Shaders::Phong @ce
- Debug output for the @cpp Shaders::Flat::Flag @ce /
@cpp Shaders::Flat::Flags @ce, @cpp Shaders::MeshVisualizer::Flag @ce /
@cpp Shaders::MeshVisualizer::Flags @ce and
@cpp Shaders::Phong::Flag @ce / @cpp Shaders::Phong::Flags @ce enums / enum
sets
@subsubsection changelog-2018-10-new-trade Trade library
- @ref Trade::AnimationData class and animation import interface in
@ref Trade::AbstractImporter::animation() and related functions
- New @ref Trade::AbstractMaterialData::flags(),
@ref Trade::AbstractMaterialData::alphaMode() and
@ref Trade::AbstractMaterialData::alphaMask() material properties
- New @ref Trade::CameraData::type(), @ref Trade::CameraData::aspectRatio()
and @ref Trade::CameraData::size() properties, ability to describe 2D
cameras
- @ref Trade::ObjectData2D and @ref Trade::ObjectData3D now support also
separate translation / rotation / scaling specification instead of a
combined transformation matrix. See @ref Trade::ObjectData2D::transformation()
and @ref Trade::ObjectData3D::transformation() for more information.
- Support for file loading callbacks in @ref Trade::AbstractImporter
- Debug output for @cpp Trade::AbstractImporter::Feature @ce,
@cpp Trade::AbstractImageConverter::Feature @ce enums and
@cpp Trade::AbstractImporter::Features @ce,
@cpp Trade::AbstractImageConverter::Features @ce enum sets
- @ref Trade::AnyImageImporter "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
- @ref Trade::AnyImageConverter "AnyImageConverter" learned detection of JPEG
output
- @ref Trade::AnySceneImporter "AnySceneImporter" gained support for
animation import
@subsubsection changelog-2018-10-new-vk Vk library
- New @ref Vk library that'll be the home of a Vulkan graphics backend in the
future
- New functions @ref Vk::hasVkPrimitiveTopology(),
@ref Vk::vkPrimitiveTopology(), @ref Vk::hasVkIndexType(),
@ref Vk::vkIndexType(), @ref Vk::hasVkFormat(), @ref Vk::vkFormat(),
@ref Vk::vkFilter(), @ref Vk::vkSamplerMipmapMode(),
@ref Vk::hasVkSamplerAddressMode(), @ref Vk::vkSamplerAddressMode() for
converting generic @ref MeshPrimitive, @ref MeshIndexType,
@ref PixelFormat, @ref CompressedPixelFormat, @ref SamplerFilter,
@ref SamplerMipmap and @ref SamplerWrapping enums to Vulkan-specific values
@subsection changelog-2018-10-changes Changes and improvements
@subsubsection changelog-2018-10-changes-audio Audio library
- Ability to specify initial source direction using
@ref Audio::Playable::Playable(SceneGraph::AbstractObject<dimensions, Float>&, const VectorTypeFor<dimensions, Float>&, PlayableGroup<dimensions>*)
@subsubsection changelog-2018-10-changes-gl GL library
- To prevent nothing being rendered by accident, @ref GL::Mesh::setCount()
and @ref GL::MeshView::setCount() now has always to be called, even just to
set the count to @cpp 0 @ce.
- @ref GL::Mesh::addVertexBuffer(), @ref GL::Mesh::addVertexBufferInstanced()
@ref GL::Mesh::setIndexBuffer() can now take ownership of a passed
@ref GL::Buffer to simplify resource management on user side. See
@ref GL-Mesh-buffer-ownership for more information.
- @cpp GL::Mesh::draw() @ce and @cpp GL::MeshView::draw() @ce now return a
reference to self to make method-chained draws (for example using a
different shader) possible as well
- The @ref GL::BufferUsage parameter in @ref GL::Buffer::setData() is now
optional, defaults to @ref GL::BufferUsage::StaticDraw
@subsubsection changelog-2018-10-changes-math Math library
- All assertions in the @ref Math namespace now helpfully print the offending
value that caused the assert for easier debugging
- @ref Math::Matrix3::rotation() const and @ref Math::Matrix4::rotation() const
now allow non-uniform scaling, but expect the roation/scaling part to be
orthogonal after normalization
- @ref Math::angle(), @ref Math::Vector::lengthInverted(),
@ref Math::Vector::normalized(), @ref Math::Vector::resized(),
@ref Math::Vector::projected(), @ref Math::Vector::projectedOntoNormalized()
and @ref Math::Vector2::aspectRatio() are now enabled only for
floating-point types to avoid errors when using these functions
accidentally on integral vectors (see
[mosra/magnum#251](https://github.com/mosra/magnum/issues/251))
@subsubsection changelog-2018-10-changes-meshtools MeshTools library
- @ref MeshTools::compile() API got simplified to make use of the new buffer
ownership feature of @ref GL::Mesh
- @ref MeshTools::compile() learned to handle vertex color attributes as well
(see [mosra/magnum#284](https://github.com/mosra/magnum/pull/284))
@subsubsection changelog-2018-10-changes-platform Platform libraries
- @ref Platform::Sdl2Application::viewportEvent() "Platform::*Application::viewportEvent()"
now gets all information needed for DPI-aware rendering instead of just
a framebuffer size --- now also window size and the DPI scaling value
- Overhauled the builtin @ref platforms-html5 "Emscripten" HTML markup and
styling for HTML5/WebGL apps:
- the builtin style now matches the dark theme of the Magnum website
- canvas is responsively sized and preserves aspect ratio when scaled
down
- when the app aborts, a helpful message is printed instead of everything
getting stuck
- it's possible to override the default canvas size and aspect ratio,
see @ref platforms-html5-layout
- documentation explaining quirks of event handling, see
@ref platforms-html5-events
- @ref Platform::GlfwApplication now behaves the same as
@ref Platform::Sdl2Application when creating an OpenGL context: first it
attempts to create a forward-compatible core OpenGL 3.2+ context and if
that fails, falls back to 2.1+ compatibility context. The
@cpp "no-forward-compatible-core-context" @ce workaround is implemented as
well, see @ref opengl-workarounds for more information.
- @ref Platform::GlfwApplication no longer stores a needless global window
pointer
- @ref Platform::GlfwApplication now loads modifiers for mouse move and mouse
scroll events lazily, only when needed
- @ref Platform::BasicScreen::viewportEvent() "Platform::Screen::viewportEvent()"
is no longer pure virtual to be consistent with all `*Application`
implementations
- @ref Platform::Sdl2Application now defaults to the actual canvas size
on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten", instead of hardcoded
@cpp {640, 480} @ce
- @ref Platform::Sdl2Application::Configuration::WindowFlags values that make
no sense on Emscripten are not available there anymore
- When using SDL 2.0.8 and newer, @ref Platform::Sdl2Application no longer
attempts to disable compositing on Linux. See @ref Platform-Sdl2Application-usage-linux
for more information. See also [mosra/magnum#184](https://github.com/mosra/magnum/issues/184).
- New @cpp "swiftshader-no-empty-egl-context-flags" @ce and
@cpp "swiftshader-egl-context-needs-pbuffer" @ce workarounds to make
@ref Platform::WindowlessEglApplication working with
[SwiftShader](https://github.com/google/swiftshader). See
@ref opengl-workarounds for more information.
@subsubsection changelog-2018-10-changes-shaders Shaders library
- All shaders now have reasonable default values for uniforms in order to
further simplify and remove friction from quick prototyping use cases
- @cpp Shaders::Flat::bindTexture() @ce,
@cpp Shaders::Phong::bindAmbientTexture() @ce,
@cpp Shaders::Phong::bindDiffuseTexture() @ce,
@cpp Shaders::Phong::bindSpecularTexture() @ce and
@cpp Shaders::Phong::bindTextures() @ce now assert that the shader was
created with the corresponding flag enabled to prevent accidental "black
screen of death" errors.
- Ambient color in untextured @cpp Shaders::Phong @ce now defaults to
@cpp 0x00000000_rgbaf @ce in order to support alpha-masked drawing out of
the box
@subsubsection changelog-2018-10-changes-texturetools TextureTools library
- Fixed @cpp TextureTools::distanceField() @ce 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).
@subsubsection changelog-2018-10-changes-trade Trade library
- @ref Trade::PhongMaterialData now contains well-defined color values
instead of random memory after construction
@subsection changelog-2018-10-buildsystem Build system
- There's now a PPA for Ubuntu packages. See @ref building-packages-deb
for more information. See also [mosra/magnum#248](https://github.com/mosra/magnum/issues/248)
and [mosra/magnum#249](https://github.com/mosra/magnum/pull/249).
- Fixed various issues preventing to build and use the base libraries with
OpenGL support disabled (see [mosra/magnum#255](https://github.com/mosra/magnum/pull/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](https://github.com/mosra/magnum/pull/253))
- @ref cmake "FindMagnum.cmake" now allows to use the @ref 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](https://github.com/mosra/magnum-examples/issues/42),
[mosra/magnum-examples#45](https://github.com/mosra/magnum-examples/pull/45))
- `FindGLFW.cmake` is now preferring GLFW CMake config file to pick up the
imported target, if available (see
[mosra/magnum#194](https://github.com/mosra/magnum/pull/194))
- `FindMagnum.cmake` now provides full paths to application JS/CSS files on
@ref platforms-html5 "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.
8 years ago
- @ref Trade::ObjImporter "ObjImporter" didn't work with CMake subprojects
due to an embarrassing typo (see
[mosra/magnum#259](https://github.com/mosra/magnum/issues/259))
- @ref Audio::AnyImporter "AnyAudioImporter",
@ref Trade::AnyImageConverter "AnyImageConverter",
@ref Trade::AnyImageImporter "AnyImageImporter" and
@ref Trade::AnySceneImporter "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](https://github.com/mosra/magnum/issues/283))
@subsection changelog-2018-10-bugfixes Bug fixes
- MSVC 15.8 (released on Aug 14, 2018) has a regression causing the compiler
to crash with an ICE (C1001) on @ref Math::Color4 constructors that have a
default alpha parameter. This is only only when the `/permissive-` flag is
specified (which is done by default for projects created directly using
Visual Studio but not for projects using CMake). This has been worked
around, but can't be guaranteed it was the only case. In case you're
experiencing a similar issue somewhere else, please try to disable the
`/permissive-` flag first.
- An assert was firing during @ref Platform::GlfwApplication initialization
due to a pointer not being properly initialized after the
@ref Platform::GlfwApplication::GLConfiguration "GLConfiguration" rework in
2018.04 (see [mosra/magnum#246](https://github.com/mosra/magnum/pull/246),
[mosra/magnum#247](https://github.com/mosra/magnum/issue/247))
- Vertex attribute divisor in @ref GL::Mesh::addVertexBufferInstanced() was
not properly cleaned up after when @gl_extension{ARB,vertex_array_object}
was disabled, causing subsequent draws to misbehave
- Fixed @cpp Shaders::DistanceFieldVector @ce and @cpp Shaders::Vector @ce to
be properly movable
- Restored backwards compatibility to the templated @ref GL::Buffer::map()
overload --- it was not possible to call it with @cpp void @ce template
parameter
- @gl_extension{ARB,direct_state_access} versions of
@ref GL::Framebuffer::clearColor(), @ref GL::Framebuffer::clearDepth(),
@ref GL::Framebuffer::clearStencil() and @ref GL::Framebuffer::clearDepthStencil()
were binding the framebuffer for drawing, which was completely unnecessary
- Deprecation status of GL-specific values of the generic @ref MeshPrimitive
enum was not properly reflected in the documentation
- @ref Platform::GlfwApplication::InputEvent::Modifier::Super is properly
reported for both left and right modifier (Windows/⌘) key instead of just
the right one
- @ref Platform::GlfwApplication::exec() now asserts instead of crashing if
the constructor fails to create a window (see [mosra/magnum#192](https://github.com/mosra/magnum/issues/192),
[mosra/magnum#272](https://github.com/mosra/magnum/pull/272))
- @ref Platform::GlfwApplication::GLConfiguration::isSrgbCapable() has now
a proper documented default value instead of being left uninitialized.
- @ref Math::sclerp() was not properly interpolating the translation if
rotation was the same on both sides
- Improved @cpp TextureTools::distanceField() @ce to work better on shader
compilers that have problems compiling nested loops (WebGL implementations,
some ES2 devices)
- @ref SceneGraph::AbstractObject::addFeature() and
@ref SceneGraph::Object::addChild() were not properly forwarding reference
arguments
@subsection changelog-2018-10-docs Documentation
- New @ref custom-buildsystems page listing the most important things to keep
in mind when using Magnum with custom buildsystems. See also
[mosra/magnum#268](https://github.com/mosra/magnum/pull/268).
- Compiled code snippets for @ref Audio and @ref SceneGraph libraries, fixing
cases where outdated or plain wrong API constructs were mentioned
- Extended documentation for @ref Math::Matrix3::rotation(),
@ref Math::Matrix4::rotation() and related accessors, explaining use cases
and caveats
- Reworked documentation of @ref Math::Algorithms, adding math equations and
usage examples to all functions
- Improved documentation of @ref Math::Constants, showing useful identities
for each
- The @ref scenegraph documentation was proofread and extended with a section
covering basics with visual diagrams.
- Explicitly mentioning copy/move constructibility for all classes with
non-trivial construction
- Improved Vcpkg build instructions (see
[mosra/magnum#271](https://github.com/mosra/magnum/pull/271),
[mosra/magnum#273](https://github.com/mosra/magnum/pull/273))
- Website styling got out of sync with generated Doxygen documentation,
causing search icon to either disappear on some browsers or be extremely
oversized on others (see
[mosra/magnum#260](https://github.com/mosra/magnum/issues/260),
[mosra/magnum#261](https://github.com/mosra/magnum/issues/261))
- Documentation of @ref Primitives and @ref Shaders namespaces now has proper
sRGB and HiDPi renderings of all primitives and shaders
- Various other fixes and updates (see
[mosra/magnum#281](https://github.com/mosra/magnum/pull/281))
@subsection changelog-2018-10-deprecated Deprecated APIs
- The `Shapes` library is a failed design experiment and is scheduled for
removal in a future release, together with `DebugTools::ShapeRenderer`.
Related geometry algorithms were moved to @ref Math::Distance and
@ref Math::Intersection; if you need a full-fledged physics library, please
have look at [Bullet](https://bulletphysics.org), which has Magnum
integration in @ref BulletIntegration, or at [Box2D](https://box2d.org/),
which has a @ref examples-box2d "Magnum example" as well.
- `Platform::GlutApplication` is based on an outdated toolkit and thus
scheduled for removal in a future release. Please consider switching to
@ref Platform::Sdl2Application or @ref Platform::GlfwApplication as soon as
possible.
- `Platform::*Application::viewportEvent(const Vector2i&)` is deprecated
because it doesn't provide all information needed for DPI-aware rendering.
Override the @ref Platform::Sdl2Application::viewportEvent(ViewportEvent&) "viewportEvent(ViewportEvent&)"
function instead.
- `Platform::Sdl2Application::Configuration::WindowFlags::AllowHighDpi` is
deprecated and has no effect as it is now passed implicitly on platforms
that need it
- `Math::Geometry`, `Math::Geometry::Distance` and
`Math::Geometry::Intersection` namespaces are deprecated for being too
deeply nested, use @ref Math::Distance and @ref Math::Intersection instead
- `Math::Geometry::Intersection::boxFrustum()` is deprecated, use
@ref Math::Intersection::rangeFrustum() instead
- @ref Math::Intersection::planeLine() taking a separate plane normal and
position is deprecated, use @ref Math::planeEquation() and the overload
taking a plane equation as @ref Math::Vector4 instead
- @cpp Audio::PlayableGroup::setClean() @ce is deprecated in favor of
@ref Audio::Listener::update(), as that one is a feature superset with
clearer naming
- @ref MeshTools::compile() taking a @ref GL::BufferUsage and returning a
tuple was deprecated, use the simpler version taking just
@cpp Trade::MeshData2D @ce / @cpp Trade::MeshData3D @ce and directly
returning a @ref GL::Mesh instead
- @cpp Shaders::VertexColor::Color @ce is deprecated, use the direct
@cpp Shaders::VertexColor::Color3 @ce or
@cpp Shaders::VertexColor::Color4 @ce alternatives instead
- @cpp Trade::AbstractMaterialData @ce constructor taking just two parameters
and @ref Trade::PhongMaterialData constructor taking three parameters are
deprecated, use @cpp Trade::AbstractMaterialData::AbstractMaterialData(MaterialType, Flags, MaterialAlphaMode, Float, const void*) @ce
and @cpp Trade::PhongMaterialData::PhongMaterialData(Flags, MaterialAlphaMode, Float, Float, const void*) @ce
instead
- @ref Trade::CameraData constructor not taking an explicit type enum is
deprecated, use @ref Trade::CameraData::CameraData(CameraType, Rad, Float, Float, Float, const void*)
instead
- @cpp GL::*Texture::setSRGBDecode() @ce,
@cpp GL::Renderer::Feature::FramebufferSRGB @ce,
@cpp Platform::*Application::GLConfiguration::setSRGBCapable() @ce and
@cpp Platform::*Application::GLConfiguration::isSRGBCapable() @ce is
deprecated, use
@ref GL::Texture::setSrgbDecode() "GL::*Texture::setSrgbDecode()",
@ref GL::Renderer::Feature::FramebufferSrgb,
@ref Platform::Sdl2Application::GLConfiguration::setSrgbCapable() "Platform::*Application::GLConfiguration::setSrgbCapable()" and
@ref Platform::Sdl2Application::GLConfiguration::isSrgbCapable() "Platform::*Application::GLConfiguration::isSrgbCapable()" instead as it
has consistent naming with @ref Math::Color3 "Math::Color" APIs
@subsection changelog-2018-10-compatibility Potential compatibility breakages, removed APIs
- The `Shapes` library is not built by default anymore due to its deprecated
status
- @ref 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 @ref Audio::Source).
- @ref Math::Matrix3::rotation() const and @ref 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
@ref Math::Matrix3::rotationShear() and @ref Math::Matrix4::rotationShear()
accessors for a possible solution.
- Since one-dimensional @ref Math::Range is now used on many new places such
as the @ref Animation library, its underlying type is just @cpp T @ce
instead of @ref Math::Vector "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
@ref Math-Range-generic for possible solutions.
- @ref SceneGraph::Camera::setViewport() and @ref SceneGraph::Camera::draw()
are no longer @cpp virtual @ce functions. If you need to override their
functionality, simply call the subclass implementation directly instead of
calling it through a @ref SceneGraph::Camera.
- @cpp Shaders::Flat::bindTexture() @ce,
@cpp Shaders::Phong::bindAmbientTexture() @ce,
@cpp Shaders::Phong::bindDiffuseTexture() @ce,
@cpp Shaders::Phong::bindSpecularTexture() @ce and
@cpp Shaders::Phong::bindTextures() @ce 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 @cpp Shaders::Phong @ce now defaults to
@cpp 0x00000000_rgbaf @ce in order to support alpha-masked drawing out of
the box. This may break code that assumed the alpha channel being opaque by
default.
- @ref Trade::PhongMaterialData::ambientColor(),
@ref Trade::PhongMaterialData::diffuseColor() "diffuseColor()" and
@ref Trade::PhongMaterialData::specularColor() "specularColor()" now return
@ref Color4 instead of @ref Color3
- Applications now expose GL context forward compatibility as an
enabled-by-default context flag. Calling
@ref Platform::Sdl2Application::GLConfiguration::setFlags() "Platform::*Application::GLConfiguration::setFlags()"
(and similarly on windowless apps) will reset that flag, use
@ref Platform::Sdl2Application::GLConfiguration::addFlags() "Platform::*Application::GLConfiguration::addFlags()" (And similarly on
windowless apps) to preserve the enabled-by-default flags.
Changelogs for previous versions are available in @ref changelog-old.
*/
}