Class FBTriangleMesh
- java.lang.Object
-
- org.lwjgl.openxr.FBTriangleMesh
-
public class FBTriangleMesh extends java.lang.ObjectThe FB_triangle_mesh extension.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringXR_FB_TRIANGLE_MESH_EXTENSION_NAMEThe extension name.static intXR_FB_triangle_mesh_SPEC_VERSIONThe extension specification version.static intXR_OBJECT_TYPE_TRIANGLE_MESH_FBExtendsXrObjectType.static intXR_TRIANGLE_MESH_MUTABLE_BIT_FBXrTriangleMeshFlagBitsFBstatic intXR_TYPE_TRIANGLE_MESH_CREATE_INFO_FBExtendsXrStructureType.static intXR_WINDING_ORDER_CCW_FB
XR_WINDING_ORDER_CW_FB
XR_WINDING_ORDER_UNKNOWN_FBXrWindingOrderFB - Triangle winding order
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrCreateTriangleMeshFB(XrSession session, long createInfo, long outTriangleMesh)Unsafe version of:CreateTriangleMeshFBstatic intnxrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, long outVertexCount)Unsafe version of:TriangleMeshBeginVertexBufferUpdateFBstatic intnxrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, long outIndexBuffer)Unsafe version of:TriangleMeshGetIndexBufferFBstatic intnxrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, long outVertexBuffer)Unsafe version of:TriangleMeshGetVertexBufferFBstatic intxrCreateTriangleMeshFB(XrSession session, XrTriangleMeshCreateInfoFB createInfo, org.lwjgl.PointerBuffer outTriangleMesh)Create a triangle mesh.static intxrDestroyTriangleMeshFB(XrTriangleMeshFB mesh)Destroy a triangle mesh.static intxrTriangleMeshBeginUpdateFB(XrTriangleMeshFB mesh)Begin an update of the mesh data.static intxrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, java.nio.IntBuffer outVertexCount)Begin an update of the vertex data.static intxrTriangleMeshEndUpdateFB(XrTriangleMeshFB mesh, int vertexCount, int triangleCount)End an update of the mesh data.static intxrTriangleMeshEndVertexBufferUpdateFB(XrTriangleMeshFB mesh)End an update of the vertex data.static intxrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, org.lwjgl.PointerBuffer outIndexBuffer)Obtain the index buffer of a triangle mesh.static intxrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, org.lwjgl.PointerBuffer outVertexBuffer)Obtain the vertex buffer of a triangle mesh.
-
-
-
Field Detail
-
XR_FB_triangle_mesh_SPEC_VERSION
The extension specification version.
-
XR_FB_TRIANGLE_MESH_EXTENSION_NAME
The extension name.
-
XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB
ExtendsXrStructureType.
-
XR_OBJECT_TYPE_TRIANGLE_MESH_FB
ExtendsXrObjectType.
-
XR_TRIANGLE_MESH_MUTABLE_BIT_FB
XrTriangleMeshFlagBitsFB
-
XR_WINDING_ORDER_UNKNOWN_FB, XR_WINDING_ORDER_CW_FB, XR_WINDING_ORDER_CCW_FB
XrWindingOrderFB - Triangle winding orderEnumerant Descriptions
WINDING_ORDER_UNKNOWN_FB— Winding order is unknown and the runtime cannot make any assumptions on the triangle orientationWINDING_ORDER_CW_FB— Clockwise winding orderWINDING_ORDER_CCW_FB— Counter-clockwise winding order
See Also
-
-
Method Detail
-
nxrCreateTriangleMeshFB
public static int nxrCreateTriangleMeshFB(XrSession session, long createInfo, long outTriangleMesh)
Unsafe version of:CreateTriangleMeshFB
-
xrCreateTriangleMeshFB
public static int xrCreateTriangleMeshFB(XrSession session, XrTriangleMeshCreateInfoFB createInfo, org.lwjgl.PointerBuffer outTriangleMesh)
Create a triangle mesh.C Specification
The
CreateTriangleMeshFBfunction is defined as:XrResult xrCreateTriangleMeshFB( XrSession session, const XrTriangleMeshCreateInfoFB* createInfo, XrTriangleMeshFB* outTriangleMesh);Description
This creates an
XrTriangleMeshFBhandle. The returned triangle mesh handle may be subsequently used in API calls.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingCreateTriangleMeshFB sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrTriangleMeshCreateInfoFBstructureoutTriangleMeshmust be a pointer to anXrTriangleMeshFBhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto which the mesh will belong.createInfo- a pointer to anXrTriangleMeshCreateInfoFBstructure containing parameters to be used to create the mesh.outTriangleMesh- a pointer to a handle in which the createdXrTriangleMeshFBis returned.
- The
-
xrDestroyTriangleMeshFB
public static int xrDestroyTriangleMeshFB(XrTriangleMeshFB mesh)
Destroy a triangle mesh.C Specification
The
DestroyTriangleMeshFBfunction is defined as:XrResult xrDestroyTriangleMeshFB( XrTriangleMeshFB mesh);Description
XrTriangleMeshFBhandles and their associated data are destroyed byDestroyTriangleMeshFB. The mesh buffers retrieved byTriangleMeshGetVertexBufferFBandTriangleMeshGetIndexBufferFBmust not be accessed anymore after their parent mesh object has been destroyed.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingDestroyTriangleMeshFB meshmust be a validXrTriangleMeshFBhandle
Thread Safety
- Access to
mesh, and any child handles, must be externally synchronized - Access to the buffers returned from calls to
TriangleMeshGetVertexBufferFBandTriangleMeshGetIndexBufferFBonmeshmust be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto destroy.
- The
-
nxrTriangleMeshGetVertexBufferFB
public static int nxrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, long outVertexBuffer)
Unsafe version of:TriangleMeshGetVertexBufferFB
-
xrTriangleMeshGetVertexBufferFB
public static int xrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, org.lwjgl.PointerBuffer outVertexBuffer)
Obtain the vertex buffer of a triangle mesh.C Specification
The
TriangleMeshGetVertexBufferFBfunction is defined as:XrResult xrTriangleMeshGetVertexBufferFB( XrTriangleMeshFB mesh, XrVector3f** outVertexBuffer);Description
Retrieves a pointer to the vertex buffer. The vertex buffer is structured as an array of
XrVector3f. The size of the buffer isvertexCount. The application must callTriangleMeshBeginUpdateFBorTriangleMeshBeginVertexBufferUpdateFBbefore making modifications to the vertex buffer. The buffer location is guaranteed to remain constant over the lifecycle of the mesh object.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshGetVertexBufferFB meshmust be a validXrTriangleMeshFBhandleoutVertexBuffermust be a pointer to a pointer to anXrVector3fstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
mesh- theXrTriangleMeshFBto get the vertex buffer for.outVertexBuffer- a pointer to return the vertex buffer into.
- The
-
nxrTriangleMeshGetIndexBufferFB
public static int nxrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, long outIndexBuffer)
Unsafe version of:TriangleMeshGetIndexBufferFB
-
xrTriangleMeshGetIndexBufferFB
public static int xrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, org.lwjgl.PointerBuffer outIndexBuffer)
Obtain the index buffer of a triangle mesh.C Specification
The
TriangleMeshGetIndexBufferFBfunction is defined as:XrResult xrTriangleMeshGetIndexBufferFB( XrTriangleMeshFB mesh, uint32_t** outIndexBuffer);Description
Retrieves a pointer to the index buffer that defines the topology of the triangle mesh. Each triplet of consecutive elements points to three vertices in the vertex buffer and thus form a triangle.
The application must call
TriangleMeshBeginUpdateFBbefore making modifications to the index buffer. The buffer location is guaranteed to remain constant over the lifecycle of the mesh object.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshGetIndexBufferFB meshmust be a validXrTriangleMeshFBhandleoutIndexBuffermust be a pointer to a pointer to auint32_tvalue
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto get the index buffer for.outIndexBuffer- a pointer to return the index buffer into.
- The
-
xrTriangleMeshBeginUpdateFB
public static int xrTriangleMeshBeginUpdateFB(XrTriangleMeshFB mesh)
Begin an update of the mesh data.C Specification
The
TriangleMeshBeginUpdateFBfunction is defined as:XrResult xrTriangleMeshBeginUpdateFB( XrTriangleMeshFB mesh);Description
Begins updating the mesh buffer data. The application must call this function before it makes any modifications to the buffers retrieved by
TriangleMeshGetVertexBufferFBandTriangleMeshGetIndexBufferFB. If only the vertex buffer needs to be updated,TriangleMeshBeginVertexBufferUpdateFBmay be used instead. To commit the modifications, the application must callTriangleMeshEndUpdateFB. Runtime must returnERROR_VALIDATION_FAILUREif the mesh is immutable.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshBeginUpdateFB meshmust be a validXrTriangleMeshFBhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto update.
- The
-
xrTriangleMeshEndUpdateFB
public static int xrTriangleMeshEndUpdateFB(XrTriangleMeshFB mesh, int vertexCount, int triangleCount)
End an update of the mesh data.C Specification
The
TriangleMeshEndUpdateFBfunction is defined as:XrResult xrTriangleMeshEndUpdateFB( XrTriangleMeshFB mesh, uint32_t vertexCount, uint32_t triangleCount);Description
Signals to the runtime that the application has finished updating the mesh buffers following a call to
TriangleMeshBeginUpdateFB.vertexCountandtriangleCountspecify the actual number of primitives that make up the mesh after the update. They must be larger than zero but smaller or equal to the maximum counts defined at create time.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshEndUpdateFB meshmust be a validXrTriangleMeshFBhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto update.vertexCount- the vertex count after the update.triangleCount- the triangle count after the update.
- The
-
nxrTriangleMeshBeginVertexBufferUpdateFB
public static int nxrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, long outVertexCount)
Unsafe version of:TriangleMeshBeginVertexBufferUpdateFB
-
xrTriangleMeshBeginVertexBufferUpdateFB
public static int xrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, java.nio.IntBuffer outVertexCount)
Begin an update of the vertex data.C Specification
The
TriangleMeshBeginVertexBufferUpdateFBfunction is defined as:XrResult xrTriangleMeshBeginVertexBufferUpdateFB( XrTriangleMeshFB mesh, uint32_t* outVertexCount);Description
Begins an update of the vertex positions of a triangle mesh. Can only be called once the mesh topology has been set using
TriangleMeshBeginUpdateFBfollowed byTriangleMeshEndUpdateFB. The vertex count is defined by the last invocation toTriangleMeshEndUpdateFB. Once the modification is done, callTriangleMeshEndVertexBufferUpdateFBto commit the changes. Runtime must returnERROR_VALIDATION_FAILUREif an invalid count is passed. Runtime must returnERROR_VALIDATION_FAILUREif the mesh is immutable.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshBeginVertexBufferUpdateFB meshmust be a validXrTriangleMeshFBhandleoutVertexCountmust be a pointer to auint32_tvalue
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto update.outVertexCount- the current vertex count. The updated data must have the exact same number of vertices.
- The
-
xrTriangleMeshEndVertexBufferUpdateFB
public static int xrTriangleMeshEndVertexBufferUpdateFB(XrTriangleMeshFB mesh)
End an update of the vertex data.C Specification
The
TriangleMeshEndVertexBufferUpdateFBfunction is defined as:XrResult xrTriangleMeshEndVertexBufferUpdateFB( XrTriangleMeshFB mesh);Description
Signals to the runtime that the application has finished updating the vertex buffer data following a call to
TriangleMeshBeginVertexBufferUpdateFB.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to callingTriangleMeshEndVertexBufferUpdateFB meshmust be a validXrTriangleMeshFBhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
mesh- theXrTriangleMeshFBto update.
- The
-
-