Browse Source

Primitives: mention MeshTools::owned() in immutable primitive docs.

pull/459/head
Vladimír Vondruš 6 years ago
parent
commit
be79cd5ea5
  1. 6
      src/Magnum/Primitives/Axis.h
  2. 6
      src/Magnum/Primitives/Crosshair.h
  3. 13
      src/Magnum/Primitives/Cube.h
  4. 6
      src/Magnum/Primitives/Plane.h
  5. 6
      src/Magnum/Primitives/Square.h

6
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

6
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

13
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

6
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

6
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

Loading…
Cancel
Save