diff --git a/src/Magnum/Primitives/Axis.h b/src/Magnum/Primitives/Axis.h index 11a7b191e..3e889d9ad 100644 --- a/src/Magnum/Primitives/Axis.h +++ b/src/Magnum/Primitives/Axis.h @@ -41,7 +41,8 @@ Two color-coded arrows for visualizing orientation (XY is RG), going from @cpp 0.0f @ce to @cpp 1.0f @ce on the X and Y axis. @ref MeshPrimitive::Lines with @ref MeshIndexType::UnsignedShort indices, interleaved @ref VertexFormat::Vector2 positions and @ref VertexFormat::Vector3 colors. The -returned instance references data stored in constant memory. +returned instance references data stored in constant memory --- pass the data +through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-axis2d.png width=256px @@ -56,7 +57,8 @@ Three color-coded arrows for visualizing orientation (XYZ is RGB), going from @cpp 0.0f @ce to @cpp 1.0f @ce on the X, Y and Z axis. @ref MeshPrimitive::Lines with @ref MeshIndexType::UnsignedShort indices, interleaved @ref VertexFormat::Vector3 positions and @ref VertexFormat::Vector3 -colors. The returned instance references data stored in constant memory. +colors. The returned instance references data stored in constant memory --- +pass the data through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-axis3d.png width=256px diff --git a/src/Magnum/Primitives/Crosshair.h b/src/Magnum/Primitives/Crosshair.h index e8a836e1e..53ec95de3 100644 --- a/src/Magnum/Primitives/Crosshair.h +++ b/src/Magnum/Primitives/Crosshair.h @@ -39,7 +39,8 @@ namespace Magnum { namespace Primitives { 2x2 crosshair (two crossed lines), centered at origin. Non-indexed @ref MeshPrimitive::Lines with @ref VertexFormat::Vector2 positions. The -returned instance references data astored in constant memory. +returned instance references data astored in constant memory --- pass the data +through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-crosshair2d.png width=256px @@ -52,7 +53,8 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData crosshair2D(); 2x2x2 crosshair (three crossed lines), centered at origin. Non-indexed @ref MeshPrimitive::Lines with @ref VertexFormat::Vector3 positions. The -returned instance references data stored in constant memory. +returned instance references data stored in constant memory --- pass the data +through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-crosshair3d.png width=256px diff --git a/src/Magnum/Primitives/Cube.h b/src/Magnum/Primitives/Cube.h index cbd49bb1b..fce061b94 100644 --- a/src/Magnum/Primitives/Cube.h +++ b/src/Magnum/Primitives/Cube.h @@ -40,7 +40,8 @@ namespace Magnum { namespace Primitives { 2x2x2 cube, centered at origin. @ref MeshPrimitive::Triangles with @ref MeshIndexType::UnsignedShort indices, interleaved @ref VertexFormat::Vector3 positions and flat @ref VertexFormat::Vector3 -normals. The returned instance references data stored in constant memory. +normals. The returned instance references data stored in constant memory --- +pass the data through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-cubesolid.png width=256px @@ -52,9 +53,10 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolid(); @brief Solid 3D cube as a single strip 2x2x2 cube, centered at origin. Non-indexed @ref MeshPrimitive::TriangleStrip -with @ref VertexFormat::Vector3 positions. The returned instance references -data stored in constant memory. No normals or anything else --- use -@ref cubeSolid() instead if you need these. +with @ref VertexFormat::Vector3 positions. No normals or anything else, use +@ref cubeSolid() instead if you need these. The returned instance references +data stored in constant memory --- pass the data through @ref MeshTools::owned() +to get a mutable copy, if needed. Vertex positions of this mesh can be also generated directly in the vertex shader using @glsl gl_VertexID @ce ([source](https://twitter.com/turanszkij/status/1141638406956617730), @@ -71,7 +73,8 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolidStrip(); 2x2x2 cube, centered at origin. @ref MeshPrimitive::Lines with @ref MeshIndexType::UnsignedShort indices and @ref VertexFormat::Vector3 -positions. The returned instance references data stored in constant memory. +positions. The returned instance references data stored in constant memory --- +pass the data through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-cubewireframe.png width=256px diff --git a/src/Magnum/Primitives/Plane.h b/src/Magnum/Primitives/Plane.h index 94ad45def..97448a4f0 100644 --- a/src/Magnum/Primitives/Plane.h +++ b/src/Magnum/Primitives/Plane.h @@ -89,7 +89,8 @@ enum class CORRADE_DEPRECATED_ENUM("use PlaneFlags instead") PlaneTextureCoords: @ref VertexFormat::Vector3 normals in positive Z direction, optional @ref VertexFormat::Vector4 tangents and optional @ref VertexFormat::Vector2 texture coordinates. The returned instance may reference data stored in -constant memory. +constant memory --- pass the data through @ref MeshTools::owned() to get a +mutable copy, if needed. @image html primitives-planesolid.png width=256px @@ -118,7 +119,8 @@ CORRADE_IGNORE_DEPRECATED_POP 2x2 square on the XY plane, centered at origin. Non-indexed @ref MeshPrimitive::LineLoop on the XY plane with @ref VertexFormat::Vector3 -positions. The returned instance references data stored in constant memory. +positions. The returned instance references data stored in constant memory --- +pass the data through @ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-planewireframe.png width=256px diff --git a/src/Magnum/Primitives/Square.h b/src/Magnum/Primitives/Square.h index b70b3c924..8641cf84f 100644 --- a/src/Magnum/Primitives/Square.h +++ b/src/Magnum/Primitives/Square.h @@ -79,7 +79,8 @@ enum class CORRADE_DEPRECATED_ENUM("use SquareFlags instead") SquareTextureCoord 2x2 square, centered at origin. Non-indexed @ref MeshPrimitive::TriangleStrip with interleaved @ref VertexFormat::Vector2 positions and optional @ref VertexFormat::Vector2 texture coordinates. The returned instance -references data stored in constant memory. +references data stored in constant memory --- pass the data through +@ref MeshTools::owned() to get a mutable copy, if needed. @image html primitives-squaresolid.png width=256px @@ -103,7 +104,8 @@ CORRADE_IGNORE_DEPRECATED_POP 2x2 square, centered at origin. Non-indexed @ref MeshPrimitive::LineLoop with @ref VertexFormat::Vector2 positions. The returned instance references data -stored in constant memory. +stored in constant memory --- pass the data through @ref MeshTools::owned() to +get a mutable copy, if needed. @image html primitives-squarewireframe.png width=256px