Browse Source

Add a "placeholder" MeshPrimitive::Meshlets.

Just so I can create custom Trade::MeshData instances with meshlet
contents, nothing else.
pull/542/merge
Vladimír Vondruš 4 years ago
parent
commit
9a97c51262
  1. 3
      doc/changelog.dox
  2. 3
      src/Magnum/GL/Mesh.cpp
  3. 1
      src/Magnum/Implementation/meshPrimitiveMapping.hpp
  4. 12
      src/Magnum/Mesh.h
  5. 3
      src/Magnum/Vk/MeshLayout.cpp

3
doc/changelog.dox

@ -265,6 +265,9 @@ See also:
@subsection changelog-latest-changes Changes and improvements
- Added @ref MeshPrimitive::Meshlets as a placeholder for future meshlet
support in @ref Trade::MeshData
@subsubsection changelog-latest-changes-debugtools DebugTools library
- @ref DebugTools::CompareImage now supports comparing half-float pixel

3
src/Magnum/GL/Mesh.cpp

@ -62,7 +62,8 @@ constexpr MeshPrimitive PrimitiveMapping[]{
MeshPrimitive::TriangleFan,
MeshPrimitive(~UnsignedInt{}), /* Instances */
MeshPrimitive(~UnsignedInt{}), /* Faces */
MeshPrimitive(~UnsignedInt{}) /* Edges */
MeshPrimitive(~UnsignedInt{}), /* Edges */
MeshPrimitive(~UnsignedInt{}) /* Meshlets */
};
constexpr MeshIndexType IndexTypeMapping[]{

1
src/Magnum/Implementation/meshPrimitiveMapping.hpp

@ -35,4 +35,5 @@ _c(TriangleFan)
_c(Instances)
_c(Faces)
_c(Edges)
_c(Meshlets)
#endif

12
src/Magnum/Mesh.h

@ -183,7 +183,17 @@ enum class MeshPrimitive: UnsignedInt {
* half-edge mesh representation.
* @see @ref Trade::meshAttributeCustom()
*/
Edges
Edges,
/**
* Meshlet data.
* @m_since_latest
*
* Can be used to annotate @ref Trade::MeshData containing meshlet chunks,
* i.e. groups of vertex references together with per-meshlet culling
* information such as a bounding sphere or visibility cone.
*/
Meshlets
};
/** @debugoperatorenum{MeshPrimitive} */

3
src/Magnum/Vk/MeshLayout.cpp

@ -45,7 +45,8 @@ constexpr MeshPrimitive MeshPrimitiveMapping[]{
MeshPrimitive::TriangleFan,
MeshPrimitive(~Int{}), /* Instances */
MeshPrimitive(~Int{}), /* Faces */
MeshPrimitive(~Int{}) /* Edges */
MeshPrimitive(~Int{}), /* Edges */
MeshPrimitive(~Int{}) /* Meshlets */
};
}

Loading…
Cancel
Save