Browse Source

Use the new Debug::hex instead of reinterpret_cast<void*>().

This finally fixes most of those annoying MSVC C4312 warnings about
conversion to a type of a greater size.
pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
4435877cf1
  1. 3
      doc/changelog.dox
  2. 4
      src/Magnum/Animation/Interpolation.cpp
  3. 2
      src/Magnum/Animation/Player.cpp
  4. 2
      src/Magnum/Audio/AbstractImporter.cpp
  5. 2
      src/Magnum/Audio/BufferFormat.cpp
  6. 2
      src/Magnum/Audio/Context.cpp
  7. 4
      src/Magnum/Audio/Renderer.cpp
  8. 4
      src/Magnum/Audio/Source.cpp
  9. 4
      src/Magnum/DebugTools/FrameProfiler.cpp
  10. 2
      src/Magnum/FileCallback.cpp
  11. 32
      src/Magnum/GL/Attribute.cpp
  12. 4
      src/Magnum/GL/Buffer.cpp
  13. 4
      src/Magnum/GL/Context.cpp
  14. 12
      src/Magnum/GL/DebugOutput.cpp
  15. 2
      src/Magnum/GL/DefaultFramebuffer.cpp
  16. 2
      src/Magnum/GL/Framebuffer.cpp
  17. 4
      src/Magnum/GL/Mesh.cpp
  18. 6
      src/Magnum/GL/PixelFormat.cpp
  19. 6
      src/Magnum/GL/Renderer.cpp
  20. 12
      src/Magnum/GL/Sampler.cpp
  21. 2
      src/Magnum/GL/Shader.cpp
  22. 2
      src/Magnum/GL/TextureFormat.cpp
  23. 2
      src/Magnum/GL/Version.cpp
  24. 6
      src/Magnum/ImageFlags.cpp
  25. 10
      src/Magnum/Mesh.cpp
  26. 4
      src/Magnum/Mesh.h
  27. 8
      src/Magnum/MeshTools/Combine.cpp
  28. 2
      src/Magnum/MeshTools/Compile.cpp
  29. 4
      src/Magnum/MeshTools/CompressIndices.cpp
  30. 4
      src/Magnum/MeshTools/Concatenate.cpp
  31. 2
      src/Magnum/MeshTools/Concatenate.h
  32. 6
      src/Magnum/MeshTools/Duplicate.cpp
  33. 2
      src/Magnum/MeshTools/GenerateIndices.cpp
  34. 6
      src/Magnum/MeshTools/Interleave.cpp
  35. 8
      src/Magnum/MeshTools/RemoveDuplicates.cpp
  36. 12
      src/Magnum/MeshTools/Transform.cpp
  37. 30
      src/Magnum/PixelFormat.cpp
  38. 4
      src/Magnum/PixelFormat.h
  39. 2
      src/Magnum/Resource.cpp
  40. 6
      src/Magnum/Sampler.cpp
  41. 2
      src/Magnum/SceneGraph/Animable.cpp
  42. 6
      src/Magnum/ShaderTools/AbstractConverter.cpp
  43. 2
      src/Magnum/ShaderTools/Stage.cpp
  44. 2
      src/Magnum/Shaders/DistanceFieldVectorGL.cpp
  45. 2
      src/Magnum/Shaders/FlatGL.cpp
  46. 6
      src/Magnum/Shaders/Line.cpp
  47. 2
      src/Magnum/Shaders/LineGL.cpp
  48. 4
      src/Magnum/Shaders/MeshVisualizerGL.cpp
  49. 2
      src/Magnum/Shaders/PhongGL.cpp
  50. 2
      src/Magnum/Shaders/VectorGL.cpp
  51. 2
      src/Magnum/Shaders/VertexColorGL.cpp
  52. 2
      src/Magnum/Test/VersionTest.cpp
  53. 2
      src/Magnum/Text/AbstractFont.cpp
  54. 2
      src/Magnum/Text/AbstractFontConverter.cpp
  55. 2
      src/Magnum/Text/AbstractGlyphCache.cpp
  56. 2
      src/Magnum/Text/Alignment.cpp
  57. 4
      src/Magnum/Text/Direction.cpp
  58. 2
      src/Magnum/Text/Implementation/printFourCC.h
  59. 2
      src/Magnum/TextureTools/Atlas.cpp
  60. 4
      src/Magnum/Trade/AbstractImageConverter.cpp
  61. 4
      src/Magnum/Trade/AbstractImporter.cpp
  62. 6
      src/Magnum/Trade/AbstractSceneConverter.cpp
  63. 4
      src/Magnum/Trade/AnimationData.cpp
  64. 2
      src/Magnum/Trade/CameraData.cpp
  65. 2
      src/Magnum/Trade/Data.cpp
  66. 2
      src/Magnum/Trade/LightData.cpp
  67. 12
      src/Magnum/Trade/MaterialData.cpp
  68. 26
      src/Magnum/Trade/MeshData.cpp
  69. 8
      src/Magnum/Trade/MeshData.h
  70. 4
      src/Magnum/Trade/ObjectData2D.cpp
  71. 4
      src/Magnum/Trade/ObjectData3D.cpp
  72. 2
      src/Magnum/Trade/PhongMaterialData.cpp
  73. 8
      src/Magnum/Trade/SceneData.cpp
  74. 2
      src/Magnum/Trade/TextureData.cpp
  75. 20
      src/Magnum/VertexFormat.cpp
  76. 2
      src/Magnum/VertexFormat.h
  77. 2
      src/Magnum/Vk/DeviceFeatures.cpp
  78. 4
      src/Magnum/Vk/DeviceProperties.cpp
  79. 2
      src/Magnum/Vk/Handle.cpp
  80. 2
      src/Magnum/Vk/Image.cpp
  81. 2
      src/Magnum/Vk/Memory.cpp
  82. 2
      src/Magnum/Vk/Pipeline.cpp
  83. 2
      src/MagnumPlugins/WavAudioImporter/WavHeader.cpp

3
doc/changelog.dox

