mosra / magnum

Compare ec19c25 ... +19 ... dd3ce93

Coverage Reach
Magnum/GL/Implementation/TextureState.cpp Magnum/GL/Implementation/FramebufferState.cpp Magnum/GL/Implementation/compressedPixelFormatMapping.hpp Magnum/GL/Implementation/MeshState.cpp Magnum/GL/Implementation/pixelFormatMapping.hpp Magnum/GL/Implementation/RendererState.cpp Magnum/GL/Implementation/ShaderProgramState.cpp Magnum/GL/Implementation/BufferState.cpp Magnum/GL/Implementation/driverSpecific.cpp Magnum/GL/Implementation/State.cpp Magnum/GL/Implementation/DebugState.cpp Magnum/GL/Implementation/maxTextureSize.cpp Magnum/GL/Implementation/TransformFeedbackState.cpp Magnum/GL/Implementation/QueryState.cpp Magnum/GL/Implementation/ShaderState.cpp Magnum/GL/Implementation/RendererState.h Magnum/GL/Implementation/ContextState.cpp Magnum/GL/Implementation/DebugState.h Magnum/GL/AbstractTexture.cpp Magnum/GL/AbstractShaderProgram.cpp Magnum/GL/Mesh.cpp Magnum/GL/CubeMapTexture.cpp Magnum/GL/Shader.cpp Magnum/GL/AbstractFramebuffer.cpp Magnum/GL/Context.cpp Magnum/GL/Buffer.cpp Magnum/GL/Renderer.cpp Magnum/GL/DebugOutput.cpp Magnum/GL/Texture.h Magnum/GL/Framebuffer.cpp Magnum/GL/Attribute.cpp Magnum/GL/TextureArray.h Magnum/GL/CubeMapTextureArray.h Magnum/GL/TransformFeedback.cpp Magnum/GL/CubeMapTexture.h Magnum/GL/Mesh.h Magnum/GL/PixelFormat.cpp Magnum/GL/BufferImage.cpp Magnum/GL/Extensions.h Magnum/GL/AbstractQuery.cpp Magnum/GL/Renderbuffer.cpp Magnum/GL/MeshView.cpp Magnum/GL/AbstractObject.cpp Magnum/GL/BufferTexture.cpp Magnum/GL/DefaultFramebuffer.cpp Magnum/GL/Sampler.cpp Magnum/GL/AbstractTexture.h Magnum/GL/BufferImage.h Magnum/GL/AbstractShaderProgram.h Magnum/GL/Context.h Magnum/GL/Buffer.h Magnum/GL/Framebuffer.h Magnum/GL/RectangleTexture.cpp Magnum/GL/CubeMapTextureArray.cpp Magnum/GL/Texture.cpp Magnum/GL/TextureArray.cpp Magnum/GL/Attribute.h Magnum/GL/RectangleTexture.h Magnum/GL/MultisampleTexture.h Magnum/GL/Renderbuffer.h Magnum/GL/MeshView.h Magnum/GL/AbstractQuery.h Magnum/GL/TransformFeedback.h Magnum/GL/DebugOutput.h Magnum/GL/AbstractFramebuffer.h Magnum/GL/Shader.h Magnum/GL/OpenGLTester.cpp Magnum/GL/PrimitiveQuery.cpp Magnum/GL/MultisampleTexture.cpp Magnum/GL/SampleQuery.h Magnum/GL/Version.h Magnum/GL/TimeQuery.h Magnum/GL/OpenGLTester.h Magnum/GL/BufferTexture.h Magnum/GL/PrimitiveQuery.h Magnum/GL/GL.h Magnum/GL/Sampler.h Magnum/GL/PipelineStatisticsQuery.h Magnum/GL/TextureFormat.cpp Magnum/GL/Version.cpp Magnum/GL/Renderer.h Magnum/GL/AbstractObject.h Magnum/Vk/Implementation/deviceFeatureMapping.hpp Magnum/Vk/Implementation/vertexFormatMapping.hpp Magnum/Vk/Implementation/compressedPixelFormatMapping.hpp Magnum/Vk/Implementation/DeviceState.cpp Magnum/Vk/Implementation/pixelFormatMapping.hpp Magnum/Vk/Implementation/spirvPatching.h Magnum/Vk/Implementation/structureHelpers.h Magnum/Vk/Implementation/DriverWorkaround.cpp Magnum/Vk/Implementation/dynamicRasterizationStateMapping.hpp Magnum/Vk/Implementation/Arguments.cpp Magnum/Vk/Implementation/DeviceFeatures.h Magnum/Vk/Implementation/InstanceState.cpp Magnum/Vk/RenderPass.cpp Magnum/Vk/Device.cpp Magnum/Vk/Image.cpp Magnum/Vk/DeviceProperties.cpp Magnum/Vk/Pipeline.cpp Magnum/Vk/Instance.cpp Magnum/Vk/Buffer.cpp Magnum/Vk/MeshLayout.cpp Magnum/Vk/DescriptorSetLayout.cpp Magnum/Vk/DescriptorPool.cpp Magnum/Vk/Mesh.cpp Magnum/Vk/Sampler.cpp Magnum/Vk/Integration.h Magnum/Vk/ExtensionProperties.cpp Magnum/Vk/Framebuffer.cpp Magnum/Vk/Memory.cpp Magnum/Vk/Shader.cpp Magnum/Vk/Queue.cpp Magnum/Vk/ShaderSet.cpp Magnum/Vk/PipelineLayout.cpp Magnum/Vk/Extensions.h Magnum/Vk/CommandPool.cpp Magnum/Vk/ImageView.cpp Magnum/Vk/ImageCreateInfo.h Magnum/Vk/Fence.cpp Magnum/Vk/CommandBuffer.cpp Magnum/Vk/Image.h Magnum/Vk/LayerProperties.cpp Magnum/Vk/ImageViewCreateInfo.h Magnum/Vk/Enums.cpp Magnum/Vk/PixelFormat.cpp Magnum/Vk/DescriptorSet.cpp Magnum/Vk/Mesh.h Magnum/Vk/Version.cpp Magnum/Vk/RenderPassCreateInfo.h Magnum/Vk/Version.h Magnum/Vk/VertexFormat.cpp Magnum/Vk/ExtensionProperties.h Magnum/Vk/MeshLayout.h Magnum/Vk/InstanceCreateInfo.h Magnum/Vk/Device.h Magnum/Vk/Extensions.cpp Magnum/Vk/Pipeline.h Magnum/Vk/DeviceCreateInfo.h Magnum/Vk/Instance.h Magnum/Vk/DescriptorSetLayoutCreateInfo.h Magnum/Vk/MemoryAllocateInfo.h Magnum/Vk/RenderPass.h Magnum/Vk/Memory.h Magnum/Vk/ShaderCreateInfo.h Magnum/Vk/Buffer.h Magnum/Vk/VulkanTester.cpp Magnum/Vk/CommandBuffer.h Magnum/Vk/DeviceProperties.h Magnum/Vk/DeviceFeatures.cpp Magnum/Vk/Handle.cpp Magnum/Vk/RasterizationPipelineCreateInfo.h Magnum/Vk/ShaderSet.h Magnum/Vk/Queue.h Magnum/Vk/DescriptorPoolCreateInfo.h Magnum/Vk/Shader.h Magnum/Vk/DescriptorType.cpp Magnum/Vk/FramebufferCreateInfo.h Magnum/Vk/Result.cpp Magnum/Vk/VulkanTester.h Magnum/Vk/Framebuffer.h Magnum/Vk/ComputePipelineCreateInfo.h Magnum/Vk/Fence.h Magnum/Vk/CommandPool.h Magnum/Vk/PipelineLayout.h Magnum/Vk/PipelineLayoutCreateInfo.h Magnum/Vk/DescriptorSetLayout.h Magnum/Vk/ImageView.h Magnum/Vk/CommandPoolCreateInfo.h Magnum/Vk/BufferCreateInfo.h Magnum/Vk/DescriptorPool.h Magnum/Vk/Sampler.h Magnum/Vk/DescriptorSet.h Magnum/Vk/SamplerCreateInfo.h Magnum/Vk/FenceCreateInfo.h Magnum/Vk/DeviceFeatures.h Magnum/Vk/Handle.h Magnum/Vk/LayerProperties.h Magnum/Trade/AbstractImporter.cpp Magnum/Trade/MeshData.cpp Magnum/Trade/MaterialData.cpp Magnum/Trade/PbrMetallicRoughnessMaterialData.cpp Magnum/Trade/AbstractImageConverter.cpp Magnum/Trade/PbrSpecularGlossinessMaterialData.cpp Magnum/Trade/PhongMaterialData.cpp Magnum/Trade/MeshData.h Magnum/Trade/MaterialData.h Magnum/Trade/ImageData.cpp Magnum/Trade/PbrClearCoatMaterialData.cpp Magnum/Trade/AbstractSceneConverter.cpp Magnum/Trade/Implementation/materialAttributeProperties.hpp Magnum/Trade/Implementation/arrayUtilities.h Magnum/Trade/Implementation/materialLayerProperties.hpp Magnum/Trade/MeshData3D.cpp Magnum/Trade/AnimationData.cpp Magnum/Trade/MaterialLayerData.h Magnum/Trade/MeshData2D.cpp Magnum/Trade/FlatMaterialData.cpp Magnum/Trade/ObjectData2D.cpp Magnum/Trade/ObjectData3D.cpp Magnum/Trade/LightData.cpp Magnum/Trade/ImageData.h Magnum/Trade/AbstractImporter.h Magnum/Trade/AnimationData.h Magnum/Trade/CameraData.cpp Magnum/Trade/ObjectData2D.h Magnum/Trade/ObjectData3D.h Magnum/Trade/MeshData3D.h Magnum/Trade/MeshData2D.h Magnum/Trade/TextureData.h Magnum/Trade/SkinData.cpp Magnum/Trade/LightData.h Magnum/Trade/Data.cpp Magnum/Trade/MeshObjectData2D.h Magnum/Trade/MeshObjectData3D.h Magnum/Trade/CameraData.h Magnum/Trade/SkinData.h Magnum/Trade/SceneData.cpp Magnum/Trade/AbstractImageConverter.h Magnum/Trade/SceneData.h Magnum/Trade/AbstractSceneConverter.h Magnum/Trade/TextureData.cpp Magnum/Trade/ArrayAllocator.cpp Magnum/Trade/PhongMaterialData.h Magnum/Trade/PbrSpecularGlossinessMaterialData.h Magnum/Trade/MeshObjectData3D.cpp Magnum/Trade/PbrClearCoatMaterialData.h Magnum/Trade/Trade.h Magnum/Trade/MeshObjectData2D.cpp Magnum/Trade/FlatMaterialData.h Magnum/Trade/PbrMetallicRoughnessMaterialData.h Magnum/Trade/Data.h Magnum/Math/Vector.h Magnum/Math/Color.h Magnum/Math/Algorithms/Svd.h Magnum/Math/Algorithms/GaussJordan.h Magnum/Math/Algorithms/GramSchmidt.h Magnum/Math/Algorithms/KahanSum.h Magnum/Math/Algorithms/Qr.h Magnum/Math/PackingBatch.cpp Magnum/Math/Functions.h Magnum/Math/Matrix4.h Magnum/Math/Quaternion.h Magnum/Math/Range.h Magnum/Math/RectangularMatrix.h Magnum/Math/Color.cpp Magnum/Math/Complex.h Magnum/Math/Intersection.h Magnum/Math/DualQuaternion.h Magnum/Math/ConfigurationValue.h Magnum/Math/FunctionsBatch.h Magnum/Math/BoolVector.h Magnum/Math/Matrix.h Magnum/Math/Matrix3.h Magnum/Math/CubicHermite.h Magnum/Math/Dual.h Magnum/Math/Distance.h Magnum/Math/DualComplex.h Magnum/Math/Bezier.h Magnum/Math/Frustum.h Magnum/Math/Angle.cpp Magnum/Math/Unit.h Magnum/Math/TypeTraits.h Magnum/Math/Vector4.h Magnum/Math/Vector3.h Magnum/Math/Packing.h Magnum/Math/Packing.cpp Magnum/Math/Vector2.h Magnum/Math/Functions.cpp Magnum/Math/Half.h Magnum/Math/Angle.h Magnum/Math/Constants.h Magnum/Math/Half.cpp Magnum/Math/StrictWeakOrdering.h Magnum/Math/Swizzle.h Magnum/Math/Tags.h Magnum/MeshTools/RemoveDuplicates.cpp Magnum/MeshTools/Compile.cpp Magnum/MeshTools/Interleave.cpp Magnum/MeshTools/GenerateIndices.cpp Magnum/MeshTools/GenerateNormals.cpp Magnum/MeshTools/Combine.cpp Magnum/MeshTools/CompressIndices.cpp Magnum/MeshTools/Concatenate.cpp Magnum/MeshTools/Tipsify.cpp Magnum/MeshTools/CombineIndexedArrays.cpp Magnum/MeshTools/Reference.cpp Magnum/MeshTools/Duplicate.cpp Magnum/MeshTools/Interleave.h Magnum/MeshTools/Subdivide.h Magnum/MeshTools/FlipNormals.cpp Magnum/MeshTools/Transform.h Magnum/MeshTools/CombineIndexedArrays.h Magnum/MeshTools/Concatenate.h Magnum/MeshTools/FlipNormals.h Magnum/MeshTools/Implementation/Tipsify.h Magnum/MeshTools/FullScreenTriangle.cpp Magnum/MeshTools/Duplicate.h Magnum/MeshTools/RemoveDuplicates.h Magnum/MeshTools/Compile.h Magnum/SceneGraph/Object.hpp Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h Magnum/SceneGraph/RigidMatrixTransformation3D.h Magnum/SceneGraph/DualQuaternionTransformation.h Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h Magnum/SceneGraph/MatrixTransformation3D.h Magnum/SceneGraph/Animable.hpp Magnum/SceneGraph/DualComplexTransformation.h Magnum/SceneGraph/Camera.hpp Magnum/SceneGraph/RigidMatrixTransformation2D.h Magnum/SceneGraph/MatrixTransformation2D.h Magnum/SceneGraph/Object.h Magnum/SceneGraph/TranslationTransformation.h Magnum/SceneGraph/AbstractTranslationRotation3D.h Magnum/SceneGraph/FeatureGroup.h Magnum/SceneGraph/AbstractObject.h Magnum/SceneGraph/AbstractFeature.h Magnum/SceneGraph/Animable.h Magnum/SceneGraph/Camera.h Magnum/SceneGraph/AbstractGroupedFeature.h Magnum/SceneGraph/FeatureGroup.hpp Magnum/SceneGraph/AbstractFeature.hpp Magnum/SceneGraph/Drawable.h Magnum/SceneGraph/RigidMatrixTransformation2D.hpp Magnum/SceneGraph/MatrixTransformation3D.hpp Magnum/SceneGraph/RigidMatrixTransformation3D.hpp Magnum/SceneGraph/Animable.cpp Magnum/SceneGraph/MatrixTransformation2D.hpp Magnum/SceneGraph/SceneGraph.h Magnum/SceneGraph/Scene.h Magnum/SceneGraph/AbstractTransformation.h Magnum/SceneGraph/AnimableGroup.h Magnum/SceneGraph/Drawable.hpp Magnum/SceneGraph/AbstractTranslationRotation2D.h Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h Magnum/SceneGraph/AbstractTranslation.h Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h Magnum/DebugTools/FrameProfiler.cpp Magnum/DebugTools/CompareImage.cpp Magnum/DebugTools/TextureImage.cpp Magnum/DebugTools/Screenshot.cpp Magnum/DebugTools/Profiler.cpp Magnum/DebugTools/CompareImage.h Magnum/DebugTools/ForceRenderer.cpp Magnum/DebugTools/ObjectRenderer.cpp Magnum/DebugTools/Implementation/ForceRendererTransformation.h Magnum/DebugTools/ColorMap.cpp Magnum/DebugTools/FrameProfiler.h Magnum/DebugTools/BufferData.h Magnum/DebugTools/ForceRenderer.h Magnum/DebugTools/ObjectRenderer.h Magnum/DebugTools/ResourceManager.cpp Magnum/DebugTools/BufferData.cpp Magnum/DebugTools/ResourceManager.h Magnum/Shaders/MeshVisualizerGL.cpp Magnum/Shaders/PhongGL.cpp Magnum/Shaders/FlatGL.cpp Magnum/Shaders/DistanceFieldVectorGL.cpp Magnum/Shaders/VectorGL.cpp Magnum/Shaders/MeshVisualizerGL.h Magnum/Shaders/VertexColorGL.cpp Magnum/Shaders/PhongGL.h Magnum/Shaders/DistanceFieldVectorGL.h Magnum/Shaders/VectorGL.h Magnum/Shaders/Implementation/CreateCompatibilityShader.h Magnum/Shaders/FlatGL.h Magnum/Shaders/AbstractVectorGL.h Magnum/Shaders/VertexColorGL.h Magnum/Shaders/Shaders.h Magnum/Shaders/AbstractVectorGL.cpp Magnum/Primitives/Implementation/Spheroid.cpp Magnum/Primitives/Implementation/WireframeSpheroid.cpp Magnum/Primitives/Implementation/Spheroid.h Magnum/Primitives/Implementation/WireframeSpheroid.h Magnum/Primitives/Circle.cpp Magnum/Primitives/Grid.cpp Magnum/Primitives/Capsule.cpp Magnum/Primitives/Plane.cpp Magnum/Primitives/Gradient.cpp Magnum/Primitives/Icosphere.cpp Magnum/Primitives/Cylinder.cpp Magnum/Primitives/Cone.cpp Magnum/Primitives/UVSphere.cpp Magnum/Primitives/Line.cpp Magnum/Primitives/Square.cpp Magnum/Primitives/Cube.cpp Magnum/Primitives/Axis.cpp Magnum/Primitives/Crosshair.cpp Magnum/Primitives/Cylinder.h Magnum/Primitives/Grid.h Magnum/Primitives/Cone.h Magnum/Primitives/UVSphere.h Magnum/Audio/Context.cpp Magnum/Audio/Source.h Magnum/Audio/Source.cpp Magnum/Audio/AbstractImporter.cpp Magnum/Audio/Renderer.h Magnum/Audio/Buffer.h Magnum/Audio/Listener.cpp Magnum/Audio/PlayableGroup.cpp Magnum/Audio/Context.h Magnum/Audio/Playable.cpp Magnum/Audio/Listener.h Magnum/Audio/Renderer.cpp Magnum/Audio/Buffer.cpp Magnum/Audio/Playable.h Magnum/Audio/BufferFormat.cpp Magnum/Audio/PlayableGroup.h Magnum/Audio/AbstractImporter.h Magnum/Audio/Extensions.h Magnum/Text/Renderer.cpp Magnum/Text/AbstractFont.cpp Magnum/Text/AbstractFontConverter.cpp Magnum/Text/DistanceFieldGlyphCache.cpp Magnum/Text/AbstractGlyphCache.cpp Magnum/Text/GlyphCache.cpp Magnum/Text/AbstractFont.h Magnum/Text/AbstractGlyphCache.h Magnum/Text/Renderer.h Magnum/Text/AbstractFontConverter.h Magnum/Text/GlyphCache.h Magnum/Text/DistanceFieldGlyphCache.h Magnum/Animation/Player.hpp Magnum/Animation/Easing.h Magnum/Animation/Track.h Magnum/Animation/Player.h Magnum/Animation/Interpolation.h Magnum/Animation/Interpolation.cpp Magnum/Animation/Player.cpp Magnum/Platform/gl-info.cpp Magnum/Platform/WindowlessEglApplication.cpp Magnum/Platform/Implementation/Egl.cpp Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp Magnum/Platform/Implementation/OpenGLFunctionLoader.h Magnum/Platform/WindowlessEglApplication.h Magnum/Platform/GLContext.h Magnum/ShaderTools/AbstractConverter.cpp Magnum/ShaderTools/Implementation/spirv.h Magnum/ShaderTools/AbstractConverter.h Magnum/ShaderTools/Stage.cpp Magnum/Implementation/vertexFormatMapping.hpp Magnum/Implementation/compressedPixelFormatMapping.hpp Magnum/Implementation/pixelFormatMapping.hpp Magnum/Implementation/ImageProperties.h Magnum/Implementation/meshPrimitiveMapping.hpp Magnum/Implementation/meshIndexTypeMapping.hpp Magnum/VertexFormat.cpp Magnum/ResourceManager.h Magnum/TextureTools/DistanceField.cpp Magnum/TextureTools/Atlas.cpp Magnum/TextureTools/DistanceField.h Magnum/Resource.h Magnum/PixelStorage.h Magnum/PixelFormat.cpp Magnum/Image.cpp Magnum/ImageView.h Magnum/Array.h Magnum/Image.h Magnum/Mesh.cpp Magnum/PixelStorage.cpp Magnum/AbstractResourceLoader.h Magnum/ImageView.cpp Magnum/Timeline.cpp Magnum/PixelFormat.h Magnum/Sampler.cpp Magnum/VertexFormat.h Magnum/Mesh.h Magnum/Resource.cpp Magnum/FileCallback.cpp Magnum/Magnum.h MagnumPlugins/AnyShaderConverter/AnyConverter.cpp MagnumPlugins/AnyShaderConverter/importStaticPlugin.cpp MagnumPlugins/AnyShaderConverter/AnyConverter.h MagnumPlugins/ObjImporter/ObjImporter.cpp MagnumPlugins/ObjImporter/importStaticPlugin.cpp MagnumPlugins/ObjImporter/ObjImporter.h MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp MagnumPlugins/AnySceneImporter/importStaticPlugin.cpp MagnumPlugins/AnySceneImporter/AnySceneImporter.h MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp MagnumPlugins/AnyImageImporter/importStaticPlugin.cpp MagnumPlugins/AnyImageImporter/AnyImageImporter.h MagnumPlugins/WavAudioImporter/WavImporter.cpp MagnumPlugins/WavAudioImporter/WavHeader.cpp MagnumPlugins/WavAudioImporter/importStaticPlugin.cpp MagnumPlugins/WavAudioImporter/WavImporter.h MagnumPlugins/TgaImporter/TgaImporter.cpp MagnumPlugins/TgaImporter/importStaticPlugin.cpp MagnumPlugins/TgaImporter/TgaImporter.h MagnumPlugins/MagnumFont/MagnumFont.cpp MagnumPlugins/MagnumFont/importStaticPlugin.cpp MagnumPlugins/MagnumFontConverter/MagnumFontConverter.cpp MagnumPlugins/MagnumFontConverter/importStaticPlugin.cpp MagnumPlugins/MagnumFontConverter/MagnumFontConverter.h MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp MagnumPlugins/AnyImageConverter/importStaticPlugin.cpp MagnumPlugins/AnyImageConverter/AnyImageConverter.h MagnumPlugins/TgaImageConverter/TgaImageConverter.cpp MagnumPlugins/TgaImageConverter/importStaticPlugin.cpp MagnumPlugins/TgaImageConverter/TgaImageConverter.h MagnumPlugins/AnyAudioImporter/AnyImporter.cpp MagnumPlugins/AnyAudioImporter/importStaticPlugin.cpp MagnumPlugins/AnyAudioImporter/AnyImporter.h MagnumPlugins/AnySceneConverter/AnySceneConverter.cpp MagnumPlugins/AnySceneConverter/importStaticPlugin.cpp MagnumPlugins/AnySceneConverter/AnySceneConverter.h

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 42 of 126 files from the diff.
Other files ignored by Codecov
src/Magnum/Tags.h has changed.
doc/shaders.dox has changed.
doc/changelog.dox has changed.

