diff --git a/doc/vulkan-wrapping.dox b/doc/vulkan-wrapping.dox index b21ddaa1d..cd369c011 100644 --- a/doc/vulkan-wrapping.dox +++ b/doc/vulkan-wrapping.dox @@ -196,6 +196,18 @@ can be also passed to @ref Vk::DeviceCreateInfo to allow reuse: related APIs, such as @ref Vk::DynamicRasterizationState containing a rasterization-related subset of @type_vk{DynamicState} or @ref Vk::PipelineStage::AllRasterization for @val_vk{PIPELINE_STAGE_ALL_GRAPHICS_BIT,PipelineStageFlagBits}. +- Because not all @type_vk{Format} values can be used as both pixel and + vertex formats (for example there can be double-precision vertices, but not + pixels, or it makes no sense to use ASTC for vertices), the enum is split + into @ref Vk::PixelFormat and @ref Vk::VertexFormat. For pixel formats the + naming is simplified for easier typing (@ref Vk::PixelFormat::RGBA8Srgb + instead of @val_vk{FORMAT_R8G8B8A8_SRGB,Format}, for example); for vertex + formats the RGBA notion is omitted and replaced with just component count, + in most cases matching Magnum scalar and vector type names + (@ref Vk::VertexFormat::Vector3 instead of @val_vk{FORMAT_R32G32B32_SFLOAT,Format}) +- As Magnum has several mesh-related abstraction (and Vulkan none), + @ref Vk::MeshPrimitive is used instead of @type_vk{PrimitiveTopology} for a + better visual grouping of related concepts */ } diff --git a/src/Magnum/Trade/MeshData.h b/src/Magnum/Trade/MeshData.h index 7a341fe23..613ae00e7 100644 --- a/src/Magnum/Trade/MeshData.h +++ b/src/Magnum/Trade/MeshData.h @@ -690,7 +690,7 @@ to map custom @ref MeshAttribute values to human-readable string names using @ref AbstractImporter::meshAttributeName() and @ref AbstractImporter::meshAttributeForName(). Using @ref meshPrimitiveWrap() you can also supply implementation-specific values that are not available in -the generic @ref MeshPrimitive enum, similarly see also +the generic @relativeref{Magnum,MeshPrimitive} enum, similarly see also @ref Trade-MeshAttributeData-custom-vertex-format for details on implementation-specific @ref VertexFormat values. @see @ref AbstractImporter::mesh() diff --git a/src/Magnum/Vk/DeviceFeatures.h b/src/Magnum/Vk/DeviceFeatures.h index 5facabe34..ca6d4bc00 100644 --- a/src/Magnum/Vk/DeviceFeatures.h +++ b/src/Magnum/Vk/DeviceFeatures.h @@ -1281,7 +1281,7 @@ enum class DeviceFeature: UnsignedShort { /** * The @ref DynamicRasterizationState::CullMode, * @relativeref{DynamicRasterizationState,FrontFace}, - * @relativeref{DynamicRasterizationState,PrimitiveTopology}, + * @relativeref{DynamicRasterizationState,MeshPrimitive}, * @relativeref{DynamicRasterizationState,ViewportWithCount}, * @relativeref{DynamicRasterizationState,ScissorWithCount}, * @relativeref{DynamicRasterizationState,VertexInputBindingStride}, diff --git a/src/Magnum/Vk/Implementation/dynamicRasterizationStateMapping.hpp b/src/Magnum/Vk/Implementation/dynamicRasterizationStateMapping.hpp index afd38311f..63bcb8741 100644 --- a/src/Magnum/Vk/Implementation/dynamicRasterizationStateMapping.hpp +++ b/src/Magnum/Vk/Implementation/dynamicRasterizationStateMapping.hpp @@ -36,7 +36,7 @@ _c(StencilWriteMask, STENCIL_WRITE_MASK) _c(StencilReference, STENCIL_REFERENCE) _c(CullMode, CULL_MODE_EXT) _c(FrontFace, FRONT_FACE_EXT) -_c(PrimitiveTopology, PRIMITIVE_TOPOLOGY_EXT) +_c(MeshPrimitive, PRIMITIVE_TOPOLOGY_EXT) _c(ViewportWithCount, VIEWPORT_WITH_COUNT_EXT) _c(ScissorWithCount, SCISSOR_WITH_COUNT_EXT) _c(VertexInputBindingStride, VERTEX_INPUT_BINDING_STRIDE_EXT) diff --git a/src/Magnum/Vk/RasterizationPipelineCreateInfo.h b/src/Magnum/Vk/RasterizationPipelineCreateInfo.h index a5ce38bdf..aa046cac3 100644 --- a/src/Magnum/Vk/RasterizationPipelineCreateInfo.h +++ b/src/Magnum/Vk/RasterizationPipelineCreateInfo.h @@ -164,7 +164,7 @@ enum class DynamicRasterizationState: UnsignedByte { * @requires_vk_feature @ref DeviceFeature::ExtendedDynamicState * @m_keywords{VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} */ - PrimitiveTopology, + MeshPrimitive, /** * Both the number of viewports and their ranges set in