@ -1051,6 +1051,9 @@ See also:
libraries, as that breaks builds with version 3.1.52+. See libraries, as that breaks builds with version 3.1.52+. See
[mosra/magnum#633](https://github.com/mosra/magnum/issues/633) for more [mosra/magnum#633](https://github.com/mosra/magnum/issues/633) for more
information. information.
- Fixed most remaining warnings on MSVC, in particular those related to
"conversion from T to void * of greater size" (see
[mosra/magnum#544](https://github.com/mosra/magnum/issues/544)).
@subsection changelog-latest-bugfixes Bug fixes @subsection changelog-latest-bugfixes Bug fixes

4
src/Magnum/Animation/Interpolation.cpp

@ -48,7 +48,7 @@ Debug& operator<<(Debug& debug, const Interpolation value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const Extrapolation value) { Debug& operator<<(Debug& debug, const Extrapolation value) {
@ -67,7 +67,7 @@ Debug& operator<<(Debug& debug, const Extrapolation value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif

2
src/Magnum/Animation/Player.cpp

@ -40,7 +40,7 @@ Debug& operator<<(Debug& debug, const State value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
/* On non-MinGW Windows the instantiations are already marked with extern /* On non-MinGW Windows the instantiations are already marked with extern

2
src/Magnum/Audio/AbstractImporter.cpp

@ -154,7 +154,7 @@ Debug& operator<<(Debug& debug, const ImporterFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImporterFeatures value) { Debug& operator<<(Debug& debug, const ImporterFeatures value) {

2
src/Magnum/Audio/BufferFormat.cpp

@ -75,7 +75,7 @@ Debug& operator<<(Debug& debug, const BufferFormat value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALenum(value) << Debug::nospace << ")";
} }
}} }}

2
src/Magnum/Audio/Context.cpp

@ -84,7 +84,7 @@ Debug& operator<<(Debug& debug, const Context::HrtfStatus value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALenum(value) << Debug::nospace << ")";
} }
namespace { namespace {

4
src/Magnum/Audio/Renderer.cpp

@ -45,7 +45,7 @@ Debug& operator<<(Debug& debug, const Renderer::Error value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Renderer::DistanceModel value) { Debug& operator<<(Debug& debug, const Renderer::DistanceModel value) {
@ -65,7 +65,7 @@ Debug& operator<<(Debug& debug, const Renderer::DistanceModel value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALenum(value) << Debug::nospace << ")";
} }
}} }}

4
src/Magnum/Audio/Source.cpp

@ -139,7 +139,7 @@ Debug& operator<<(Debug& debug, const Source::State value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Source::Type value) { Debug& operator<<(Debug& debug, const Source::Type value) {
@ -155,7 +155,7 @@ Debug& operator<<(Debug& debug, const Source::Type value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(ALint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << ALint(value) << Debug::nospace << ")";
} }
}} }}

4
src/Magnum/DebugTools/FrameProfiler.cpp

@ -427,7 +427,7 @@ Debug& operator<<(Debug& debug, const FrameProfiler::Units value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
@ -656,7 +656,7 @@ Debug& operator<<(Debug& debug, const FrameProfilerGL::Value value) {
if(1 << bit == UnsignedShort(value)) if(1 << bit == UnsignedShort(value))
return debug << "::" << Debug::nospace << FrameProfilerGLValueNames[bit]; return debug << "::" << Debug::nospace << FrameProfilerGLValueNames[bit];
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const FrameProfilerGL::Values value) { Debug& operator<<(Debug& debug, const FrameProfilerGL::Values value) {

2
src/Magnum/FileCallback.cpp

@ -42,7 +42,7 @@ Debug& operator<<(Debug& debug, const InputFileCallbackPolicy value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
} }

32
src/Magnum/GL/Attribute.cpp

@ -50,7 +50,7 @@ Debug& operator<<(Debug& debug, const DynamicAttribute::Kind value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DynamicAttribute::Components value) { Debug& operator<<(Debug& debug, const DynamicAttribute::Components value) {
@ -70,7 +70,7 @@ Debug& operator<<(Debug& debug, const DynamicAttribute::Components value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DynamicAttribute::DataType value) { Debug& operator<<(Debug& debug, const DynamicAttribute::DataType value) {
@ -101,7 +101,7 @@ Debug& operator<<(Debug& debug, const DynamicAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
namespace Implementation { namespace Implementation {
@ -231,7 +231,7 @@ Debug& operator<<(Debug& debug, const SizedAttribute<1, 1>::Components value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedAttribute<1, 2>::Components value) { Debug& operator<<(Debug& debug, const SizedAttribute<1, 2>::Components value) {
@ -246,7 +246,7 @@ Debug& operator<<(Debug& debug, const SizedAttribute<1, 2>::Components value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedAttribute<1, 3>::Components value) { Debug& operator<<(Debug& debug, const SizedAttribute<1, 3>::Components value) {
@ -263,7 +263,7 @@ Debug& operator<<(Debug& debug, const SizedAttribute<1, 3>::Components value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedAttribute<1, 4>::Components value) { Debug& operator<<(Debug& debug, const SizedAttribute<1, 4>::Components value) {
@ -282,7 +282,7 @@ Debug& operator<<(Debug& debug, const SizedAttribute<1, 4>::Components value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedMatrixAttribute<2>::Components value) { Debug& operator<<(Debug& debug, const SizedMatrixAttribute<2>::Components value) {
@ -295,7 +295,7 @@ Debug& operator<<(Debug& debug, const SizedMatrixAttribute<2>::Components value)
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedMatrixAttribute<3>::Components value) { Debug& operator<<(Debug& debug, const SizedMatrixAttribute<3>::Components value) {
@ -308,7 +308,7 @@ Debug& operator<<(Debug& debug, const SizedMatrixAttribute<3>::Components value)
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SizedMatrixAttribute<4>::Components value) { Debug& operator<<(Debug& debug, const SizedMatrixAttribute<4>::Components value) {
@ -321,7 +321,7 @@ Debug& operator<<(Debug& debug, const SizedMatrixAttribute<4>::Components value)
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::Components value) { Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::Components value) {
@ -344,7 +344,7 @@ Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::Compone
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const FloatAttribute::DataType value) { Debug& operator<<(Debug& debug, const FloatAttribute::DataType value) {
@ -370,7 +370,7 @@ Debug& operator<<(Debug& debug, const FloatAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -390,7 +390,7 @@ Debug& operator<<(Debug& debug, const IntAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
@ -406,7 +406,7 @@ Debug& operator<<(Debug& debug, const DoubleAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
@ -434,7 +434,7 @@ Debug& operator<<(Debug& debug, const Attribute<Math::Vector<3, Float>>::DataTyp
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::DataType value) { Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::DataType value) {
@ -464,7 +464,7 @@ Debug& operator<<(Debug& debug, const Attribute<Math::Vector<4, Float>>::DataTyp
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
} }

4
src/Magnum/GL/Buffer.cpp

@ -716,7 +716,7 @@ Debug& operator<<(Debug& debug, const Buffer::TargetHint value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -733,7 +733,7 @@ Debug& operator<<(Debug& debug, const Buffer::Target value) {
#undef _c #undef _c
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif

4
src/Magnum/GL/Context.cpp

@ -1341,7 +1341,7 @@ Debug& operator<<(Debug& debug, const Context::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const Context::Flags value) { Debug& operator<<(Debug& debug, const Context::Flags value) {
@ -1388,7 +1388,7 @@ Debug& operator<<(Debug& debug, const Context::DetectedDriver value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) { Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) {

12
src/Magnum/GL/DebugOutput.cpp

@ -248,7 +248,7 @@ Debug& operator<<(Debug& debug, const DebugOutput::Source value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugOutput::Type value) { Debug& operator<<(Debug& debug, const DebugOutput::Type value) {
@ -270,7 +270,7 @@ Debug& operator<<(Debug& debug, const DebugOutput::Type value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugOutput::Severity value) { Debug& operator<<(Debug& debug, const DebugOutput::Severity value) {
@ -285,7 +285,7 @@ Debug& operator<<(Debug& debug, const DebugOutput::Severity value) {
#undef _c #undef _c
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
@ -330,7 +330,7 @@ Debug& operator<<(Debug& debug, const DebugMessage::Source value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugMessage::Type value) { Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
@ -348,7 +348,7 @@ Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
#undef _c #undef _c
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
@ -434,7 +434,7 @@ Debug& operator<<(Debug& debug, const DebugGroup::Source value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

2
src/Magnum/GL/DefaultFramebuffer.cpp

@ -140,7 +140,7 @@ Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

2
src/Magnum/GL/Framebuffer.cpp

@ -482,7 +482,7 @@ Debug& operator<<(Debug& debug, const Framebuffer::Status value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

4
src/Magnum/GL/Mesh.cpp

@ -144,7 +144,7 @@ Debug& operator<<(Debug& debug, const MeshPrimitive value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MeshIndexType value) { Debug& operator<<(Debug& debug, const MeshIndexType value) {
@ -160,7 +160,7 @@ Debug& operator<<(Debug& debug, const MeshIndexType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

6
src/Magnum/GL/PixelFormat.cpp

@ -408,7 +408,7 @@ Debug& operator<<(Debug& debug, const PixelFormat value) {
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const PixelType value) { Debug& operator<<(Debug& debug, const PixelType value) {
@ -474,7 +474,7 @@ Debug& operator<<(Debug& debug, const PixelType value) {
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
namespace { namespace {
@ -690,7 +690,7 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) {
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

6
src/Magnum/GL/Renderer.cpp

@ -476,7 +476,7 @@ Debug& operator<<(Debug& debug, const Renderer::Error value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
@ -492,7 +492,7 @@ Debug& operator<<(Debug& debug, const Renderer::ResetNotificationStrategy value)
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) { Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) {
@ -509,7 +509,7 @@ Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif

12
src/Magnum/GL/Sampler.cpp

@ -142,7 +142,7 @@ Debug& operator<<(Debug& debug, const SamplerFilter value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SamplerMipmap value) { Debug& operator<<(Debug& debug, const SamplerMipmap value) {
@ -158,7 +158,7 @@ Debug& operator<<(Debug& debug, const SamplerMipmap value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SamplerWrapping value) { Debug& operator<<(Debug& debug, const SamplerWrapping value) {
@ -178,7 +178,7 @@ Debug& operator<<(Debug& debug, const SamplerWrapping value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLint(value) << Debug::nospace << ")";
} }
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
@ -194,7 +194,7 @@ Debug& operator<<(Debug& debug, const SamplerCompareMode value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SamplerCompareFunction value) { Debug& operator<<(Debug& debug, const SamplerCompareFunction value) {
@ -215,7 +215,7 @@ Debug& operator<<(Debug& debug, const SamplerCompareFunction value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
@ -232,7 +232,7 @@ Debug& operator<<(Debug& debug, const SamplerDepthStencilMode value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif

2
src/Magnum/GL/Shader.cpp

@ -983,7 +983,7 @@ Debug& operator<<(Debug& debug, const Shader::Type value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

2
src/Magnum/GL/TextureFormat.cpp

@ -299,7 +299,7 @@ Debug& operator<<(Debug& debug, const TextureFormat value) {
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << GLenum(value) << Debug::nospace << ")";
} }
#endif #endif

2
src/Magnum/GL/Version.cpp

@ -72,7 +72,7 @@ Debug& operator<<(Debug& debug, const Version value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Invalid(" << Debug::nospace << reinterpret_cast<void*>(Int(value)) << Debug::nospace << ")"; return debug << "Invalid(" << Debug::nospace << Debug::hex << Int(value) << Debug::nospace << ")";
} }
#endif #endif

6
src/Magnum/ImageFlags.cpp

@ -52,7 +52,7 @@ Debug& operator<<(Debug& debug, const ImageFlag1D value) {
#pragma warning(pop) #pragma warning(pop)
#endif #endif
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImageFlag2D value) { Debug& operator<<(Debug& debug, const ImageFlag2D value) {
@ -69,7 +69,7 @@ Debug& operator<<(Debug& debug, const ImageFlag2D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImageFlag3D value) { Debug& operator<<(Debug& debug, const ImageFlag3D value) {
@ -87,7 +87,7 @@ Debug& operator<<(Debug& debug, const ImageFlag3D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImageFlags1D value) { Debug& operator<<(Debug& debug, const ImageFlags1D value) {

10
src/Magnum/Mesh.cpp

@ -50,14 +50,14 @@ Debug& operator<<(Debug& debug, const MeshPrimitive value) {
debug << "MeshPrimitive" << Debug::nospace; debug << "MeshPrimitive" << Debug::nospace;
if(isMeshPrimitiveImplementationSpecific(value)) { if(isMeshPrimitiveImplementationSpecific(value)) {
return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << reinterpret_cast<void*>(meshPrimitiveUnwrap(value)) << Debug::nospace << ")"; return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << Debug::hex << meshPrimitiveUnwrap(value) << Debug::nospace << ")";
} }
if(UnsignedInt(value) - 1 < Containers::arraySize(MeshPrimitiveNames)) { if(UnsignedInt(value) - 1 < Containers::arraySize(MeshPrimitiveNames)) {
return debug << (packed ? "" : "::") << Debug::nospace << MeshPrimitiveNames[UnsignedInt(value) - 1]; return debug << (packed ? "" : "::") << Debug::nospace << MeshPrimitiveNames[UnsignedInt(value) - 1];
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
namespace { namespace {
@ -77,20 +77,20 @@ Debug& operator<<(Debug& debug, const MeshIndexType value) {
debug << "MeshIndexType" << Debug::nospace; debug << "MeshIndexType" << Debug::nospace;
if(isMeshIndexTypeImplementationSpecific(value)) { if(isMeshIndexTypeImplementationSpecific(value)) {
return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << reinterpret_cast<void*>(meshIndexTypeUnwrap(value)) << Debug::nospace << ")"; return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << Debug::hex << meshIndexTypeUnwrap(value) << Debug::nospace << ")";
} }
if(UnsignedInt(value) - 1 < Containers::arraySize(MeshIndexTypeNames)) { if(UnsignedInt(value) - 1 < Containers::arraySize(MeshIndexTypeNames)) {
return debug << (packed ? "" : "::") << Debug::nospace << MeshIndexTypeNames[UnsignedInt(value) - 1]; return debug << (packed ? "" : "::") << Debug::nospace << MeshIndexTypeNames[UnsignedInt(value) - 1];
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif
UnsignedInt meshIndexTypeSize(const MeshIndexType type) { UnsignedInt meshIndexTypeSize(const MeshIndexType type) {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(type), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(type),
"meshIndexTypeSize(): can't determine size of an implementation-specific type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(type)), {}); "meshIndexTypeSize(): can't determine size of an implementation-specific type" << Debug::hex << meshIndexTypeUnwrap(type), {});
switch(type) { switch(type) {
case MeshIndexType::UnsignedByte: return 1; case MeshIndexType::UnsignedByte: return 1;

4
src/Magnum/Mesh.h

@ -223,7 +223,7 @@ remaining 31 bits. Use @ref meshPrimitiveUnwrap() for the inverse operation.
template<class T> constexpr MeshPrimitive meshPrimitiveWrap(T implementationSpecific) { template<class T> constexpr MeshPrimitive meshPrimitiveWrap(T implementationSpecific) {
static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported"); static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported");
return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)), return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)),
"meshPrimitiveWrap(): implementation-specific value" << reinterpret_cast<void*>(implementationSpecific) << "already wrapped or too large"), "meshPrimitiveWrap(): implementation-specific value" << Debug::hex << UnsignedInt(implementationSpecific) << "already wrapped or too large"),
MeshPrimitive((1u << 31)|UnsignedInt(implementationSpecific)); MeshPrimitive((1u << 31)|UnsignedInt(implementationSpecific));
} }
@ -329,7 +329,7 @@ remaining 31 bits. Use @ref meshIndexTypeUnwrap() for the inverse operation.
template<class T> constexpr MeshIndexType meshIndexTypeWrap(T implementationSpecific) { template<class T> constexpr MeshIndexType meshIndexTypeWrap(T implementationSpecific) {
static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported"); static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported");
return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)), return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)),
"meshIndexTypeWrap(): implementation-specific value" << reinterpret_cast<void*>(implementationSpecific) << "already wrapped or too large"), "meshIndexTypeWrap(): implementation-specific value" << Debug::hex << UnsignedInt(implementationSpecific) << "already wrapped or too large"),
MeshIndexType((1u << 31)|UnsignedInt(implementationSpecific)); MeshIndexType((1u << 31)|UnsignedInt(implementationSpecific));
} }

8
src/Magnum/MeshTools/Combine.cpp

@ -71,7 +71,7 @@ Trade::MeshData combineIndexedImplementation(
this is easier; plus the user gets a less confusing function this is easier; plus the user gets a less confusing function
name in the message */ name in the message */
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
assertPrefix << "attribute" << j << "of mesh" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), assertPrefix << "attribute" << j << "of mesh" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
attributes[attributeOffset++] = mesh.attributeData(j); attributes[attributeOffset++] = mesh.attributeData(j);
} }
@ -130,7 +130,7 @@ Trade::MeshData combineIndexedAttributes(const Containers::Iterable<const Trade:
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
const MeshIndexType indexType = meshes[i].indexType(); const MeshIndexType indexType = meshes[i].indexType();
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(indexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(indexType),
"MeshTools::combineIndexedAttributes(): data" << i << "has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(indexType)), "MeshTools::combineIndexedAttributes(): data" << i << "has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(indexType),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
if(i == 0) { if(i == 0) {
primitive = meshes[i].primitive(); primitive = meshes[i].primitive();
@ -188,13 +188,13 @@ Trade::MeshData combineFaceAttributes(const Trade::MeshData& mesh, const Trade::
/* Make a combined index array. First copy the mesh indices as-is. */ /* Make a combined index array. First copy the mesh indices as-is. */
const MeshIndexType meshIndexType = mesh.indexType(); const MeshIndexType meshIndexType = mesh.indexType();
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(meshIndexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(meshIndexType),
"MeshTools::combineFaceAttributes(): vertex mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(meshIndexType)), "MeshTools::combineFaceAttributes(): vertex mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(meshIndexType),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
const UnsignedInt meshIndexSize = meshIndexTypeSize(meshIndexType); const UnsignedInt meshIndexSize = meshIndexTypeSize(meshIndexType);
UnsignedInt faceIndexSize; UnsignedInt faceIndexSize;
if(faceAttributes.isIndexed()) { if(faceAttributes.isIndexed()) {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(faceAttributes.indexType()), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(faceAttributes.indexType()),
"MeshTools::combineFaceAttributes(): face mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(faceAttributes.indexType())), "MeshTools::combineFaceAttributes(): face mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(faceAttributes.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
faceIndexSize = meshIndexTypeSize(faceAttributes.indexType()); faceIndexSize = meshIndexTypeSize(faceAttributes.indexType());
} else faceIndexSize = 4; } else faceIndexSize = 4;

2
src/Magnum/MeshTools/Compile.cpp

@ -126,7 +126,7 @@ GL::Mesh compileInternal(const Trade::MeshData& meshData, GL::Buffer&& indices,
const VertexFormat format = meshData.attributeFormat(i); const VertexFormat format = meshData.attributeFormat(i);
if(isVertexFormatImplementationSpecific(format)) { if(isVertexFormatImplementationSpecific(format)) {
if(!(flags & CompileFlag::NoWarnOnCustomAttributes)) if(!(flags & CompileFlag::NoWarnOnCustomAttributes))
Warning{} << "MeshTools::compile(): ignoring attribute" << meshData.attributeName(i) << "with an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)); Warning{} << "MeshTools::compile(): ignoring attribute" << meshData.attributeName(i) << "with an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format);
continue; continue;
} }

4
src/Magnum/MeshTools/CompressIndices.cpp

@ -56,7 +56,7 @@ template<class T, class U> inline Containers::Array<char> compress(const Contain
template<class T> Containers::Pair<Containers::Array<char>, MeshIndexType> compressIndicesImplementation(const Containers::StridedArrayView1D<const T>& indices, const MeshIndexType atLeast, const Long offset) { template<class T> Containers::Pair<Containers::Array<char>, MeshIndexType> compressIndicesImplementation(const Containers::StridedArrayView1D<const T>& indices, const MeshIndexType atLeast, const Long offset) {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(atLeast), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(atLeast),
"MeshTools::compressIndices(): can't compress to an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(atLeast)), "MeshTools::compressIndices(): can't compress to an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(atLeast),
(Containers::Pair<Containers::Array<char>, MeshIndexType>{nullptr, MeshIndexType::UnsignedInt})); (Containers::Pair<Containers::Array<char>, MeshIndexType>{nullptr, MeshIndexType::UnsignedInt}));
const UnsignedInt max = Math::max(indices) - offset; const UnsignedInt max = Math::max(indices) - offset;
@ -154,7 +154,7 @@ Trade::MeshData compressIndices(Trade::MeshData&& mesh, MeshIndexType atLeast) {
result = compressIndicesImplementation<UnsignedShort>(indices, atLeast, offset); result = compressIndicesImplementation<UnsignedShort>(indices, atLeast, offset);
} else { } else {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()),
"MeshTools::compressIndices(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(mesh.indexType())), "MeshTools::compressIndices(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(mesh.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
CORRADE_INTERNAL_ASSERT(mesh.indexType() == MeshIndexType::UnsignedByte); CORRADE_INTERNAL_ASSERT(mesh.indexType() == MeshIndexType::UnsignedByte);
auto indices = mesh.indices<UnsignedByte>(); auto indices = mesh.indices<UnsignedByte>();

4
src/Magnum/MeshTools/Concatenate.cpp

@ -102,7 +102,7 @@ Trade::MeshData concatenate(Containers::Array<char>&& indexData, const UnsignedI
/* If the mesh is indexed, copy the indices over, expanded to 32bit */ /* If the mesh is indexed, copy the indices over, expanded to 32bit */
if(mesh.isIndexed()) { if(mesh.isIndexed()) {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()),
assertPrefix << "mesh" << i << "has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(mesh.indexType())), assertPrefix << "mesh" << i << "has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(mesh.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
Containers::ArrayView<UnsignedInt> dst = indices.slice(indexOffset, indexOffset + mesh.indexCount()); Containers::ArrayView<UnsignedInt> dst = indices.slice(indexOffset, indexOffset + mesh.indexCount());
@ -176,7 +176,7 @@ Trade::MeshData concatenate(const Containers::Iterable<const Trade::MeshData>& m
for(std::size_t i = 0; i != meshes.front().attributeCount(); ++i) { for(std::size_t i = 0; i != meshes.front().attributeCount(); ++i) {
const VertexFormat format = meshes.front().attributeFormat(i); const VertexFormat format = meshes.front().attributeFormat(i);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::concatenate(): attribute" << i << "of the first mesh has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), "MeshTools::concatenate(): attribute" << i << "of the first mesh has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
} }
#endif #endif

2
src/Magnum/MeshTools/Concatenate.h

@ -111,7 +111,7 @@ template<template<class> class Allocator = Containers::ArrayAllocator> void conc
for(std::size_t i = 0; i != destination.attributeCount(); ++i) { for(std::size_t i = 0; i != destination.attributeCount(); ++i) {
const VertexFormat format = destination.attributeFormat(i); const VertexFormat format = destination.attributeFormat(i);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::concatenateInto(): attribute" << i << "of the destination mesh has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), ); "MeshTools::concatenateInto(): attribute" << i << "of the destination mesh has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), );
} }
#endif #endif

6
src/Magnum/MeshTools/Duplicate.cpp

@ -83,19 +83,19 @@ void duplicateInto(const Containers::StridedArrayView2D<const char>& indices, co
Trade::MeshData duplicate(const Trade::MeshData& mesh, const Containers::ArrayView<const Trade::MeshAttributeData> extra) { Trade::MeshData duplicate(const Trade::MeshData& mesh, const Containers::ArrayView<const Trade::MeshAttributeData> extra) {
CORRADE_ASSERT(mesh.isIndexed(), "MeshTools::duplicate(): mesh data not indexed", (Trade::MeshData{MeshPrimitive::Triangles, 0})); CORRADE_ASSERT(mesh.isIndexed(), "MeshTools::duplicate(): mesh data not indexed", (Trade::MeshData{MeshPrimitive::Triangles, 0}));
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(mesh.indexType()),
"MeshTools::duplicate(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(mesh.indexType())), "MeshTools::duplicate(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(mesh.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
#ifndef CORRADE_NO_ASSERT #ifndef CORRADE_NO_ASSERT
for(std::size_t i = 0; i != mesh.attributeCount(); ++i) { for(std::size_t i = 0; i != mesh.attributeCount(); ++i) {
const VertexFormat format = mesh.attributeFormat(i); const VertexFormat format = mesh.attributeFormat(i);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::duplicate(): attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), "MeshTools::duplicate(): attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
} }
for(std::size_t i = 0; i != extra.size(); ++i) { for(std::size_t i = 0; i != extra.size(); ++i) {
const VertexFormat format = extra[i].format(); const VertexFormat format = extra[i].format();
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::duplicate(): extra attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), "MeshTools::duplicate(): extra attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
} }
#endif #endif

2
src/Magnum/MeshTools/GenerateIndices.cpp

@ -579,7 +579,7 @@ void generateQuadIndicesInto(const Containers::StridedArrayView1D<const Vector3>
Trade::MeshData generateIndices(Trade::MeshData&& mesh) { Trade::MeshData generateIndices(Trade::MeshData&& mesh) {
CORRADE_ASSERT(!mesh.isIndexed() || !isMeshIndexTypeImplementationSpecific(mesh.indexType()), CORRADE_ASSERT(!mesh.isIndexed() || !isMeshIndexTypeImplementationSpecific(mesh.indexType()),
"MeshTools::generateIndices(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(mesh.indexType())), "MeshTools::generateIndices(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(mesh.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
const UnsignedInt vertexCount = mesh.vertexCount(); const UnsignedInt vertexCount = mesh.vertexCount();

6
src/Magnum/MeshTools/Interleave.cpp

@ -141,7 +141,7 @@ Containers::Array<Trade::MeshAttributeData> interleavedLayout(Trade::MeshData&&
minOffset = 0; minOffset = 0;
for(UnsignedInt i = 0, max = mesh.attributeCount(); i != max; ++i) { for(UnsignedInt i = 0, max = mesh.attributeCount(); i != max; ++i) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(mesh.attributeFormat(i)), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(mesh.attributeFormat(i)),
"MeshTools::interleavedLayout(): attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(mesh.attributeFormat(i))), {}); "MeshTools::interleavedLayout(): attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(mesh.attributeFormat(i)), {});
stride += attributeSize(mesh, i); stride += attributeSize(mesh, i);
} }
} }
@ -156,7 +156,7 @@ Containers::Array<Trade::MeshAttributeData> interleavedLayout(Trade::MeshData&&
stride += extra[i].stride(); stride += extra[i].stride();
} else { } else {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::interleavedLayout(): extra attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "MeshTools::interleavedLayout(): extra attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
stride += attributeSize(extra[i]); stride += attributeSize(extra[i]);
++extraAttributeCount; ++extraAttributeCount;
} }
@ -292,7 +292,7 @@ Trade::MeshData interleave(Trade::MeshData&& mesh, const Containers::ArrayView<c
an implementation-specific index type */ an implementation-specific index type */
} else { } else {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(indexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(indexType),
"MeshTools::interleave(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(indexType)) << Debug::nospace << ", enable MeshTools::InterleaveFlag::PreserveStridedIndices to pass the array through unchanged", "MeshTools::interleave(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(indexType) << Debug::nospace << ", enable MeshTools::InterleaveFlag::PreserveStridedIndices to pass the array through unchanged",
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
const std::size_t indexTypeSize = meshIndexTypeSize(indexType); const std::size_t indexTypeSize = meshIndexTypeSize(indexType);

8
src/Magnum/MeshTools/RemoveDuplicates.cpp

@ -406,7 +406,7 @@ Trade::MeshData removeDuplicates(const Trade::MeshData& mesh) {
for(std::size_t i = 0; i != mesh.attributeCount(); ++i) { for(std::size_t i = 0; i != mesh.attributeCount(); ++i) {
const VertexFormat format = mesh.attributeFormat(i); const VertexFormat format = mesh.attributeFormat(i);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::removeDuplicates(): attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), "MeshTools::removeDuplicates(): attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
} }
#endif #endif
@ -414,7 +414,7 @@ Trade::MeshData removeDuplicates(const Trade::MeshData& mesh) {
/* This has to be checked before passing the data to interleave() as there /* This has to be checked before passing the data to interleave() as there
it would die also, but with a confusing function name in the message */ it would die also, but with a confusing function name in the message */
CORRADE_ASSERT(!mesh.isIndexed() || !isMeshIndexTypeImplementationSpecific(mesh.indexType()), CORRADE_ASSERT(!mesh.isIndexed() || !isMeshIndexTypeImplementationSpecific(mesh.indexType()),
"MeshTools::removeDuplicates(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(mesh.indexType())), "MeshTools::removeDuplicates(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(mesh.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
/* Turn the passed data into an interleaved owned mutable instance we can /* Turn the passed data into an interleaved owned mutable instance we can
@ -489,7 +489,7 @@ Trade::MeshData removeDuplicatesFuzzy(const Trade::MeshData& mesh, const Float f
for(UnsignedInt i = 0; i != owned.attributeCount(); ++i) { for(UnsignedInt i = 0; i != owned.attributeCount(); ++i) {
const VertexFormat format = owned.attributeFormat(i); const VertexFormat format = owned.attributeFormat(i);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"MeshTools::removeDuplicatesFuzzy(): attribute" << i << "has an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), "MeshTools::removeDuplicatesFuzzy(): attribute" << i << "has an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
/* Floats, with special attribute-dependent handling */ /* Floats, with special attribute-dependent handling */
@ -574,7 +574,7 @@ Trade::MeshData removeDuplicatesFuzzy(const Trade::MeshData& mesh, const Float f
indexType = MeshIndexType::UnsignedInt; indexType = MeshIndexType::UnsignedInt;
} else { } else {
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(owned.indexType()), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(owned.indexType()),
"MeshTools::removeDuplicatesFuzzy(): mesh has an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(owned.indexType())), "MeshTools::removeDuplicatesFuzzy(): mesh has an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(owned.indexType()),
(Trade::MeshData{MeshPrimitive{}, 0})); (Trade::MeshData{MeshPrimitive{}, 0}));
vertexCount = removeDuplicatesIndexedInPlace( vertexCount = removeDuplicatesIndexedInPlace(
owned.mutableIndices(), owned.mutableIndices(),

12
src/Magnum/MeshTools/Transform.cpp

@ -45,7 +45,7 @@ Trade::MeshData transform2D(const Trade::MeshData& mesh, const Matrix3& transfor
#endif #endif
const VertexFormat positionAttributeFormat = mesh.attributeFormat(*positionAttributeId); const VertexFormat positionAttributeFormat = mesh.attributeFormat(*positionAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(positionAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(positionAttributeFormat),
"MeshTools::transform2D(): positions have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(positionAttributeFormat)), "MeshTools::transform2D(): positions have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(positionAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
CORRADE_ASSERT(vertexFormatComponentCount(positionAttributeFormat) == 2, CORRADE_ASSERT(vertexFormatComponentCount(positionAttributeFormat) == 2,
"MeshTools::transform2D(): expected 2D positions but got" << positionAttributeFormat, "MeshTools::transform2D(): expected 2D positions but got" << positionAttributeFormat,
@ -142,7 +142,7 @@ Trade::MeshData transform3D(const Trade::MeshData& mesh, const Matrix4& transfor
#endif #endif
const VertexFormat positionAttributeFormat = mesh.attributeFormat(*positionAttributeId); const VertexFormat positionAttributeFormat = mesh.attributeFormat(*positionAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(positionAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(positionAttributeFormat),
"MeshTools::transform3D(): positions have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(positionAttributeFormat)), "MeshTools::transform3D(): positions have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(positionAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
CORRADE_ASSERT(vertexFormatComponentCount(positionAttributeFormat) == 3, CORRADE_ASSERT(vertexFormatComponentCount(positionAttributeFormat) == 3,
"MeshTools::transform3D(): expected 3D positions but got" << positionAttributeFormat, "MeshTools::transform3D(): expected 3D positions but got" << positionAttributeFormat,
@ -168,7 +168,7 @@ Trade::MeshData transform3D(const Trade::MeshData& mesh, const Matrix4& transfor
if(tangentAttributeId) { if(tangentAttributeId) {
tangentAttributeFormat = mesh.attributeFormat(*tangentAttributeId); tangentAttributeFormat = mesh.attributeFormat(*tangentAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(tangentAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(tangentAttributeFormat),
"MeshTools::transform3D(): tangents have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(tangentAttributeFormat)), "MeshTools::transform3D(): tangents have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(tangentAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
desiredTangentVertexFormat = vertexFormatComponentCount(mesh.attributeFormat(*tangentAttributeId)) == 4 ? desiredTangentVertexFormat = vertexFormatComponentCount(mesh.attributeFormat(*tangentAttributeId)) == 4 ?
VertexFormat::Vector4 : VertexFormat::Vector3; VertexFormat::Vector4 : VertexFormat::Vector3;
@ -179,7 +179,7 @@ Trade::MeshData transform3D(const Trade::MeshData& mesh, const Matrix4& transfor
if(bitangentAttributeId) { if(bitangentAttributeId) {
bitangentAttributeFormat = mesh.attributeFormat(*bitangentAttributeId); bitangentAttributeFormat = mesh.attributeFormat(*bitangentAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(bitangentAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(bitangentAttributeFormat),
"MeshTools::transform3D(): bitangents have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(bitangentAttributeFormat)), "MeshTools::transform3D(): bitangents have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(bitangentAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
if(bitangentAttributeFormat != VertexFormat::Vector3) if(bitangentAttributeFormat != VertexFormat::Vector3)
attributes[*bitangentAttributeId] = Trade::MeshAttributeData{Trade::MeshAttribute::Bitangent, VertexFormat::Vector3, nullptr, 0, morphTargetId}; attributes[*bitangentAttributeId] = Trade::MeshAttributeData{Trade::MeshAttribute::Bitangent, VertexFormat::Vector3, nullptr, 0, morphTargetId};
@ -188,7 +188,7 @@ Trade::MeshData transform3D(const Trade::MeshData& mesh, const Matrix4& transfor
if(normalAttributeId) { if(normalAttributeId) {
normalAttributeFormat = mesh.attributeFormat(*normalAttributeId); normalAttributeFormat = mesh.attributeFormat(*normalAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(normalAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(normalAttributeFormat),
"MeshTools::transform3D(): normals have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(normalAttributeFormat)), "MeshTools::transform3D(): normals have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(normalAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
if(normalAttributeFormat != VertexFormat::Vector3) if(normalAttributeFormat != VertexFormat::Vector3)
attributes[*normalAttributeId] = Trade::MeshAttributeData{Trade::MeshAttribute::Normal, VertexFormat::Vector3, nullptr, 0, morphTargetId}; attributes[*normalAttributeId] = Trade::MeshAttributeData{Trade::MeshAttribute::Normal, VertexFormat::Vector3, nullptr, 0, morphTargetId};
@ -323,7 +323,7 @@ Trade::MeshData transformTextureCoordinates2D(const Trade::MeshData& mesh, const
#endif #endif
const VertexFormat textureCoordinateAttributeFormat = mesh.attributeFormat(*textureCoordinateAttributeId); const VertexFormat textureCoordinateAttributeFormat = mesh.attributeFormat(*textureCoordinateAttributeId);
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(textureCoordinateAttributeFormat), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(textureCoordinateAttributeFormat),
"MeshTools::transformTextureCoordinates2D(): texture coordinates have an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(textureCoordinateAttributeFormat)), "MeshTools::transformTextureCoordinates2D(): texture coordinates have an implementation-specific format" << Debug::hex << vertexFormatUnwrap(textureCoordinateAttributeFormat),
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
/* Copy original attributes to a mutable array so we can update the /* Copy original attributes to a mutable array so we can update the

30
src/Magnum/PixelFormat.cpp

@ -36,7 +36,7 @@ namespace Magnum {
UnsignedInt pixelFormatSize(const PixelFormat format) { UnsignedInt pixelFormatSize(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"pixelFormatSize(): can't determine size of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "pixelFormatSize(): can't determine size of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -120,7 +120,7 @@ UnsignedInt pixelFormatSize(const PixelFormat format) {
PixelFormat pixelFormatChannelFormat(const PixelFormat format) { PixelFormat pixelFormatChannelFormat(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"pixelFormatChannelFormat(): can't determine channel format of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "pixelFormatChannelFormat(): can't determine channel format of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -211,7 +211,7 @@ PixelFormat pixelFormatChannelFormat(const PixelFormat format) {
UnsignedInt pixelFormatChannelCount(const PixelFormat format) { UnsignedInt pixelFormatChannelCount(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"pixelFormatChannelCount(): can't determine channel count of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "pixelFormatChannelCount(): can't determine channel count of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -292,7 +292,7 @@ UnsignedInt pixelFormatChannelCount(const PixelFormat format) {
bool isPixelFormatNormalized(const PixelFormat format) { bool isPixelFormatNormalized(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"isPixelFormatNormalized(): can't determine type of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "isPixelFormatNormalized(): can't determine type of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -371,7 +371,7 @@ bool isPixelFormatNormalized(const PixelFormat format) {
bool isPixelFormatIntegral(const PixelFormat format) { bool isPixelFormatIntegral(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"isPixelFormatIntegral(): can't determine type of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "isPixelFormatIntegral(): can't determine type of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -450,7 +450,7 @@ bool isPixelFormatIntegral(const PixelFormat format) {
bool isPixelFormatFloatingPoint(const PixelFormat format) { bool isPixelFormatFloatingPoint(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"isPixelFormatFloatingPoint(): can't determine type of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "isPixelFormatFloatingPoint(): can't determine type of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -529,7 +529,7 @@ bool isPixelFormatFloatingPoint(const PixelFormat format) {
bool isPixelFormatSrgb(const PixelFormat format) { bool isPixelFormatSrgb(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"isPixelFormatSrgb(): can't determine colorspace of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "isPixelFormatSrgb(): can't determine colorspace of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -608,7 +608,7 @@ bool isPixelFormatSrgb(const PixelFormat format) {
bool isPixelFormatDepthOrStencil(const PixelFormat format) { bool isPixelFormatDepthOrStencil(const PixelFormat format) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"isPixelFormatDepthOrStencil(): can't determine type of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "isPixelFormatDepthOrStencil(): can't determine type of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
#ifdef CORRADE_TARGET_GCC #ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -686,7 +686,7 @@ bool isPixelFormatDepthOrStencil(const PixelFormat format) {
PixelFormat pixelFormat(const PixelFormat format, const UnsignedInt channelCount, const bool srgb) { PixelFormat pixelFormat(const PixelFormat format, const UnsignedInt channelCount, const bool srgb) {
CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format),
"pixelFormat(): can't assemble a format out of an implementation-specific format" << reinterpret_cast<void*>(pixelFormatUnwrap(format)), {}); "pixelFormat(): can't assemble a format out of an implementation-specific format" << Debug::hex << pixelFormatUnwrap(format), {});
CORRADE_ASSERT(!isPixelFormatDepthOrStencil(format), CORRADE_ASSERT(!isPixelFormatDepthOrStencil(format),
"pixelFormat(): can't assemble a format out of" << format, {}); "pixelFormat(): can't assemble a format out of" << format, {});
@ -747,14 +747,14 @@ Debug& operator<<(Debug& debug, const PixelFormat value) {
debug << "PixelFormat" << Debug::nospace; debug << "PixelFormat" << Debug::nospace;
if(isPixelFormatImplementationSpecific(value)) { if(isPixelFormatImplementationSpecific(value)) {
return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << reinterpret_cast<void*>(pixelFormatUnwrap(value)) << Debug::nospace << ")"; return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << Debug::hex << pixelFormatUnwrap(value) << Debug::nospace << ")";
} }
if(UnsignedInt(value) - 1 < Containers::arraySize(PixelFormatNames)) { if(UnsignedInt(value) - 1 < Containers::arraySize(PixelFormatNames)) {
return debug << (packed ? "" : "::") << Debug::nospace << PixelFormatNames[UnsignedInt(value) - 1]; return debug << (packed ? "" : "::") << Debug::nospace << PixelFormatNames[UnsignedInt(value) - 1];
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif
@ -787,7 +787,7 @@ constexpr UnsignedShort CompressedBlockData[] {
Vector3i compressedPixelFormatBlockSize(const CompressedPixelFormat format) { Vector3i compressedPixelFormatBlockSize(const CompressedPixelFormat format) {
CORRADE_ASSERT(!(UnsignedInt(format) & (1 << 31)), CORRADE_ASSERT(!(UnsignedInt(format) & (1 << 31)),
"compressedPixelFormatBlockSize(): can't determine size of an implementation-specific format" << reinterpret_cast<void*>(compressedPixelFormatUnwrap(format)), {}); "compressedPixelFormatBlockSize(): can't determine size of an implementation-specific format" << Debug::hex << compressedPixelFormatUnwrap(format), {});
CORRADE_ASSERT(UnsignedInt(format) - 1 < Containers::arraySize(CompressedBlockData), CORRADE_ASSERT(UnsignedInt(format) - 1 < Containers::arraySize(CompressedBlockData),
"compressedPixelFormatBlockSize(): invalid format" << format, {}); "compressedPixelFormatBlockSize(): invalid format" << format, {});
@ -807,7 +807,7 @@ Vector3i compressedBlockSize(const CompressedPixelFormat format) {
UnsignedInt compressedPixelFormatBlockDataSize(const CompressedPixelFormat format) { UnsignedInt compressedPixelFormatBlockDataSize(const CompressedPixelFormat format) {
CORRADE_ASSERT(!(UnsignedInt(format) & (1 << 31)), CORRADE_ASSERT(!(UnsignedInt(format) & (1 << 31)),
"compressedPixelFormatBlockDataSize(): can't determine size of an implementation-specific format" << reinterpret_cast<void*>(compressedPixelFormatUnwrap(format)), {}); "compressedPixelFormatBlockDataSize(): can't determine size of an implementation-specific format" << Debug::hex << compressedPixelFormatUnwrap(format), {});
CORRADE_ASSERT(UnsignedInt(format) - 1 < Containers::arraySize(CompressedBlockData), CORRADE_ASSERT(UnsignedInt(format) - 1 < Containers::arraySize(CompressedBlockData),
"compressedPixelFormatBlockDataSize(): invalid format" << format, {}); "compressedPixelFormatBlockDataSize(): invalid format" << format, {});
@ -822,14 +822,14 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) {
debug << "CompressedPixelFormat" << Debug::nospace; debug << "CompressedPixelFormat" << Debug::nospace;
if(isCompressedPixelFormatImplementationSpecific(value)) { if(isCompressedPixelFormatImplementationSpecific(value)) {
return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << reinterpret_cast<void*>(compressedPixelFormatUnwrap(value)) << Debug::nospace << ")"; return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << Debug::hex << compressedPixelFormatUnwrap(value) << Debug::nospace << ")";
} }
if(UnsignedInt(value) - 1 < Containers::arraySize(CompressedPixelFormatNames)) { if(UnsignedInt(value) - 1 < Containers::arraySize(CompressedPixelFormatNames)) {
return debug << (packed ? "" : "::") << Debug::nospace << CompressedPixelFormatNames[UnsignedInt(value) - 1]; return debug << (packed ? "" : "::") << Debug::nospace << CompressedPixelFormatNames[UnsignedInt(value) - 1];
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif

4
src/Magnum/PixelFormat.h

@ -966,7 +966,7 @@ template<class T> constexpr PixelFormat pixelFormatWrap(T implementationSpecific
static_assert(sizeof(T) <= 4, static_assert(sizeof(T) <= 4,
"format types larger than 32bits are not supported"); "format types larger than 32bits are not supported");
return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)), return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)),
"pixelFormatWrap(): implementation-specific value" << reinterpret_cast<void*>(implementationSpecific) << "already wrapped or too large"), "pixelFormatWrap(): implementation-specific value" << Debug::hex << UnsignedInt(implementationSpecific) << "already wrapped or too large"),
PixelFormat((1u << 31)|UnsignedInt(implementationSpecific)); PixelFormat((1u << 31)|UnsignedInt(implementationSpecific));
} }
@ -2599,7 +2599,7 @@ template<class T> constexpr CompressedPixelFormat compressedPixelFormatWrap(T im
static_assert(sizeof(T) <= 4, static_assert(sizeof(T) <= 4,
"format types larger than 32bits are not supported"); "format types larger than 32bits are not supported");
return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)), return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)),
"compressedPixelFormatWrap(): implementation-specific value" << reinterpret_cast<void*>(implementationSpecific) << "already wrapped or too large"), "compressedPixelFormatWrap(): implementation-specific value" << Debug::hex << UnsignedInt(implementationSpecific) << "already wrapped or too large"),
CompressedPixelFormat((1u << 31)|UnsignedInt(implementationSpecific)); CompressedPixelFormat((1u << 31)|UnsignedInt(implementationSpecific));
} }

2
src/Magnum/Resource.cpp

@ -46,7 +46,7 @@ Debug& operator<<(Debug& debug, const ResourceState value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ResourceKey& value) { Debug& operator<<(Debug& debug, const ResourceKey& value) {

6
src/Magnum/Sampler.cpp

@ -45,7 +45,7 @@ Debug& operator<<(Debug& debug, const SamplerFilter value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SamplerMipmap value) { Debug& operator<<(Debug& debug, const SamplerMipmap value) {
@ -64,7 +64,7 @@ Debug& operator<<(Debug& debug, const SamplerMipmap value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SamplerWrapping value) { Debug& operator<<(Debug& debug, const SamplerWrapping value) {
@ -85,7 +85,7 @@ Debug& operator<<(Debug& debug, const SamplerWrapping value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif

2
src/Magnum/SceneGraph/Animable.cpp

@ -42,7 +42,7 @@ Debug& operator<<(Debug& debug, const AnimationState value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
}} }}

6
src/Magnum/ShaderTools/AbstractConverter.cpp

@ -751,7 +751,7 @@ Debug& operator<<(Debug& debug, const ConverterFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ConverterFeatures value) { Debug& operator<<(Debug& debug, const ConverterFeatures value) {
@ -786,7 +786,7 @@ Debug& operator<<(Debug& debug, const ConverterFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ConverterFlags value) { Debug& operator<<(Debug& debug, const ConverterFlags value) {
@ -816,7 +816,7 @@ Debug& operator<<(Debug& debug, const Format value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
}} }}

2
src/Magnum/ShaderTools/Stage.cpp

@ -55,7 +55,7 @@ Debug& operator<<(Debug& debug, const Stage value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
}} }}

2
src/Magnum/Shaders/DistanceFieldVectorGL.cpp

@ -527,7 +527,7 @@ Debug& operator<<(Debug& debug, const DistanceFieldVectorGLFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DistanceFieldVectorGLFlags value) { Debug& operator<<(Debug& debug, const DistanceFieldVectorGLFlags value) {

2
src/Magnum/Shaders/FlatGL.cpp

@ -868,7 +868,7 @@ Debug& operator<<(Debug& debug, const FlatGLFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const FlatGLFlags value) { Debug& operator<<(Debug& debug, const FlatGLFlags value) {

6
src/Magnum/Shaders/Line.cpp

@ -56,7 +56,7 @@ Debug& operator<<(Debug& debug, const LineCapStyle value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const LineJoinStyle value) { Debug& operator<<(Debug& debug, const LineJoinStyle value) {
@ -71,7 +71,7 @@ Debug& operator<<(Debug& debug, const LineJoinStyle value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const LineVertexAnnotation value) { Debug& operator<<(Debug& debug, const LineVertexAnnotation value) {
@ -90,7 +90,7 @@ Debug& operator<<(Debug& debug, const LineVertexAnnotation value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const LineVertexAnnotations value) { Debug& operator<<(Debug& debug, const LineVertexAnnotations value) {

2
src/Magnum/Shaders/LineGL.cpp

@ -511,7 +511,7 @@ Debug& operator<<(Debug& debug, const LineGLFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const LineGLFlags value) { Debug& operator<<(Debug& debug, const LineGLFlags value) {

4
src/Magnum/Shaders/MeshVisualizerGL.cpp

@ -1792,7 +1792,7 @@ Debug& operator<<(Debug& debug, const MeshVisualizerGL2D::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MeshVisualizerGL3D::Flag value) { Debug& operator<<(Debug& debug, const MeshVisualizerGL3D::Flag value) {
@ -1850,7 +1850,7 @@ Debug& operator<<(Debug& debug, const MeshVisualizerGL3D::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MeshVisualizerGL2D::Flags value) { Debug& operator<<(Debug& debug, const MeshVisualizerGL2D::Flags value) {

2
src/Magnum/Shaders/PhongGL.cpp

@ -1370,7 +1370,7 @@ Debug& operator<<(Debug& debug, const PhongGL::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const PhongGL::Flags value) { Debug& operator<<(Debug& debug, const PhongGL::Flags value) {

2
src/Magnum/Shaders/VectorGL.cpp

@ -506,7 +506,7 @@ Debug& operator<<(Debug& debug, const VectorGLFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const VectorGLFlags value) { Debug& operator<<(Debug& debug, const VectorGLFlags value) {

2
src/Magnum/Shaders/VertexColorGL.cpp

@ -348,7 +348,7 @@ Debug& operator<<(Debug& debug, const VertexColorGLFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const VertexColorGLFlags value) { Debug& operator<<(Debug& debug, const VertexColorGLFlags value) {

2
src/Magnum/Test/VersionTest.cpp

@ -46,7 +46,7 @@ void VersionTest::test() {
Debug{} << "MAGNUM_VERSION_MONTH:" << MAGNUM_VERSION_MONTH; Debug{} << "MAGNUM_VERSION_MONTH:" << MAGNUM_VERSION_MONTH;
#ifdef MAGNUM_VERSION_COMMIT #ifdef MAGNUM_VERSION_COMMIT
Debug{} << "MAGNUM_VERSION_COMMIT:" << MAGNUM_VERSION_COMMIT; Debug{} << "MAGNUM_VERSION_COMMIT:" << MAGNUM_VERSION_COMMIT;
Debug{} << "MAGNUM_VERSION_HASH:" << reinterpret_cast<void*>(MAGNUM_VERSION_HASH); Debug{} << "MAGNUM_VERSION_HASH:" << Debug::hex << MAGNUM_VERSION_HASH;
Debug{} << "MAGNUM_VERSION_STRING:" << MAGNUM_VERSION_STRING; Debug{} << "MAGNUM_VERSION_STRING:" << MAGNUM_VERSION_STRING;
#else #else
Debug{} << "No Git version information available."; Debug{} << "No Git version information available.";

2
src/Magnum/Text/AbstractFont.cpp

@ -400,7 +400,7 @@ Debug& operator<<(Debug& debug, const FontFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const FontFeatures value) { Debug& operator<<(Debug& debug, const FontFeatures value) {

2
src/Magnum/Text/AbstractFontConverter.cpp

@ -298,7 +298,7 @@ Debug& operator<<(Debug& debug, const FontConverterFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(Containers::enumCastUnderlyingType(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << Containers::enumCastUnderlyingType(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const FontConverterFeatures value) { Debug& operator<<(Debug& debug, const FontConverterFeatures value) {

2
src/Magnum/Text/AbstractGlyphCache.cpp

@ -57,7 +57,7 @@ Debug& operator<<(Debug& debug, const GlyphCacheFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const GlyphCacheFeatures value) { Debug& operator<<(Debug& debug, const GlyphCacheFeatures value) {

2
src/Magnum/Text/Alignment.cpp

@ -75,7 +75,7 @@ Debug& operator<<(Debug& debug, const Alignment value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
}} }}

4
src/Magnum/Text/Direction.cpp

@ -44,7 +44,7 @@ Debug& operator<<(Debug& debug, const ShapeDirection value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const LayoutDirection value) { Debug& operator<<(Debug& debug, const LayoutDirection value) {
@ -61,7 +61,7 @@ Debug& operator<<(Debug& debug, const LayoutDirection value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
}} }}

2
src/Magnum/Text/Implementation/printFourCC.h

@ -43,7 +43,7 @@ inline Debug& printFourCC(Debug& debug, UnsignedInt value) {
const char data[]{'\'', char(c), '\'', '\0'}; const char data[]{'\'', char(c), '\'', '\0'};
debug << data; debug << data;
} else { } else {
debug << reinterpret_cast<void*>(c); debug << Debug::hex << c;
} }
value >>= 8; value >>= 8;

2
src/Magnum/TextureTools/Atlas.cpp

@ -60,7 +60,7 @@ Debug& operator<<(Debug& debug, const AtlasLandfillFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const AtlasLandfillFlags value) { Debug& operator<<(Debug& debug, const AtlasLandfillFlags value) {

4
src/Magnum/Trade/AbstractImageConverter.cpp

@ -1346,7 +1346,7 @@ Debug& operator<<(Debug& debug, const ImageConverterFeature value) {
#endif #endif
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImageConverterFeatures value) { Debug& operator<<(Debug& debug, const ImageConverterFeatures value) {
@ -1386,7 +1386,7 @@ Debug& operator<<(Debug& debug, const ImageConverterFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ImageConverterFlags value) { Debug& operator<<(Debug& debug, const ImageConverterFlags value) {

4
src/Magnum/Trade/AbstractImporter.cpp

@ -1633,7 +1633,7 @@ Debug& operator<<(Debug& debug, const ImporterFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const ImporterFeatures value) { Debug& operator<<(Debug& debug, const ImporterFeatures value) {
@ -1655,7 +1655,7 @@ Debug& operator<<(Debug& debug, const ImporterFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ImporterFlags value) { Debug& operator<<(Debug& debug, const ImporterFlags value) {

6
src/Magnum/Trade/AbstractSceneConverter.cpp

@ -1752,7 +1752,7 @@ Debug& operator<<(Debug& debug, const SceneConverterFeature value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SceneConverterFeatures value) { Debug& operator<<(Debug& debug, const SceneConverterFeatures value) {
@ -1797,7 +1797,7 @@ Debug& operator<<(Debug& debug, const SceneConverterFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const SceneConverterFlags value) { Debug& operator<<(Debug& debug, const SceneConverterFlags value) {
@ -1834,7 +1834,7 @@ Debug& operator<<(Debug& debug, const SceneContent value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SceneContents value) { Debug& operator<<(Debug& debug, const SceneContents value) {

4
src/Magnum/Trade/AnimationData.cpp

@ -70,7 +70,7 @@ Debug& operator<<(Debug& debug, const AnimationTrackType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
UnsignedInt animationTrackTypeSize(const AnimationTrackType type) { UnsignedInt animationTrackTypeSize(const AnimationTrackType type) {
@ -189,7 +189,7 @@ Debug& operator<<(Debug& debug, const AnimationTrackTarget value) {
#endif #endif
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
namespace { namespace {

2
src/Magnum/Trade/CameraData.cpp

@ -62,7 +62,7 @@ Debug& operator<<(Debug& debug, const CameraType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
}} }}

2
src/Magnum/Trade/Data.cpp

@ -46,7 +46,7 @@ Debug& operator<<(Debug& debug, const DataFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const DataFlags value) { Debug& operator<<(Debug& debug, const DataFlags value) {

2
src/Magnum/Trade/LightData.cpp

@ -83,7 +83,7 @@ Debug& operator<<(Debug& debug, const LightType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif

12
src/Magnum/Trade/MaterialData.cpp

@ -1151,7 +1151,7 @@ Debug& operator<<(Debug& debug, const MaterialLayer value) {
debug << "Trade::MaterialLayer" << Debug::nospace; debug << "Trade::MaterialLayer" << Debug::nospace;
if(UnsignedInt(value) - 1 >= Containers::arraySize(LayerMap)) if(UnsignedInt(value) - 1 >= Containers::arraySize(LayerMap))
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
return debug << "::" << Debug::nospace << LayerMap[UnsignedInt(value) - 1]; return debug << "::" << Debug::nospace << LayerMap[UnsignedInt(value) - 1];
} }
@ -1160,7 +1160,7 @@ Debug& operator<<(Debug& debug, const MaterialAttribute value) {
debug << "Trade::MaterialAttribute" << Debug::nospace; debug << "Trade::MaterialAttribute" << Debug::nospace;
if(UnsignedInt(value) - 1 >= Containers::arraySize(AttributeMap)) if(UnsignedInt(value) - 1 >= Containers::arraySize(AttributeMap))
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
/* LayerName is prefixed with a single space, drop that */ /* LayerName is prefixed with a single space, drop that */
Containers::StringView string = AttributeMap[UnsignedInt(value) - 1].name; Containers::StringView string = AttributeMap[UnsignedInt(value) - 1].name;
@ -1226,7 +1226,7 @@ Debug& operator<<(Debug& debug, const MaterialAttributeType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const MaterialType value) { Debug& operator<<(Debug& debug, const MaterialType value) {
@ -1247,7 +1247,7 @@ Debug& operator<<(Debug& debug, const MaterialType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const MaterialTypes value) { Debug& operator<<(Debug& debug, const MaterialTypes value) {
@ -1273,7 +1273,7 @@ Debug& operator<<(Debug& debug, const MaterialData::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MaterialData::Flags value) { Debug& operator<<(Debug& debug, const MaterialData::Flags value) {
@ -1300,7 +1300,7 @@ Debug& operator<<(Debug& debug, const MaterialAlphaMode value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
}} }}

26
src/Magnum/Trade/MeshData.cpp

@ -583,7 +583,7 @@ void MeshData::indicesInto(const Containers::StridedArrayView1D<UnsignedInt>& de
"Trade::MeshData::indicesInto(): the mesh is not indexed", ); "Trade::MeshData::indicesInto(): the mesh is not indexed", );
CORRADE_ASSERT(destination.size() == indexCount(), "Trade::MeshData::indicesInto(): expected a view with" << indexCount() << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == indexCount(), "Trade::MeshData::indicesInto(): expected a view with" << indexCount() << "elements but got" << destination.size(), );
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType),
"Trade::MeshData::indicesInto(): can't extract data out of an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(_indexType)), ); "Trade::MeshData::indicesInto(): can't extract data out of an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(_indexType), );
const auto destination1ui = Containers::arrayCast<2, UnsignedInt>(destination); const auto destination1ui = Containers::arrayCast<2, UnsignedInt>(destination);
const Containers::StridedArrayView2D<const char> indexData = indices(); const Containers::StridedArrayView2D<const char> indexData = indices();
@ -617,7 +617,7 @@ void MeshData::positions2DInto(const Containers::StridedArrayView1D<Vector2>& de
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::positions2DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::positions2DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::positions2DInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::positions2DInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const auto destination2f = Containers::arrayCast<2, Float>(destination); const auto destination2f = Containers::arrayCast<2, Float>(destination);
@ -672,7 +672,7 @@ void MeshData::positions3DInto(const Containers::StridedArrayView1D<Vector3>& de
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::positions3DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::positions3DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::positions3DInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::positions3DInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const Containers::StridedArrayView2D<Float> destination2f = Containers::arrayCast<2, Float>(Containers::arrayCast<Vector2>(destination)); const Containers::StridedArrayView2D<Float> destination2f = Containers::arrayCast<2, Float>(Containers::arrayCast<Vector2>(destination));
const Containers::StridedArrayView2D<Float> destination3f = Containers::arrayCast<2, Float>(destination); const Containers::StridedArrayView2D<Float> destination3f = Containers::arrayCast<2, Float>(destination);
@ -776,7 +776,7 @@ void MeshData::tangentsInto(const Containers::StridedArrayView1D<Vector3>& desti
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::tangentsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::tangentsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::tangentsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::tangentsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
/* If the tangent is four-component, ignore the last component; otherwise /* If the tangent is four-component, ignore the last component; otherwise
copy/unpack given format directly */ copy/unpack given format directly */
@ -810,7 +810,7 @@ void MeshData::bitangentSignsInto(const Containers::StridedArrayView1D<Float>& d
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::bitangentSignsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::bitangentSignsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::bitangentSignsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::bitangentSignsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const auto destination1f = Containers::arrayCast<2, Float>(destination); const auto destination1f = Containers::arrayCast<2, Float>(destination);
@ -842,7 +842,7 @@ void MeshData::bitangentsInto(const Containers::StridedArrayView1D<Vector3>& des
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::bitangentsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::bitangentsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::bitangentsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::bitangentsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
tangentsOrNormalsInto(attributeDataViewInternal(attribute), destination, attribute._format); tangentsOrNormalsInto(attributeDataViewInternal(attribute), destination, attribute._format);
} }
@ -863,7 +863,7 @@ void MeshData::normalsInto(const Containers::StridedArrayView1D<Vector3>& destin
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::normalsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::normalsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::normalsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::normalsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
tangentsOrNormalsInto(attributeDataViewInternal(attribute), destination, attribute._format); tangentsOrNormalsInto(attributeDataViewInternal(attribute), destination, attribute._format);
} }
@ -884,7 +884,7 @@ void MeshData::textureCoordinates2DInto(const Containers::StridedArrayView1D<Vec
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::textureCoordinates2DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::textureCoordinates2DInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::textureCoordinatesInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::textureCoordinatesInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const auto destination2f = Containers::arrayCast<2, Float>(destination); const auto destination2f = Containers::arrayCast<2, Float>(destination);
@ -928,7 +928,7 @@ void MeshData::colorsInto(const Containers::StridedArrayView1D<Color4>& destinat
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::colorsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::colorsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::colorsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::colorsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const Containers::StridedArrayView2D<Float> destination3f = Containers::arrayCast<2, Float>(Containers::arrayCast<Vector3>(destination)); const Containers::StridedArrayView2D<Float> destination3f = Containers::arrayCast<2, Float>(Containers::arrayCast<Vector3>(destination));
const Containers::StridedArrayView2D<Float> destination4f = Containers::arrayCast<2, Float>(destination); const Containers::StridedArrayView2D<Float> destination4f = Containers::arrayCast<2, Float>(destination);
@ -989,7 +989,7 @@ void MeshData::jointIdsInto(const Containers::StridedArrayView2D<UnsignedInt>& d
CORRADE_ASSERT(destination.isContiguous<1>(), CORRADE_ASSERT(destination.isContiguous<1>(),
"Trade::MeshData::jointIdsInto(): second view dimension is not contiguous", ); "Trade::MeshData::jointIdsInto(): second view dimension is not contiguous", );
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::jointIdsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::jointIdsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
if(attribute._format == VertexFormat::UnsignedInt) if(attribute._format == VertexFormat::UnsignedInt)
@ -1026,7 +1026,7 @@ void MeshData::weightsInto(const Containers::StridedArrayView2D<Float>& destinat
CORRADE_ASSERT(destination.isContiguous<1>(), CORRADE_ASSERT(destination.isContiguous<1>(),
"Trade::MeshData::weightsInto(): second view dimension is not contiguous", ); "Trade::MeshData::weightsInto(): second view dimension is not contiguous", );
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::weightsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::weightsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
if(attribute._format == VertexFormat::Float) if(attribute._format == VertexFormat::Float)
@ -1057,7 +1057,7 @@ void MeshData::objectIdsInto(const Containers::StridedArrayView1D<UnsignedInt>&
CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::objectIdsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), ); CORRADE_ASSERT(destination.size() == _vertexCount, "Trade::MeshData::objectIdsInto(): expected a view with" << _vertexCount << "elements but got" << destination.size(), );
const MeshAttributeData& attribute = _attributes[attributeId]; const MeshAttributeData& attribute = _attributes[attributeId];
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
"Trade::MeshData::objectIdsInto(): can't extract data out of an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), ); "Trade::MeshData::objectIdsInto(): can't extract data out of an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), );
const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute); const Containers::StridedArrayView1D<const void> attributeData = attributeDataViewInternal(attribute);
const auto destination1ui = Containers::arrayCast<2, UnsignedInt>(destination); const auto destination1ui = Containers::arrayCast<2, UnsignedInt>(destination);
@ -1120,7 +1120,7 @@ Debug& operator<<(Debug& debug, const MeshAttribute value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
}} }}

8
src/Magnum/Trade/MeshData.h

@ -2289,7 +2289,7 @@ namespace Implementation {
template<class T, class> MeshIndexData::MeshIndexData(const MeshIndexType type, T&& data) noexcept: _type{type} { template<class T, class> MeshIndexData::MeshIndexData(const MeshIndexType type, T&& data) noexcept: _type{type} {
const Containers::ArrayView<const void> erased = data; const Containers::ArrayView<const void> erased = data;
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(type), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(type),
"Trade::MeshIndexData: can't create index data from a contiguous view and an implementation-specific type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(type)) << Debug::nospace << ", pass a strided view instead", ); "Trade::MeshIndexData: can't create index data from a contiguous view and an implementation-specific type" << Debug::hex << meshIndexTypeUnwrap(type) << Debug::nospace << ", pass a strided view instead", );
const std::size_t typeSize = meshIndexTypeSize(type); const std::size_t typeSize = meshIndexTypeSize(type);
CORRADE_ASSERT(erased.size()%typeSize == 0, CORRADE_ASSERT(erased.size()%typeSize == 0,
"Trade::MeshIndexData: view size" << erased.size() << "does not correspond to" << type, ); "Trade::MeshIndexData: view size" << erased.size() << "does not correspond to" << type, );
@ -2657,7 +2657,7 @@ template<class T> Containers::StridedArrayView1D<const T> MeshData::indices() co
if(!data.stride()[1]) return {}; if(!data.stride()[1]) return {};
#endif #endif
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType),
"Trade::MeshData::indices(): can't cast data from an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(_indexType)), {}); "Trade::MeshData::indices(): can't cast data from an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(_indexType), {});
CORRADE_ASSERT(Implementation::meshIndexTypeFor<T>() == _indexType, CORRADE_ASSERT(Implementation::meshIndexTypeFor<T>() == _indexType,
"Trade::MeshData::indices(): indices are" << _indexType << "but requested" << Implementation::meshIndexTypeFor<T>(), {}); "Trade::MeshData::indices(): indices are" << _indexType << "but requested" << Implementation::meshIndexTypeFor<T>(), {});
return Containers::arrayCast<1, const T>(data); return Containers::arrayCast<1, const T>(data);
@ -2671,7 +2671,7 @@ template<class T> Containers::StridedArrayView1D<T> MeshData::mutableIndices() {
if(!data.stride()[1]) return {}; if(!data.stride()[1]) return {};
#endif #endif
CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType), CORRADE_ASSERT(!isMeshIndexTypeImplementationSpecific(_indexType),
"Trade::MeshData::mutableIndices(): can't cast data from an implementation-specific index type" << reinterpret_cast<void*>(meshIndexTypeUnwrap(_indexType)), {}); "Trade::MeshData::mutableIndices(): can't cast data from an implementation-specific index type" << Debug::hex << meshIndexTypeUnwrap(_indexType), {});
CORRADE_ASSERT(Implementation::meshIndexTypeFor<T>() == _indexType, CORRADE_ASSERT(Implementation::meshIndexTypeFor<T>() == _indexType,
"Trade::MeshData::mutableIndices(): indices are" << _indexType << "but requested" << Implementation::meshIndexTypeFor<T>(), {}); "Trade::MeshData::mutableIndices(): indices are" << _indexType << "but requested" << Implementation::meshIndexTypeFor<T>(), {});
return Containers::arrayCast<1, T>(data); return Containers::arrayCast<1, T>(data);
@ -2684,7 +2684,7 @@ template<class T> bool MeshData::checkVertexFormatCompatibility(const MeshAttrib
#endif #endif
) const { ) const {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format),
prefix << "can't cast data from an implementation-specific vertex format" << reinterpret_cast<void*>(vertexFormatUnwrap(attribute._format)), false); prefix << "can't cast data from an implementation-specific vertex format" << Debug::hex << vertexFormatUnwrap(attribute._format), false);
CORRADE_ASSERT(Implementation::isVertexFormatCompatible<typename std::remove_extent<T>::type>(attribute._format), CORRADE_ASSERT(Implementation::isVertexFormatCompatible<typename std::remove_extent<T>::type>(attribute._format),
prefix << attribute._name << "is" << attribute._format << "but requested a type equivalent to" << Implementation::vertexFormatFor<typename std::remove_extent<T>::type>(), false); prefix << attribute._name << "is" << attribute._format << "but requested a type equivalent to" << Implementation::vertexFormatFor<typename std::remove_extent<T>::type>(), false);
CORRADE_ASSERT(!attribute._arraySize || std::is_array<T>::value, CORRADE_ASSERT(!attribute._arraySize || std::is_array<T>::value,

4
src/Magnum/Trade/ObjectData2D.cpp

@ -116,7 +116,7 @@ Debug& operator<<(Debug& debug, const ObjectInstanceType2D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ObjectFlag2D value) { Debug& operator<<(Debug& debug, const ObjectFlag2D value) {
@ -130,7 +130,7 @@ Debug& operator<<(Debug& debug, const ObjectFlag2D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ObjectFlags2D value) { Debug& operator<<(Debug& debug, const ObjectFlags2D value) {

4
src/Magnum/Trade/ObjectData3D.cpp

@ -113,7 +113,7 @@ Debug& operator<<(Debug& debug, const ObjectInstanceType3D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ObjectFlag3D value) { Debug& operator<<(Debug& debug, const ObjectFlag3D value) {
@ -127,7 +127,7 @@ Debug& operator<<(Debug& debug, const ObjectFlag3D value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ObjectFlags3D value) { Debug& operator<<(Debug& debug, const ObjectFlags3D value) {

2
src/Magnum/Trade/PhongMaterialData.cpp

@ -451,7 +451,7 @@ Debug& operator<<(Debug& debug, const PhongMaterialData::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const PhongMaterialData::Flags value) { Debug& operator<<(Debug& debug, const PhongMaterialData::Flags value) {

8
src/Magnum/Trade/SceneData.cpp

@ -71,7 +71,7 @@ Debug& operator<<(Debug& debug, const SceneMappingType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
UnsignedInt sceneMappingTypeSize(const SceneMappingType type) { UnsignedInt sceneMappingTypeSize(const SceneMappingType type) {
@ -137,7 +137,7 @@ Debug& operator<<(Debug& debug, const SceneField value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SceneFieldType value) { Debug& operator<<(Debug& debug, const SceneFieldType value) {
@ -259,7 +259,7 @@ Debug& operator<<(Debug& debug, const SceneFieldType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
UnsignedInt sceneFieldTypeSize(const SceneFieldType type) { UnsignedInt sceneFieldTypeSize(const SceneFieldType type) {
@ -545,7 +545,7 @@ Debug& operator<<(Debug& debug, const SceneFieldFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << (packed ? "" : ")");
} }
Debug& operator<<(Debug& debug, const SceneFieldFlags value) { Debug& operator<<(Debug& debug, const SceneFieldFlags value) {

2
src/Magnum/Trade/TextureData.cpp

@ -48,7 +48,7 @@ Debug& operator<<(Debug& debug, const TextureType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << (packed ? "" : ")");
} }
#endif #endif

20
src/Magnum/VertexFormat.cpp

@ -34,7 +34,7 @@ namespace Magnum {
UnsignedInt vertexFormatSize(const VertexFormat format) { UnsignedInt vertexFormatSize(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormatSize(): can't determine size of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormatSize(): can't determine size of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::UnsignedByte: case VertexFormat::UnsignedByte:
@ -171,7 +171,7 @@ UnsignedInt vertexFormatSize(const VertexFormat format) {
UnsignedInt vertexFormatComponentCount(const VertexFormat format) { UnsignedInt vertexFormatComponentCount(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormatComponentCount(): can't determine component count of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormatComponentCount(): can't determine component count of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::Float: case VertexFormat::Float:
@ -297,7 +297,7 @@ UnsignedInt vertexFormatComponentCount(const VertexFormat format) {
VertexFormat vertexFormatComponentFormat(const VertexFormat format) { VertexFormat vertexFormatComponentFormat(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormatComponentFormat(): can't determine component format of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormatComponentFormat(): can't determine component format of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::Float: case VertexFormat::Float:
@ -433,7 +433,7 @@ VertexFormat vertexFormatComponentFormat(const VertexFormat format) {
UnsignedInt vertexFormatVectorCount(const VertexFormat format) { UnsignedInt vertexFormatVectorCount(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormatVectorCount(): can't determine vector count of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormatVectorCount(): can't determine vector count of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::Float: case VertexFormat::Float:
@ -559,7 +559,7 @@ UnsignedInt vertexFormatVectorCount(const VertexFormat format) {
UnsignedInt vertexFormatVectorStride(const VertexFormat format) { UnsignedInt vertexFormatVectorStride(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormatVectorStride(): can't determine vector count of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormatVectorStride(): can't determine vector count of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::UnsignedByte: case VertexFormat::UnsignedByte:
@ -688,7 +688,7 @@ UnsignedInt vertexFormatVectorStride(const VertexFormat format) {
bool isVertexFormatNormalized(const VertexFormat format) { bool isVertexFormatNormalized(const VertexFormat format) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"isVertexFormatNormalized(): can't determine normalization of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "isVertexFormatNormalized(): can't determine normalization of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
switch(format) { switch(format) {
case VertexFormat::Float: case VertexFormat::Float:
@ -810,7 +810,7 @@ bool isVertexFormatNormalized(const VertexFormat format) {
VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt componentCount, const bool normalized) { VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt componentCount, const bool normalized) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormat(): can't assemble a format out of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormat(): can't assemble a format out of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
VertexFormat componentFormat = vertexFormatComponentFormat(format); VertexFormat componentFormat = vertexFormatComponentFormat(format);
@ -851,7 +851,7 @@ VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt component
VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt vectorCount, UnsignedInt componentCount, const bool aligned) { VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt vectorCount, UnsignedInt componentCount, const bool aligned) {
CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format), CORRADE_ASSERT(!isVertexFormatImplementationSpecific(format),
"vertexFormat(): can't assemble a format out of an implementation-specific format" << reinterpret_cast<void*>(vertexFormatUnwrap(format)), {}); "vertexFormat(): can't assemble a format out of an implementation-specific format" << Debug::hex << vertexFormatUnwrap(format), {});
CORRADE_ASSERT(vectorCount >= 2 && vectorCount <= 4, CORRADE_ASSERT(vectorCount >= 2 && vectorCount <= 4,
"vertexFormat(): invalid vector count" << vectorCount, {}); "vertexFormat(): invalid vector count" << vectorCount, {});
CORRADE_ASSERT(componentCount >= 2 && componentCount <= 4, CORRADE_ASSERT(componentCount >= 2 && componentCount <= 4,
@ -916,14 +916,14 @@ Debug& operator<<(Debug& debug, const VertexFormat value) {
debug << "VertexFormat" << Debug::nospace; debug << "VertexFormat" << Debug::nospace;
if(isVertexFormatImplementationSpecific(value)) { if(isVertexFormatImplementationSpecific(value)) {
return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << reinterpret_cast<void*>(vertexFormatUnwrap(value)) << Debug::nospace << ")"; return debug << (packed ? "ImplementationSpecific(" : "::ImplementationSpecific(") << Debug::nospace << Debug::hex << vertexFormatUnwrap(value) << Debug::nospace << ")";
} }
if(UnsignedInt(value) - 1 < Containers::arraySize(VertexFormatNames)) { if(UnsignedInt(value) - 1 < Containers::arraySize(VertexFormatNames)) {
return debug << (packed ? "" : "::") << Debug::nospace << VertexFormatNames[UnsignedInt(value) - 1]; return debug << (packed ? "" : "::") << Debug::nospace << VertexFormatNames[UnsignedInt(value) - 1];
} }
return debug << (packed ? "" : "(") << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << (packed ? "" : ")"); return debug << (packed ? "" : "(") << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << (packed ? "" : ")");
} }
} }

2
src/Magnum/VertexFormat.h

@ -1346,7 +1346,7 @@ remaining 31 bits. Use @ref vertexFormatUnwrap() for the inverse operation.
template<class T> constexpr VertexFormat vertexFormatWrap(T implementationSpecific) { template<class T> constexpr VertexFormat vertexFormatWrap(T implementationSpecific) {
static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported"); static_assert(sizeof(T) <= 4, "types larger than 32bits are not supported");
return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)), return CORRADE_CONSTEXPR_ASSERT(!(UnsignedInt(implementationSpecific) & (1u << 31)),
"vertexFormatWrap(): implementation-specific value" << reinterpret_cast<void*>(implementationSpecific) << "already wrapped or too large"), "vertexFormatWrap(): implementation-specific value" << Debug::hex << UnsignedInt(implementationSpecific) << "already wrapped or too large"),
VertexFormat((1u << 31)|UnsignedInt(implementationSpecific)); VertexFormat((1u << 31)|UnsignedInt(implementationSpecific));
} }

2
src/Magnum/Vk/DeviceFeatures.cpp

@ -53,7 +53,7 @@ Debug& operator<<(Debug& debug, const DeviceFeature value) {
return debug << "::" << Debug::nospace << FeatureNames[UnsignedInt(value)]; return debug << "::" << Debug::nospace << FeatureNames[UnsignedInt(value)];
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DeviceFeatures& value) { Debug& operator<<(Debug& debug, const DeviceFeatures& value) {

4
src/Magnum/Vk/DeviceProperties.cpp

@ -716,7 +716,7 @@ Debug& operator<<(Debug& debug, const QueueFlag value) {
} }
/* Flag bits should be in hex, unlike plain values */ /* Flag bits should be in hex, unlike plain values */
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const QueueFlags value) { Debug& operator<<(Debug& debug, const QueueFlags value) {
@ -740,7 +740,7 @@ Debug& operator<<(Debug& debug, const MemoryHeapFlag value) {
} }
/* Flag bits should be in hex, unlike plain values */ /* Flag bits should be in hex, unlike plain values */
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MemoryHeapFlags value) { Debug& operator<<(Debug& debug, const MemoryHeapFlags value) {

2
src/Magnum/Vk/Handle.cpp

@ -41,7 +41,7 @@ Debug& operator<<(Debug& debug, const HandleFlag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const HandleFlags value) { Debug& operator<<(Debug& debug, const HandleFlags value) {

2
src/Magnum/Vk/Image.cpp

@ -84,7 +84,7 @@ Debug& operator<<(Debug& debug, const ImageAspect value) {
} }
/* Flag bits should be in hex, unlike plain values */ /* Flag bits should be in hex, unlike plain values */
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const ImageAspects value) { Debug& operator<<(Debug& debug, const ImageAspects value) {

2
src/Magnum/Vk/Memory.cpp

@ -148,7 +148,7 @@ Debug& operator<<(Debug& debug, const MemoryFlag value) {
} }
/* Flag bits should be in hex, unlike plain values */ /* Flag bits should be in hex, unlike plain values */
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedInt(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedInt(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const MemoryFlags value) { Debug& operator<<(Debug& debug, const MemoryFlags value) {

2
src/Magnum/Vk/Pipeline.cpp

@ -501,7 +501,7 @@ Debug& operator<<(Debug& debug, const DynamicRasterizationState value) {
return debug << "::" << Debug::nospace << DynamicRasterizationStateNames[UnsignedInt(value)]; return debug << "::" << Debug::nospace << DynamicRasterizationStateNames[UnsignedInt(value)];
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedByte(value) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DynamicRasterizationStates& value) { Debug& operator<<(Debug& debug, const DynamicRasterizationStates& value) {

2
src/MagnumPlugins/WavAudioImporter/WavHeader.cpp

@ -50,7 +50,7 @@ Debug& operator<<(Debug& debug, const WavAudioFormat value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << ")"; return debug << "(" << Debug::nospace << Debug::hex << UnsignedShort(value) << Debug::nospace << ")";
} }
}}} }}}

Loading…
Cancel
Save