@@ -26,7 +26,7 @@
Loading
26 26
*/
27 27
28 28
/** @file
29 -
 * @brief Class @ref Magnum::DebugTools::FrameProfiler, @ref Magnum::DebugTools::GLFrameProfiler
29 +
 * @brief Class @ref Magnum::DebugTools::FrameProfiler, @ref Magnum::DebugTools::FrameProfilerGL
30 30
 * @m_since{2020,06}
31 31
 */
32 32
@@ -46,7 +46,7 @@
Loading
46 46
A generic implementation of a frame profiler supporting a moving average over
47 47
a set of frames as well as delayed measurements to avoid stalls when querying
48 48
the results. This class alone doesn't provide any pre-defined measurements, see
49 -
for example @ref GLFrameProfiler that provides common measurements like CPU and
49 +
for example @ref FrameProfilerGL that provides common measurements like CPU and
50 50
GPU time.
51 51
52 52
@experimental
@@ -78,13 +78,13 @@
Loading
78 78
@snippet MagnumDebugTools.cpp FrameProfiler-usage-console
79 79
80 80
And here's a sample output on the terminal --- using a fully configured
81 -
@link GLFrameProfiler @endlink:
81 +
@link FrameProfilerGL @endlink:
82 82
83 83
@include debugtools-frameprofiler.ansi
84 84
85 85
@section DebugTools-FrameProfiler-setup Setting up measurements
86 86
87 -
Unless you're using this class through @ref GLFrameProfiler, measurements
87 +
Unless you're using this class through @ref FrameProfilerGL, measurements
88 88
have to be set up by passing @ref Measurement instances to the @ref setup()
89 89
function or to the constructor, together with specifying count of frames for
90 90
the moving average. A CPU duration measurements using the @ref std::chrono APIs
@@ -499,20 +499,20 @@
Loading
499 499
desired subset of measured values and then continue the same way as described
500 500
in the @ref DebugTools-FrameProfiler-usage "FrameProfiler usage documentation":
501 501
502 -
@snippet MagnumDebugTools-gl.cpp GLFrameProfiler-usage
502 +
@snippet MagnumDebugTools-gl.cpp FrameProfilerGL-usage
503 503
504 504
If none if @ref Value::GpuDuration, @ref Value::VertexFetchRatio and
505 505
@ref Value::PrimitiveClipRatio is not enabled, the class can operate without an
506 506
active OpenGL context.
507 507
508 508
@experimental
509 509
*/
510 -
class MAGNUM_DEBUGTOOLS_EXPORT GLFrameProfiler: public FrameProfiler {
510 +
class MAGNUM_DEBUGTOOLS_EXPORT FrameProfilerGL: public FrameProfiler {
511 511
    public:
512 512
        /**
513 513
         * @brief Measured value
514 514
         *
515 -
         * @see @ref Values, @ref GLFrameProfiler(Values, UnsignedInt),
515 +
         * @see @ref Values, @ref FrameProfilerGL(Values, UnsignedInt),
516 516
         *      @ref setup()
517 517
         */
518 518
        enum class Value: UnsignedShort {
@@ -572,7 +572,7 @@
Loading
572 572
        /**
573 573
         * @brief Measured values
574 574
         *
575 -
         * @see @ref GLFrameProfiler(Values, UnsignedInt), @ref setup()
575 +
         * @see @ref FrameProfilerGL(Values, UnsignedInt), @ref setup()
576 576
         */
577 577
        typedef Containers::EnumSet<Value> Values;
578 578
@@ -581,29 +581,29 @@
Loading
581 581
         *
582 582
         * Call @ref setup() to populate the profiler with measurements.
583 583
         */
584 -
        explicit GLFrameProfiler();
584 +
        explicit FrameProfilerGL();
585 585
586 586
        /**
587 587
         * @brief Constructor
588 588
         *
589 589
         * Equivalent to default-constructing an instance and calling
590 590
         * @ref setup() afterwards.
591 591
         */
592 -
        explicit GLFrameProfiler(Values values, UnsignedInt maxFrameCount);
592 +
        explicit FrameProfilerGL(Values values, UnsignedInt maxFrameCount);
593 593
594 594
        /** @brief Copying is not allowed */
595 -
        GLFrameProfiler(const GLFrameProfiler&) = delete;
595 +
        FrameProfilerGL(const FrameProfilerGL&) = delete;
596 596
597 597
        /** @brief Move constructor */
598 -
        GLFrameProfiler(GLFrameProfiler&&) noexcept;
598 +
        FrameProfilerGL(FrameProfilerGL&&) noexcept;
599 599
600 600
        /** @brief Copying is not allowed */
601 -
        GLFrameProfiler& operator=(const GLFrameProfiler&) = delete;
601 +
        FrameProfilerGL& operator=(const FrameProfilerGL&) = delete;
602 602
603 603
        /** @brief Move assignment */
604 -
        GLFrameProfiler& operator=(GLFrameProfiler&&) noexcept;
604 +
        FrameProfilerGL& operator=(FrameProfilerGL&&) noexcept;
605 605
606 -
        ~GLFrameProfiler();
606 +
        ~FrameProfilerGL();
607 607
608 608
        /**
609 609
         * @brief Setup measured values
@@ -621,7 +621,7 @@
Loading
621 621
         * @brief Measured values
622 622
         *
623 623
         * Corresponds to the @p values parameter passed to
624 -
         * @ref GLFrameProfiler(Values, UnsignedInt) or @ref setup().
624 +
         * @ref FrameProfilerGL(Values, UnsignedInt) or @ref setup().
625 625
         */
626 626
        Values values() const;
627 627
@@ -696,19 +696,26 @@
Loading
696 696
        Containers::Pointer<State> _state;
697 697
};
698 698
699 -
CORRADE_ENUMSET_OPERATORS(GLFrameProfiler::Values)
699 +
CORRADE_ENUMSET_OPERATORS(FrameProfilerGL::Values)
700 700
701 701
/**
702 -
@debugoperatorclassenum{GLFrameProfiler,GLFrameProfiler::Value}
702 +
@debugoperatorclassenum{FrameProfilerGL,FrameProfilerGL::Value}
703 703
@m_since{2020,06}
704 704
*/
705 -
MAGNUM_DEBUGTOOLS_EXPORT Debug& operator<<(Debug& debug, GLFrameProfiler::Value value);
705 +
MAGNUM_DEBUGTOOLS_EXPORT Debug& operator<<(Debug& debug, FrameProfilerGL::Value value);
706 706
707 707
/**
708 -
@debugoperatorclassenum{GLFrameProfiler,GLFrameProfiler::Values}
708 +
@debugoperatorclassenum{FrameProfilerGL,FrameProfilerGL::Values}
709 709
@m_since{2020,06}
710 710
*/
711 -
MAGNUM_DEBUGTOOLS_EXPORT Debug& operator<<(Debug& debug, GLFrameProfiler::Values value);
711 +
MAGNUM_DEBUGTOOLS_EXPORT Debug& operator<<(Debug& debug, FrameProfilerGL::Values value);
712 +
713 +
#ifdef MAGNUM_BUILD_DEPRECATED
714 +
/** @brief @copybrief FrameProfilerGL
715 +
 * @m_deprecated_since_latest Use @ref FrameProfilerGL instead.
716 +
 */
717 +
typedef CORRADE_DEPRECATED("use FrameProfilerGL instead") FrameProfilerGL GLFrameProfiler;
718 +
#endif
712 719
#endif
713 720
714 721
}}
@@ -717,32 +724,32 @@
Loading
717 724
718 725
#ifdef MAGNUM_TARGET_GL
719 726
/**
720 -
@configurationvalue{Magnum::DebugTools::GLFrameProfiler::Value}
727 +
@configurationvalue{Magnum::DebugTools::FrameProfilerGL::Value}
721 728
@m_since{2020,06}
722 729
*/
723 -
template<> struct MAGNUM_DEBUGTOOLS_EXPORT ConfigurationValue<Magnum::DebugTools::GLFrameProfiler::Value> {
730 +
template<> struct MAGNUM_DEBUGTOOLS_EXPORT ConfigurationValue<Magnum::DebugTools::FrameProfilerGL::Value> {
724 731
    ConfigurationValue() = delete;
725 732
726 733
    /**
727 734
     * @brief Writes enum value as a string
728 735
     *
729 736
     * If the value is invalid, returns an empty string.
730 737
     */
731 -
    static std::string toString(Magnum::DebugTools::GLFrameProfiler::Value value, ConfigurationValueFlags);
738 +
    static std::string toString(Magnum::DebugTools::FrameProfilerGL::Value value, ConfigurationValueFlags);
732 739
733 740
    /**
734 741
     * @brief Reads enum value as a string
735 742
     *
736 743
     * If the string is invalid, returns a zero (invalid) value.
737 744
     */
738 -
    static Magnum::DebugTools::GLFrameProfiler::Value fromString(const std::string& stringValue, ConfigurationValueFlags);
745 +
    static Magnum::DebugTools::FrameProfilerGL::Value fromString(const std::string& stringValue, ConfigurationValueFlags);
739 746
};
740 747
741 748
/**
742 -
@configurationvalue{Magnum::DebugTools::GLFrameProfiler::Values}
749 +
@configurationvalue{Magnum::DebugTools::FrameProfilerGL::Values}
743 750
@m_since{2020,06}
744 751
*/
745 -
template<> struct MAGNUM_DEBUGTOOLS_EXPORT ConfigurationValue<Magnum::DebugTools::GLFrameProfiler::Values> {
752 +
template<> struct MAGNUM_DEBUGTOOLS_EXPORT ConfigurationValue<Magnum::DebugTools::FrameProfilerGL::Values> {
746 753
    ConfigurationValue() = delete;
747 754
748 755
    /**
@@ -751,15 +758,15 @@
Loading
751 758
     * Writes the enum set as a sequence of flag names separated by spaces. If
752 759
     * the value is invalid, returns an empty string.
753 760
     */
754 -
    static std::string toString(Magnum::DebugTools::GLFrameProfiler::Values value, ConfigurationValueFlags);
761 +
    static std::string toString(Magnum::DebugTools::FrameProfilerGL::Values value, ConfigurationValueFlags);
755 762
756 763
    /**
757 764
     * @brief Reads enum set value as a string
758 765
     *
759 766
     * Assumes the string is a sequence of flag names separated by spaces. If
760 767
     * the value is invalid, returns an empty set.
761 768
     */
762 -
    static Magnum::DebugTools::GLFrameProfiler::Values fromString(const std::string& stringValue, ConfigurationValueFlags);
769 +
    static Magnum::DebugTools::FrameProfilerGL::Values fromString(const std::string& stringValue, ConfigurationValueFlags);
763 770
};
764 771
#endif
765 772

@@ -23,7 +23,7 @@
Loading
23 23
    DEALINGS IN THE SOFTWARE.
24 24
*/
25 25
26 -
#include "MeshVisualizer.h"
26 +
#include "MeshVisualizerGL.h"
27 27
28 28
#include <Corrade/Containers/EnumSet.hpp>
29 29
#include <Corrade/Containers/Optional.h>
@@ -52,7 +52,7 @@
Loading
52 52
53 53
namespace Implementation {
54 54
55 -
MeshVisualizerBase::MeshVisualizerBase(FlagsBase flags): _flags{flags} {
55 +
MeshVisualizerGLBase::MeshVisualizerGLBase(FlagsBase flags): _flags{flags} {
56 56
    #ifndef MAGNUM_TARGET_GLES2
57 57
    #ifndef CORRADE_NO_ASSERT
58 58
    Int countMutuallyExclusive = 0;
@@ -61,7 +61,7 @@
Loading
61 61
    if(flags & FlagBase::PrimitiveIdFromVertexId) ++countMutuallyExclusive;
62 62
    #endif
63 63
    CORRADE_ASSERT(countMutuallyExclusive <= 1,
64 -
        "Shaders::MeshVisualizer: Flag::InstancedObjectId, Flag::VertexId and Flag::PrimitiveId are mutually exclusive", );
64 +
        "Shaders::MeshVisualizerGL: Flag::InstancedObjectId, Flag::VertexId and Flag::PrimitiveId are mutually exclusive", );
65 65
    #endif
66 66
67 67
    #ifndef MAGNUM_TARGET_GLES2
@@ -90,22 +90,24 @@
Loading
90 90
91 91
    #ifdef MAGNUM_BUILD_STATIC
92 92
    /* Import resources on static build, if not already */
93 -
    if(!Utility::Resource::hasGroup("MagnumShaders"))
93 +
    if(!Utility::Resource::hasGroup("MagnumShadersGL"))
94 94
        importShaderResources();
95 95
    #endif
96 96
}
97 97
98 -
GL::Version MeshVisualizerBase::setupShaders(GL::Shader& vert, GL::Shader& frag, const Utility::Resource& rs) const {
98 +
GL::Version MeshVisualizerGLBase::setupShaders(GL::Shader& vert, GL::Shader& frag, const Utility::Resource& rs) const {
99 +
    GL::Context& context = GL::Context::current();
100 +
99 101
    #ifndef MAGNUM_TARGET_GLES
100 -
    const GL::Version version = GL::Context::current().supportedVersion({GL::Version::GL320, GL::Version::GL310, GL::Version::GL300, GL::Version::GL210});
102 +
    const GL::Version version = context.supportedVersion({GL::Version::GL320, GL::Version::GL310, GL::Version::GL300, GL::Version::GL210});
101 103
    /* Extended in MeshVisualizer3D for TBN visualization */
102 104
    CORRADE_INTERNAL_ASSERT(!(_flags & FlagBase::Wireframe) || _flags & FlagBase::NoGeometryShader || version >= GL::Version::GL320);
103 105
    #elif !defined(MAGNUM_TARGET_WEBGL)
104 -
    const GL::Version version = GL::Context::current().supportedVersion({GL::Version::GLES310, GL::Version::GLES300, GL::Version::GLES200});
106 +
    const GL::Version version = context.supportedVersion({GL::Version::GLES310, GL::Version::GLES300, GL::Version::GLES200});
105 107
    /* Extended in MeshVisualizer3D for TBN visualization */
106 108
    CORRADE_INTERNAL_ASSERT(!(_flags & FlagBase::Wireframe) || _flags & FlagBase::NoGeometryShader || version >= GL::Version::GLES310);
107 109
    #else
108 -
    const GL::Version version = GL::Context::current().supportedVersion({GL::Version::GLES300, GL::Version::GLES200});
110 +
    const GL::Version version = context.supportedVersion({GL::Version::GLES300, GL::Version::GLES200});
109 111
    #endif
110 112
111 113
    vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
@@ -120,7 +122,7 @@
Loading
120 122
        #ifdef MAGNUM_TARGET_WEBGL
121 123
        .addSource("#define SUBSCRIPTING_WORKAROUND\n")
122 124
        #elif defined(MAGNUM_TARGET_GLES2)
123 -
        .addSource(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::Angle ?
125 +
        .addSource(context.detectedDriver() & GL::Context::DetectedDriver::Angle ?
124 126
            "#define SUBSCRIPTING_WORKAROUND\n" : "")
125 127
        #endif
126 128
        ;
@@ -138,60 +140,64 @@
Loading
138 140
    return version;
139 141
}
140 142
141 -
MeshVisualizerBase& MeshVisualizerBase::setColor(const Color4& color) {
143 +
MeshVisualizerGLBase& MeshVisualizerGLBase::setColor(const Color4& color) {
142 144
    #ifndef MAGNUM_TARGET_GLES2
143 145
    CORRADE_ASSERT(_flags & (FlagBase::Wireframe|FlagBase::InstancedObjectId|FlagBase::VertexId|FlagBase::PrimitiveId),
144 -
        "Shaders::MeshVisualizer::setColor(): the shader was not created with wireframe or object/vertex/primitive ID enabled", *this);
146 +
        "Shaders::MeshVisualizerGL::setColor(): the shader was not created with wireframe or object/vertex/primitive ID enabled", *this);
145 147
    #else
146 148
    CORRADE_ASSERT(_flags & FlagBase::Wireframe,
147 -
        "Shaders::MeshVisualizer::setColor(): the shader was not created with wireframe enabled", *this);
149 +
        "Shaders::MeshVisualizerGL::setColor(): the shader was not created with wireframe enabled", *this);
148 150
    #endif
149 151
    setUniform(_colorUniform, color);
150 152
    return *this;
151 153
}
152 154
153 -
MeshVisualizerBase& MeshVisualizerBase::setWireframeColor(const Color4& color) {
155 +
MeshVisualizerGLBase& MeshVisualizerGLBase::setWireframeColor(const Color4& color) {
154 156
    CORRADE_ASSERT(_flags & FlagBase::Wireframe,
155 -
        "Shaders::MeshVisualizer::setWireframeColor(): the shader was not created with wireframe enabled", *this);
157 +
        "Shaders::MeshVisualizerGL::setWireframeColor(): the shader was not created with wireframe enabled", *this);
156 158
    setUniform(_wireframeColorUniform, color);
157 159
    return *this;
158 160
}
159 161
160 -
MeshVisualizerBase& MeshVisualizerBase::setWireframeWidth(const Float width) {
162 +
MeshVisualizerGLBase& MeshVisualizerGLBase::setWireframeWidth(const Float width) {
161 163
    CORRADE_ASSERT(_flags & FlagBase::Wireframe,
162 -
        "Shaders::MeshVisualizer::setWireframeWidth(): the shader was not created with wireframe enabled", *this);
164 +
        "Shaders::MeshVisualizerGL::setWireframeWidth(): the shader was not created with wireframe enabled", *this);
163 165
    setUniform(_wireframeWidthUniform, width);
164 166
    return *this;
165 167
}
166 168
167 169
#ifndef MAGNUM_TARGET_GLES2
168 -
MeshVisualizerBase& MeshVisualizerBase::setColorMapTransformation(const Float offset, const Float scale) {
170 +
MeshVisualizerGLBase& MeshVisualizerGLBase::setColorMapTransformation(const Float offset, const Float scale) {
169 171
    CORRADE_ASSERT(_flags & (FlagBase::InstancedObjectId|FlagBase::VertexId|FlagBase::PrimitiveId),
170 -
        "Shaders::MeshVisualizer::setColorMapTransformation(): the shader was not created with object/vertex/primitive ID enabled", *this);
172 +
        "Shaders::MeshVisualizerGL::setColorMapTransformation(): the shader was not created with object/vertex/primitive ID enabled", *this);
171 173
    setUniform(_colorMapOffsetScaleUniform, Vector2{offset, scale});
172 174
    return *this;
173 175
}
174 176
175 -
MeshVisualizerBase& MeshVisualizerBase::bindColorMapTexture(GL::Texture2D& texture) {
177 +
MeshVisualizerGLBase& MeshVisualizerGLBase::bindColorMapTexture(GL::Texture2D& texture) {
176 178
    CORRADE_ASSERT(_flags & (FlagBase::InstancedObjectId|FlagBase::VertexId|FlagBase::PrimitiveId),
177 -
        "Shaders::MeshVisualizer::bindColorMapTexture(): the shader was not created with object/vertex/primitive ID enabled", *this);
179 +
        "Shaders::MeshVisualizerGL::bindColorMapTexture(): the shader was not created with object/vertex/primitive ID enabled", *this);
178 180
    texture.bind(ColorMapTextureUnit);
179 181
    return *this;
180 182
}
181 183
#endif
182 184
183 185
}
184 186
185 -
MeshVisualizer2D::MeshVisualizer2D(const Flags flags): Implementation::MeshVisualizerBase{Implementation::MeshVisualizerBase::FlagBase(UnsignedShort(flags))} {
187 +
MeshVisualizerGL2D::MeshVisualizerGL2D(const Flags flags): Implementation::MeshVisualizerGLBase{Implementation::MeshVisualizerGLBase::FlagBase(UnsignedShort(flags))} {
186 188
    #ifndef MAGNUM_TARGET_GLES2
187 189
    CORRADE_ASSERT(flags & ((Flag::Wireframe|Flag::InstancedObjectId|Flag::VertexId|Flag::PrimitiveIdFromVertexId) & ~Flag::NoGeometryShader),
188 -
        "Shaders::MeshVisualizer2D: at least one visualization feature has to be enabled", );
190 +
        "Shaders::MeshVisualizerGL2D: at least one visualization feature has to be enabled", );
189 191
    #else
190 192
    CORRADE_ASSERT(flags & (Flag::Wireframe & ~Flag::NoGeometryShader),
191 -
        "Shaders::MeshVisualizer2D: at least Flag::Wireframe has to be enabled", );
193 +
        "Shaders::MeshVisualizerGL2D: at least Flag::Wireframe has to be enabled", );
194 +
    #endif
195 +
196 +
    #ifndef MAGNUM_TARGET_GLES
197 +
    const GL::Context& context = GL::Context::current();
192 198
    #endif
193 199
194 -
    Utility::Resource rs{"MagnumShaders"};
200 +
    Utility::Resource rs{"MagnumShadersGL"};
195 201
    GL::Shader vert{NoCreate};
196 202
    GL::Shader frag{NoCreate};
197 203
    const GL::Version version = setupShaders(vert, frag, rs);
@@ -245,7 +251,7 @@
Loading
245 251
    /* ES3 has this done in the shader directly */
246 252
    #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
247 253
    #ifndef MAGNUM_TARGET_GLES
248 -
    if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::explicit_attrib_location>(version))
254 +
    if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_attrib_location>(version))
249 255
    #endif
250 256
    {
251 257
        bindAttributeLocation(Position::Location, "position");
@@ -255,7 +261,7 @@
Loading
255 261
        #endif
256 262
        #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
257 263
        #ifndef MAGNUM_TARGET_GLES
258 -
        if(!GL::Context::current().isVersionSupported(GL::Version::GL310))
264 +
        if(!context.isVersionSupported(GL::Version::GL310))
259 265
        #endif
260 266
        {
261 267
            bindAttributeLocation(VertexIndex::Location, "vertexIndex");
@@ -267,7 +273,7 @@
Loading
267 273
    CORRADE_INTERNAL_ASSERT_OUTPUT(link());
268 274
269 275
    #ifndef MAGNUM_TARGET_GLES
270 -
    if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(version))
276 +
    if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(version))
271 277
    #endif
272 278
    {
273 279
        _transformationProjectionMatrixUniform = uniformLocation("transformationProjectionMatrix");
@@ -314,45 +320,49 @@
Loading
314 320
    #endif
315 321
}
316 322
317 -
MeshVisualizer2D& MeshVisualizer2D::setViewportSize(const Vector2& size) {
323 +
MeshVisualizerGL2D& MeshVisualizerGL2D::setViewportSize(const Vector2& size) {
318 324
    /* Not asserting here, since the relation to wireframe is a bit vague.
319 325
       Also it's an ugly hack that should be removed, ideally. */
320 326
    if(flags() & Flag::Wireframe && !(flags() & Flag::NoGeometryShader))
321 327
        setUniform(_viewportSizeUniform, size);
322 328
    return *this;
323 329
}
324 330
325 -
MeshVisualizer2D& MeshVisualizer2D::setTransformationProjectionMatrix(const Matrix3& matrix) {
331 +
MeshVisualizerGL2D& MeshVisualizerGL2D::setTransformationProjectionMatrix(const Matrix3& matrix) {
326 332
    setUniform(_transformationProjectionMatrixUniform, matrix);
327 333
    return *this;
328 334
}
329 335
330 -
MeshVisualizer2D& MeshVisualizer2D::setSmoothness(const Float smoothness) {
336 +
MeshVisualizerGL2D& MeshVisualizerGL2D::setSmoothness(const Float smoothness) {
331 337
    /* This is a bit vaguely related but less vague than setViewportSize() so
332 338
       asserting in this case. */
333 339
    CORRADE_ASSERT(flags() & Flag::Wireframe,
334 -
        "Shaders::MeshVisualizer2D::setSmoothness(): the shader was not created with wireframe enabled", *this);
340 +
        "Shaders::MeshVisualizerGL2D::setSmoothness(): the shader was not created with wireframe enabled", *this);
335 341
    setUniform(_smoothnessUniform, smoothness);
336 342
    return *this;
337 343
}
338 344
339 -
MeshVisualizer3D::MeshVisualizer3D(const Flags flags): Implementation::MeshVisualizerBase{Implementation::MeshVisualizerBase::FlagBase(UnsignedShort(flags))} {
345 +
MeshVisualizerGL3D::MeshVisualizerGL3D(const Flags flags): Implementation::MeshVisualizerGLBase{Implementation::MeshVisualizerGLBase::FlagBase(UnsignedShort(flags))} {
340 346
    #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
341 347
    CORRADE_ASSERT(flags & ((Flag::Wireframe|Flag::TangentDirection|Flag::BitangentFromTangentDirection|Flag::BitangentDirection|Flag::NormalDirection|Flag::InstancedObjectId|Flag::VertexId|Flag::PrimitiveIdFromVertexId) & ~Flag::NoGeometryShader),
342 -
        "Shaders::MeshVisualizer3D: at least one visualization feature has to be enabled", );
348 +
        "Shaders::MeshVisualizerGL3D: at least one visualization feature has to be enabled", );
343 349
    CORRADE_ASSERT(!(flags & Flag::NoGeometryShader && flags & (Flag::TangentDirection|Flag::BitangentFromTangentDirection|Flag::BitangentDirection|Flag::NormalDirection)),
344 -
        "Shaders::MeshVisualizer3D: geometry shader has to be enabled when rendering TBN direction", );
350 +
        "Shaders::MeshVisualizerGL3D: geometry shader has to be enabled when rendering TBN direction", );
345 351
    CORRADE_ASSERT(!(flags & Flag::BitangentDirection && flags & Flag::BitangentFromTangentDirection),
346 -
        "Shaders::MeshVisualizer3D: Flag::BitangentDirection and Flag::BitangentFromTangentDirection are mutually exclusive", );
352 +
        "Shaders::MeshVisualizerGL3D: Flag::BitangentDirection and Flag::BitangentFromTangentDirection are mutually exclusive", );
347 353
    #elif !defined(MAGNUM_TARGET_GLES2)
348 354
    CORRADE_ASSERT(flags & ((Flag::Wireframe|Flag::InstancedObjectId|Flag::VertexId|Flag::PrimitiveIdFromVertexId) & ~Flag::NoGeometryShader),
349 -
        "Shaders::MeshVisualizer3D: at least one visualization feature has to be enabled", );
355 +
        "Shaders::MeshVisualizerGL3D: at least one visualization feature has to be enabled", );
350 356
    #else
351 357
    CORRADE_ASSERT(flags & (Flag::Wireframe & ~Flag::NoGeometryShader),
352 -
        "Shaders::MeshVisualizer3D: at least Flag::Wireframe has to be enabled", );
358 +
        "Shaders::MeshVisualizerGL3D: at least Flag::Wireframe has to be enabled", );
