C Specification

XrTriangleMeshCreateInfoFB must be provided when calling xrCreateTriangleMeshFB.

The XrTriangleMeshCreateInfoFB structure is defined as:

// Provided by XR_FB_triangle_mesh
typedef struct XrTriangleMeshCreateInfoFB {
    XrStructureType          type;
    const void*              next;
    XrTriangleMeshFlagsFB    flags;
    XrWindingOrderFB         windingOrder;
    uint32_t                 vertexCount;
    const XrVector3f*        vertexBuffer;
    uint32_t                 triangleCount;
    const uint32_t*          indexBuffer;
} XrTriangleMeshCreateInfoFB;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • flags is a bitmask of XrTriangleMeshFlagBitsFB that specify behavior.

  • windingOrder is the XrWindingOrderFB value defining the winding order of the mesh triangles.

  • vertexCount is the number of vertices in the mesh. In the case of the mutable mesh, the value is treated as the maximum number of vertices the mesh will be able to represent at any time in its lifecycle. The actual number of vertices can vary and is defined when xrTriangleMeshEndUpdateFB is called.

  • vertexBuffer is a pointer to the vertex data. The size of the array must be vertexCount elements. When the mesh is mutable ((flags & XR_TRIANGLE_MESH_MUTABLE_BIT_FB) != 0), the vertexBuffer parameter must be NULL and mesh data must be populated separately.

  • triangleCount is the number of triangles in the mesh. In the case of the mutable mesh, the value is treated as the maximum number of triangles the mesh will be able to represent at any time in its lifecycle. The actual number of triangles can vary and is defined when xrTriangleMeshEndUpdateFB is called.

  • indexBuffer the triangle indices. The size of the array must be triangleCount elements. When the mesh is mutable ((flags & XR_TRIANGLE_MESH_MUTABLE_BIT_FB) != 0), the indexBuffer parameter must be NULL and mesh data must be populated separately.

Description

Mesh buffers can be updated between xrTriangleMeshBeginUpdateFB and xrTriangleMeshEndUpdateFB calls.

If the mesh is non-mutable, vertexBuffer must be a pointer to an array of vertexCount XrVector3f structures. If the mesh is non-mutable, indexBuffer must be a pointer to an array of 3 * triangleCount uint32_t vertex indices.

Valid Usage (Implicit)

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024, The Khronos Group Inc.