Browse Source

Primitives: fix an assertion in uvSphereWireframe().

Everything I do these days is a potential breakign change.
pull/403/head
Vladimír Vondruš 7 years ago
parent
commit
6b2f4711b4
  1. 4
      doc/changelog.dox
  2. 2
      src/Magnum/Primitives/UVSphere.cpp

4
doc/changelog.dox

@ -156,6 +156,10 @@ See also:
@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.
- Removed remaining APIs deprecated in version 2018.04:
- @cpp Audio::Buffer::Format @ce, use @ref Audio::BufferFormat instead
- @cpp Shaders::*Vector::setVectorTexture() @ce,

2
src/Magnum/Primitives/UVSphere.cpp

@ -63,7 +63,7 @@ Trade::MeshData3D uvSphereSolid(UnsignedInt rings, UnsignedInt segments, UVSpher
}
Trade::MeshData3D uvSphereWireframe(const UnsignedInt rings, const UnsignedInt segments) {
CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%2 == 0,
CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%4 == 0,
"Primitives::uvSphereWireframe(): multiples of 2 rings and multiples of 4 segments expected",
(Trade::MeshData3D{MeshPrimitive::Triangles, {}, {}, {}, {}, {}, nullptr}));

Loading…
Cancel
Save