359 +
    #endif
360 +
361 +
    #ifndef MAGNUM_TARGET_GLES
362 +
    const GL::Context& context = GL::Context::current();
353 363
    #endif
354 364
355 -
    Utility::Resource rs{"MagnumShaders"};
365 +
    Utility::Resource rs{"MagnumShadersGL"};
356 366
    GL::Shader vert{NoCreate};
357 367
    GL::Shader frag{NoCreate};
358 368
    const GL::Version version = setupShaders(vert, frag, rs);
@@ -439,7 +449,7 @@
Loading
439 449
    /* ES3 has this done in the shader directly */
440 450
    #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
441 451
    #ifndef MAGNUM_TARGET_GLES
442 -
    if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::explicit_attrib_location>(version))
452 +
    if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_attrib_location>(version))
443 453
    #endif
444 454
    {
445 455
        bindAttributeLocation(Position::Location, "position");
@@ -460,7 +470,7 @@
Loading
460 470
461 471
        #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
462 472
        #ifndef MAGNUM_TARGET_GLES
463 -
        if(!GL::Context::current().isVersionSupported(GL::Version::GL310))
473 +
        if(!context.isVersionSupported(GL::Version::GL310))
464 474
        #endif
465 475
        {
466 476
            bindAttributeLocation(VertexIndex::Location, "vertexIndex");
@@ -472,7 +482,7 @@
Loading
472 482
    CORRADE_INTERNAL_ASSERT_OUTPUT(link());
473 483
474 484
    #ifndef MAGNUM_TARGET_GLES
475 -
    if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(version))
485 +
    if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(version))
