Class XrHandMeshVertexBufferMSFT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrHandMeshVertexBufferMSFT>
org.lwjgl.openxr.XrHandMeshVertexBufferMSFT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrHandMeshVertexBufferMSFT extends org.lwjgl.system.Struct<XrHandMeshVertexBufferMSFT> implements org.lwjgl.system.NativeResource
The vertex buffer of a hand mesh.
Description

An application should preallocate the vertices array using the XrSystemHandTrackingMeshPropertiesMSFT::maxHandMeshVertexCount returned from GetSystemProperties. In this way, the application can avoid possible insufficient buffer sizes for each query, and therefore avoid reallocating memory each frame.

The input vertexCapacityInput must not be 0, and vertices must not be NULL, or else the runtime must return ERROR_VALIDATION_FAILURE on calls to the UpdateHandMeshMSFT function.

If the input vertexCapacityInput is not sufficient to contain all output vertices, the runtime must return ERROR_SIZE_INSUFFICIENT on calls to the UpdateHandMeshMSFT, do not change content in vertexUpdateTime and vertices, and return 0 for vertexCountOutput.

If the input vertexCapacityInput is equal to or larger than the XrSystemHandTrackingMeshPropertiesMSFT::maxHandMeshVertexCount returned from GetSystemProperties, the runtime must not return ERROR_SIZE_INSUFFICIENT on calls to the UpdateHandMeshMSFT because of insufficient vertex buffer size.

If the input vertexUpdateTime is 0, and the capacity of the vertices array is sufficient, and hand mesh tracking is active, the runtime must return the latest non-zero vertexUpdateTime, and fill in the vertexCountOutput and vertices fields.

If the input vertexUpdateTime is not 0, the runtime can either return without changing vertexCountOutput or the content in vertices, and return FALSE for XrHandMeshMSFT::vertexBufferChanged indicating the vertices are not changed; or return a new non-zero vertexUpdateTime and fill in latest data in vertexCountOutput and vertices and return TRUE for XrHandMeshMSFT::vertexBufferChanged indicating the vertices are updated to a newer version.

An application can keep the XrHandMeshVertexBufferMSFT structure for each frame in frame loop and use the returned vertexUpdateTime to detect the changes of the content in vertices. The application can therefore avoid unnecessary processing of vertices, such as coping them to GPU memory.

Valid Usage (Implicit)
See Also

XrHandMeshMSFT, XrHandMeshVertexMSFT, XrSystemHandTrackingMeshPropertiesMSFT, UpdateHandMeshMSFT

Layout


 struct XrHandMeshVertexBufferMSFT {
     XrTime vertexUpdateTime();
     uint32_t vertexCapacityInput();
     uint32_t vertexCountOutput();
     XrHandMeshVertexMSFT * vertices();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • VERTEXUPDATETIME

      public static final int VERTEXUPDATETIME
      The struct member offsets.
    • VERTEXCAPACITYINPUT

      public static final int VERTEXCAPACITYINPUT
      The struct member offsets.
    • VERTEXCOUNTOUTPUT

      public static final int VERTEXCOUNTOUTPUT
      The struct member offsets.
    • VERTICES

      public static final int VERTICES
      The struct member offsets.
  • Constructor Details

    • XrHandMeshVertexBufferMSFT

      public XrHandMeshVertexBufferMSFT(ByteBuffer container)
      Creates a XrHandMeshVertexBufferMSFT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details