476 486
    #endif
477 487
    {
478 488
        _transformationMatrixUniform = uniformLocation("transformationMatrix");
@@ -547,26 +557,26 @@
Loading
547 557
    #endif
548 558
}
549 559
550 -
MeshVisualizer3D& MeshVisualizer3D::setTransformationMatrix(const Matrix4& matrix) {
560 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setTransformationMatrix(const Matrix4& matrix) {
551 561
    setUniform(_transformationMatrixUniform, matrix);
552 562
    return *this;
553 563
}
554 564
555 -
MeshVisualizer3D& MeshVisualizer3D::setProjectionMatrix(const Matrix4& matrix) {
565 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setProjectionMatrix(const Matrix4& matrix) {
556 566
    setUniform(_projectionMatrixUniform, matrix);
557 567
    return *this;
558 568
}
559 569
560 570
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
561 -
MeshVisualizer3D& MeshVisualizer3D::setNormalMatrix(const Matrix3x3& matrix) {
571 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setNormalMatrix(const Matrix3x3& matrix) {
562 572
    CORRADE_ASSERT(flags() & (Flag::TangentDirection|Flag::BitangentFromTangentDirection|Flag::BitangentDirection|Flag::NormalDirection),
563 -
        "Shaders::MeshVisualizer3D::setNormalMatrix(): the shader was not created with TBN direction enabled", *this);
573 +
        "Shaders::MeshVisualizerGL3D::setNormalMatrix(): the shader was not created with TBN direction enabled", *this);
564 574
    setUniform(_normalMatrixUniform, matrix);
565 575
    return *this;
566 576
}
567 577
#endif
568 578
569 -
MeshVisualizer3D& MeshVisualizer3D::setViewportSize(const Vector2& size) {
579 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setViewportSize(const Vector2& size) {
570 580
    /* Not asserting here, since the relation to wireframe is a bit vague.
571 581
       Also it's an ugly hack that should be removed, ideally. */
572 582
    if((flags() & Flag::Wireframe && !(flags() & Flag::NoGeometryShader))
@@ -579,22 +589,22 @@
Loading
579 589
}
580 590
581 591
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
582 -
MeshVisualizer3D& MeshVisualizer3D::setLineWidth(const Float width) {
592 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setLineWidth(const Float width) {
583 593
    CORRADE_ASSERT(flags() & (Flag::TangentDirection|Flag::BitangentFromTangentDirection|Flag::BitangentDirection|Flag::NormalDirection),
584 -
        "Shaders::MeshVisualizer3D::setLineWidth(): the shader was not created with TBN direction enabled", *this);
594 +
        "Shaders::MeshVisualizerGL3D::setLineWidth(): the shader was not created with TBN direction enabled", *this);
585 595
    setUniform(_lineWidthUniform, width);
586 596
    return *this;
587 597
}
588 598
589 -
MeshVisualizer3D& MeshVisualizer3D::setLineLength(const Float length) {
599 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setLineLength(const Float length) {
590 600
    CORRADE_ASSERT(flags() & (Flag::TangentDirection|Flag::BitangentFromTangentDirection|Flag::BitangentDirection|Flag::NormalDirection),
591 -
        "Shaders::MeshVisualizer3D::setLineLength(): the shader was not created with TBN direction enabled", *this);
601 +
        "Shaders::MeshVisualizerGL3D::setLineLength(): the shader was not created with TBN direction enabled", *this);
592 602
    setUniform(_lineLengthUniform, length);
593 603
    return *this;
594 604
}
595 605
#endif
596 606
597 -
MeshVisualizer3D& MeshVisualizer3D::setSmoothness(const Float smoothness) {
607 +
MeshVisualizerGL3D& MeshVisualizerGL3D::setSmoothness(const Float smoothness) {
598 608
    #ifndef CORRADE_NO_ASSERT
599 609
    /* This is a bit vaguely related but less vague than setViewportSize() so
600 610
       asserting in this case. */
@@ -604,18 +614,18 @@
Loading
604 614
    constexpr Flags allowed = Flag::Wireframe;
605 615
    #endif
606 616
    CORRADE_ASSERT(flags() & allowed,
607 -
        "Shaders::MeshVisualizer3D::setSmoothness(): the shader was not created with wireframe or TBN direction enabled", *this);
617 +
        "Shaders::MeshVisualizerGL3D::setSmoothness(): the shader was not created with wireframe or TBN direction enabled", *this);
608 618
    #endif
609 619
    setUniform(_smoothnessUniform, smoothness);
610 620
    return *this;
611 621
}
612 622
613 -
Debug& operator<<(Debug& debug, const MeshVisualizer2D::Flag value) {
614 -
    debug << "Shaders::MeshVisualizer2D::Flag" << Debug::nospace;
623 +
Debug& operator<<(Debug& debug, const MeshVisualizerGL2D::Flag value) {
624 +
    debug << "Shaders::MeshVisualizerGL2D::Flag" << Debug::nospace;
615 625
616 626
    switch(value) {
617 627
        /* LCOV_EXCL_START */
618 -
        #define _c(v) case MeshVisualizer2D::Flag::v: return debug << "::" #v;
628 +
        #define _c(v) case MeshVisualizerGL2D::Flag::v: return debug << "::" #v;
619 629
        _c(NoGeometryShader)
620 630
        _c(Wireframe)
621 631
        #ifndef MAGNUM_TARGET_GLES2
@@ -633,12 +643,12 @@
Loading
633 643
    return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")";
634 644
}
635 645
636 -
Debug& operator<<(Debug& debug, const MeshVisualizer3D::Flag value) {
637 -
    debug << "Shaders::MeshVisualizer3D::Flag" << Debug::nospace;
646 +
Debug& operator<<(Debug& debug, const MeshVisualizerGL3D::Flag value) {
647 +
    debug << "Shaders::MeshVisualizerGL3D::Flag" << Debug::nospace;
638 648
639 649
    switch(value) {
640 650
        /* LCOV_EXCL_START */
641 -
        #define _c(v) case MeshVisualizer3D::Flag::v: return debug << "::" #v;
651 +
        #define _c(v) case MeshVisualizerGL3D::Flag::v: return debug << "::" #v;
642 652
        _c(NoGeometryShader)
643 653
        _c(Wireframe)
644 654
        #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
@@ -662,41 +672,41 @@
Loading
662 672
    return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")";
663 673
}
664 674
665 -
Debug& operator<<(Debug& debug, const MeshVisualizer2D::Flags value) {
666 -
    return Containers::enumSetDebugOutput(debug, value, "Shaders::MeshVisualizer2D::Flags{}", {
667 -
        MeshVisualizer2D::Flag::Wireframe,
675 +
Debug& operator<<(Debug& debug, const MeshVisualizerGL2D::Flags value) {
676 +
    return Containers::enumSetDebugOutput(debug, value, "Shaders::MeshVisualizerGL2D::Flags{}", {
677 +
        MeshVisualizerGL2D::Flag::Wireframe,
668 678
        /* Wireframe contains this on ES2 and WebGL 1 so it's not reported
669 679
           there */
670 -
        MeshVisualizer2D::Flag::NoGeometryShader,
680 +
        MeshVisualizerGL2D::Flag::NoGeometryShader,
671 681
        #ifndef MAGNUM_TARGET_GLES2
672 -
        MeshVisualizer2D::Flag::InstancedObjectId,
673 -
        MeshVisualizer2D::Flag::VertexId,
674 -
        MeshVisualizer2D::Flag::PrimitiveIdFromVertexId, /* Superset of PrimitiveId */
682 +
        MeshVisualizerGL2D::Flag::InstancedObjectId,
683 +
        MeshVisualizerGL2D::Flag::VertexId,
684 +
        MeshVisualizerGL2D::Flag::PrimitiveIdFromVertexId, /* Superset of PrimitiveId */
675 685
        #ifndef MAGNUM_TARGET_WEBGL
676 -
        MeshVisualizer2D::Flag::PrimitiveId
686 +
        MeshVisualizerGL2D::Flag::PrimitiveId
677 687
        #endif
678 688
        #endif
679 689
    });
680 690
}
681 691
682 -
Debug& operator<<(Debug& debug, const MeshVisualizer3D::Flags value) {
683 -
    return Containers::enumSetDebugOutput(debug, value, "Shaders::MeshVisualizer3D::Flags{}", {
684 -
        MeshVisualizer3D::Flag::Wireframe,
692 +
Debug& operator<<(Debug& debug, const MeshVisualizerGL3D::Flags value) {
693 +
    return Containers::enumSetDebugOutput(debug, value, "Shaders::MeshVisualizerGL3D::Flags{}", {
694 +
        MeshVisualizerGL3D::Flag::Wireframe,
685 695
        /* Wireframe contains this on ES2 and WebGL 1 so it's not reported
686 696
           there */
687 -
        MeshVisualizer3D::Flag::NoGeometryShader,
697 +
        MeshVisualizerGL3D::Flag::NoGeometryShader,
688 698
        #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
689 -
        MeshVisualizer3D::Flag::TangentDirection,
690 -
        MeshVisualizer3D::Flag::BitangentFromTangentDirection,
691 -
        MeshVisualizer3D::Flag::BitangentDirection,
692 -
        MeshVisualizer3D::Flag::NormalDirection,
699 +
        MeshVisualizerGL3D::Flag::TangentDirection,
700 +
        MeshVisualizerGL3D::Flag::BitangentFromTangentDirection,
701 +
        MeshVisualizerGL3D::Flag::BitangentDirection,
702 +
        MeshVisualizerGL3D::Flag::NormalDirection,
693 703
        #endif
694 704
        #ifndef MAGNUM_TARGET_GLES2
695 -
        MeshVisualizer3D::Flag::InstancedObjectId,
696 -
        MeshVisualizer3D::Flag::VertexId,
697 -
        MeshVisualizer3D::Flag::PrimitiveIdFromVertexId, /* Superset of PrimitiveId */
705 +
        MeshVisualizerGL3D::Flag::InstancedObjectId,
706 +
        MeshVisualizerGL3D::Flag::VertexId,
707 +
        MeshVisualizerGL3D::Flag::PrimitiveIdFromVertexId, /* Superset of PrimitiveId */
698 708
        #ifndef MAGNUM_TARGET_WEBGL
699 -
        MeshVisualizer3D::Flag::PrimitiveId
709 +
        MeshVisualizerGL3D::Flag::PrimitiveId
700 710
        #endif
701 711
        #endif
702 712
    });

@@ -162,7 +162,7 @@
Loading
162 162
        const VectorTypeFor<dimensions, Float>& _force;
163 163
164 164
        Resource<ForceRendererOptions> _options;
165 -
        Resource<GL::AbstractShaderProgram, Shaders::Flat<dimensions>> _shader;
165 +
        Resource<GL::AbstractShaderProgram, Shaders::FlatGL<dimensions>> _shader;
166 166
        Resource<GL::Mesh> _mesh;
167 167
};
168 168

@@ -38,35 +38,65 @@
Loading
38 38
namespace Magnum { namespace Shaders {
39 39
40 40
#ifndef DOXYGEN_GENERATING_OUTPUT
41 -
template<UnsignedInt> class DistanceFieldVector;
42 -
typedef DistanceFieldVector<2> DistanceFieldVector2D;
43 -
typedef DistanceFieldVector<3> DistanceFieldVector3D;
41 +
template<UnsignedInt> class AbstractVectorGL;
42 +
typedef AbstractVectorGL<2> AbstractVectorGL2D;
43 +
typedef AbstractVectorGL<3> AbstractVectorGL3D;
44 +
#ifdef MAGNUM_BUILD_DEPRECATED
45 +
template<UnsignedInt dimensions> using AbstractVector CORRADE_DEPRECATED_ALIAS("use AbstractVectorGL instead") = AbstractVectorGL<dimensions>;
46 +
typedef CORRADE_DEPRECATED("use AbstractVectorGL2D instead") AbstractVectorGL2D AbstractVector2D;
47 +
typedef CORRADE_DEPRECATED("use AbstractVectorGL3D instead") AbstractVectorGL3D AbstractVector3D;
48 +
#endif
44 49
45 -
template<UnsignedInt> class AbstractVector;
46 -
typedef AbstractVector<2> AbstractVector2D;
47 -
typedef AbstractVector<3> AbstractVector3D;
50 +
template<UnsignedInt> class DistanceFieldVectorGL;
51 +
typedef DistanceFieldVectorGL<2> DistanceFieldVectorGL2D;
52 +
typedef DistanceFieldVectorGL<3> DistanceFieldVectorGL3D;
53 +
#ifdef MAGNUM_BUILD_DEPRECATED
54 +
template<UnsignedInt dimensions> using DistanceFieldVector CORRADE_DEPRECATED_ALIAS("use DistanceFieldVectorGL instead") = DistanceFieldVectorGL<dimensions>;
55 +
typedef CORRADE_DEPRECATED("use DistanceFieldVectorGL2D instead") DistanceFieldVectorGL2D DistanceFieldVector2D;
56 +
typedef CORRADE_DEPRECATED("use DistanceFieldVectorGL3D instead") DistanceFieldVectorGL3D DistanceFieldVector3D;
57 +
#endif
48 58
49 -
template<UnsignedInt> class Flat;
50 -
typedef Flat<2> Flat2D;
51 -
typedef Flat<3> Flat3D;
59 +
template<UnsignedInt> class FlatGL;
60 +
typedef FlatGL<2> FlatGL2D;
61 +
typedef FlatGL<3> FlatGL3D;
62 +
#ifdef MAGNUM_BUILD_DEPRECATED
63 +
template<UnsignedInt dimensions> using Flat CORRADE_DEPRECATED_ALIAS("use FlatGL instead") = FlatGL<dimensions>;
64 +
typedef CORRADE_DEPRECATED("use FlatGL2D instead") FlatGL2D Flat2D;
65 +
typedef CORRADE_DEPRECATED("use FlatGL3D instead") FlatGL3D Flat3D;
66 +
#endif
52 67
53 68
/* Generic is used only statically */
54 69
55 -
class MeshVisualizer2D;
56 -
class MeshVisualizer3D;
70 +
class MeshVisualizerGL2D;
71 +
class MeshVisualizerGL3D;
57 72
#ifdef MAGNUM_BUILD_DEPRECATED
58 -
typedef CORRADE_DEPRECATED("use MeshVisualizer3D instead") MeshVisualizer3D MeshVisualizer;
73 +
typedef CORRADE_DEPRECATED("use MeshVisualizerGL2D instead") MeshVisualizerGL2D MeshVisualizer2D;
74 +
typedef CORRADE_DEPRECATED("use MeshVisualizerGL3D instead") MeshVisualizerGL3D MeshVisualizer3D;
75 +
typedef CORRADE_DEPRECATED("use MeshVisualizerGL3D instead") MeshVisualizerGL3D MeshVisualizer;
59 76
#endif
60 77
61 -
class Phong;
78 +
class PhongGL;
79 +
#ifdef MAGNUM_BUILD_DEPRECATED
80 +
typedef CORRADE_DEPRECATED("use PhongGL instead") PhongGL Phong;
81 +
#endif
62 82
63 -
template<UnsignedInt> class Vector;
64 -
typedef Vector<2> Vector2D;
65 -
typedef Vector<3> Vector3D;
83 +
template<UnsignedInt> class VectorGL;
84 +
typedef VectorGL<2> VectorGL2D;
85 +
typedef VectorGL<3> VectorGL3D;
86 +
#ifdef MAGNUM_BUILD_DEPRECATED
87 +
template<UnsignedInt dimensions> using Vector CORRADE_DEPRECATED_ALIAS("use VectorGL instead") = VectorGL<dimensions>;
88 +
typedef CORRADE_DEPRECATED("use VectorGL2D instead") VectorGL2D Vector2D;
89 +
typedef CORRADE_DEPRECATED("use VectorGL3D instead") VectorGL3D Vector3D;
90 +
#endif
66 91
67 -
template<UnsignedInt> class VertexColor;
68 -
typedef VertexColor<2> VertexColor2D;
69 -
typedef VertexColor<3> VertexColor3D;
92 +
template<UnsignedInt> class VertexColorGL;
93 +
typedef VertexColorGL<2> VertexColorGL2D;
94 +
typedef VertexColorGL<3> VertexColorGL3D;
95 +
#ifdef MAGNUM_BUILD_DEPRECATED
96 +
template<UnsignedInt dimensions> using VertexColor CORRADE_DEPRECATED_ALIAS("use VertexColorGL instead") = VertexColorGL<dimensions>;
97 +
typedef CORRADE_DEPRECATED("use VertexColorGL2D instead") VertexColorGL2D VertexColor2D;
98 +
typedef CORRADE_DEPRECATED("use VertexColorGL3D instead") VertexColorGL3D VertexColor3D;
99 +
#endif
70 100
#endif
71 101
72 102
}}

@@ -35,15 +35,6 @@
Loading
35 35
36 36
namespace Implementation {
37 37
    template<std::size_t, class> struct MatrixDeterminant;
38 -
39 -
    template<std::size_t size, std::size_t col, std::size_t otherSize, class T, std::size_t ...row> constexpr Vector<size, T> valueOrIdentityVector(Corrade::Containers::Implementation::Sequence<row...>, const RectangularMatrix<otherSize, otherSize, T>& other) {
40 -
        return {(col < otherSize && row < otherSize ? other[col][row] :
41 -
            col == row ? T{1} : T{0})...};
42 -
    }
43 -
44 -
    template<std::size_t size, std::size_t col, std::size_t otherSize, class T> constexpr Vector<size, T> valueOrIdentityVector(const RectangularMatrix<otherSize, otherSize, T>& other) {
45 -
        return valueOrIdentityVector<size, col>(typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, other);
46 -
    }
47 38
}
48 39
49 40
/**
@@ -78,9 +69,9 @@
Loading
78 69
         * @brief Construct an identity matrix
79 70
         *
80 71
         * The @p value allows you to specify a value on diagonal.
81 -
         * @see @ref fromDiagonal()
72 +
         * @see @ref Matrix(ZeroInitT), @ref fromDiagonal()
82 73
         */
83 -
        constexpr explicit Matrix(IdentityInitT, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, Vector<size, T>(value)} {}
74 +
        constexpr explicit Matrix(IdentityInitT, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{IdentityInit, value} {}
84 75
85 76
        /** @copydoc RectangularMatrix::RectangularMatrix(ZeroInitT) */
86 77
        constexpr explicit Matrix(ZeroInitT) noexcept: RectangularMatrix<size, size, T>{ZeroInit} {}
@@ -92,10 +83,10 @@
Loading
92 83
        template<class ...U> constexpr /*implicit*/ Matrix(const Vector<size, T>& first, const U&... next) noexcept: RectangularMatrix<size, size, T>(first, next...) {}
93 84
94 85
        /** @brief Construct with one value for all elements */
95 -
        constexpr explicit Matrix(T value) noexcept: RectangularMatrix<size, size, T>{typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, value} {}
86 +
        constexpr explicit Matrix(T value) noexcept: RectangularMatrix<size, size, T>{value} {}
96 87
97 88
        /**
98 -
         * @brief Construct from a matrix of adifferent type
89 +
         * @brief Construct from a matrix of a different type
99 90
         *
100 91
         * Performs only default casting on the values, no rounding or
101 92
         * anything else. Example usage:
@@ -107,14 +98,21 @@
Loading
107 98
        /** @brief Construct matrix from external representation */
108 99
        template<class U, class V = decltype(Implementation::RectangularMatrixConverter<size, size, T, U>::from(std::declval<U>()))> constexpr explicit Matrix(const U& other): RectangularMatrix<size, size, T>(Implementation::RectangularMatrixConverter<size, size, T, U>::from(other)) {}
109 100
101 +
        /** @copydoc RectangularMatrix::RectangularMatrix(IdentityInitT, const RectangularMatrix<otherCols, otherRows, T>&, T) */
102 +
        template<std::size_t otherCols, std::size_t otherRows> constexpr explicit Matrix(IdentityInitT, const RectangularMatrix<otherCols, otherRows, T>& other, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{IdentityInit, other, value} {}
103 +
104 +
        /** @copydoc RectangularMatrix::RectangularMatrix(ZeroInitT, const RectangularMatrix<otherCols, otherRows, T>&) */
105 +
        template<std::size_t otherCols, std::size_t otherRows> constexpr explicit Matrix(ZeroInitT, const RectangularMatrix<otherCols, otherRows, T>& other) noexcept: RectangularMatrix<size, size, T>{ZeroInit, other} {}
106 +
110 107
        /**
111 108
         * @brief Construct by slicing or expanding a matrix of different size
109 +
         * @m_since_latest
112 110
         *
113 -
         * If the other matrix is larger, takes only the first @cpp size @ce
114 -
         * columns and rows from it; if the other matrix is smaller, it's
115 -
         * expanded to an identity (ones on diagonal, zeros elsewhere).
111 +
         * Equivalent to @ref Matrix(IdentityInitT, const RectangularMatrix<otherCols, otherRows, T>&, T).
112 +
         * Note that this default is different from @ref RectangularMatrix,
113 +
         * where it's equivalent to the @ref ZeroInit variant instead.
116 114
         */
117 -
        template<std::size_t otherSize> constexpr explicit Matrix(const RectangularMatrix<otherSize, otherSize, T>& other) noexcept: Matrix<size, T>{typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, other} {}
115 +
        template<std::size_t otherCols, std::size_t otherRows> constexpr explicit Matrix(const RectangularMatrix<otherCols, otherRows, T>& other, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{IdentityInit, other, value} {}
118 116
119 117
        /** @brief Copy constructor */
120 118
        constexpr /*implicit*/ Matrix(const RectangularMatrix<size, size, T>& other) noexcept: RectangularMatrix<size, size, T>(other) {}
@@ -300,9 +298,6 @@
Loading
300 298
301 299
    private:
302 300
        friend struct Implementation::MatrixDeterminant<size, T>;
303 -
304 -
        /* Implementation for RectangularMatrix<cols, rows, T>::RectangularMatrix(const RectangularMatrix<cols, rows, U>&) */
305 -
        template<std::size_t otherSize, std::size_t ...col> constexpr explicit Matrix(Corrade::Containers::Implementation::Sequence<col...>, const RectangularMatrix<otherSize, otherSize, T>& other) noexcept: RectangularMatrix<size, size, T>{Implementation::valueOrIdentityVector<size, col>(other)...} {}
306 301
};
307 302
308 303
/**

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 14 files with coverage changes found.

Changes in src/Magnum/Shaders/MeshVisualizerGL.cpp
+1
Loading file...
Changes in src/Magnum/Shaders/VectorGL.cpp
New
Loading file...
Changes in src/Magnum/Shaders/VertexColorGL.cpp
New
Loading file...
Changes in src/Magnum/Shaders/PhongGL.cpp
New
Loading file...
Changes in src/Magnum/Shaders/DistanceFieldVectorGL.cpp
New
Loading file...
Changes in src/Magnum/Shaders/FlatGL.cpp
New
Loading file...
New file src/Magnum/Shaders/DistanceFieldVectorGL.h
New
Loading file...
New file src/Magnum/Shaders/MeshVisualizerGL.h
New
Loading file...
New file src/Magnum/Shaders/FlatGL.h
New
Loading file...
New file src/Magnum/Shaders/VertexColorGL.h
New
Loading file...
New file src/Magnum/Shaders/PhongGL.h
New
Loading file...
New file src/Magnum/Shaders/Shaders.h
New
Loading file...
New file src/Magnum/Shaders/AbstractVectorGL.h
New
Loading file...
New file src/Magnum/Shaders/VectorGL.h
New
Loading file...

21 Commits

Files Coverage
src +<.01% 79.98%
Project Totals (505 files) 79.98%
Loading