Class FBRenderModel
This extension allows applications to request GLTF models for certain connected devices supported by the runtime. Paths that correspond to these devices will be provided through the extension and can be used to get information about the models as well as loading them.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsXrResult.static final StringThe extension name.static final intThe extension specification version.static final intXR_MAX_RENDER_MODEL_NAME_SIZE_FBstatic final longAPI Constantsstatic final intXrRenderModelFlagBitsFB - XrRenderModelFlagBitsFBstatic final intXrRenderModelFlagBitsFB - XrRenderModelFlagBitsFBstatic final intExtendsXrResult.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrEnumerateRenderModelPathsFB(XrSession session, int pathCapacityInput, long pathCountOutput, long paths) Unsafe version of:EnumerateRenderModelPathsFBstatic intnxrGetRenderModelPropertiesFB(XrSession session, long path, long properties) Unsafe version of:GetRenderModelPropertiesFBstatic intnxrLoadRenderModelFB(XrSession session, long info, long buffer) Unsafe version of:LoadRenderModelFBstatic intxrEnumerateRenderModelPathsFB(XrSession session, IntBuffer pathCountOutput, @Nullable XrRenderModelPathInfoFB.Buffer paths) Enumerate supported render model paths.static intxrGetRenderModelPropertiesFB(XrSession session, long path, XrRenderModelPropertiesFB properties) Get information for a render model.static intxrLoadRenderModelFB(XrSession session, XrRenderModelLoadInfoFB info, XrRenderModelBufferFB buffer) Load binary data for a render model.
-
Field Details
-
XR_FB_render_model_SPEC_VERSION
public static final int XR_FB_render_model_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_FB_RENDER_MODEL_EXTENSION_NAME
The extension name.- See Also:
-
XR_MAX_RENDER_MODEL_NAME_SIZE_FB
public static final int XR_MAX_RENDER_MODEL_NAME_SIZE_FBXR_MAX_RENDER_MODEL_NAME_SIZE_FB- See Also:
-
XR_TYPE_RENDER_MODEL_PATH_INFO_FB
public static final int XR_TYPE_RENDER_MODEL_PATH_INFO_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_RENDER_MODEL_PROPERTIES_FB
public static final int XR_TYPE_RENDER_MODEL_PROPERTIES_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_RENDER_MODEL_BUFFER_FB
public static final int XR_TYPE_RENDER_MODEL_BUFFER_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_RENDER_MODEL_LOAD_INFO_FB
public static final int XR_TYPE_RENDER_MODEL_LOAD_INFO_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SYSTEM_RENDER_MODEL_PROPERTIES_FB
public static final int XR_TYPE_SYSTEM_RENDER_MODEL_PROPERTIES_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_RENDER_MODEL_CAPABILITIES_REQUEST_FB
public static final int XR_TYPE_RENDER_MODEL_CAPABILITIES_REQUEST_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_ERROR_RENDER_MODEL_KEY_INVALID_FB
public static final int XR_ERROR_RENDER_MODEL_KEY_INVALID_FB- See Also:
-
XR_RENDER_MODEL_UNAVAILABLE_FB
public static final int XR_RENDER_MODEL_UNAVAILABLE_FB- See Also:
-
XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB
public static final int XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FBXrRenderModelFlagBitsFB - XrRenderModelFlagBitsFBFlag Descriptions
RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB— Minimal level of support. Can only contain a single mesh. Can only contain a single texture. Can not contain transparency. Assumes unlit rendering. Requires Extension KHR_texturebasisu.RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FB— All of XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB support plus: Multiple meshes. Multiple Textures. Texture Transparency.
Render Model Support Levels: An application should request a model of a certain complexity via the
XrRenderModelCapabilitiesRequestFBon the structure chain ofXrRenderModelPropertiesFBpassed intoGetRenderModelPropertiesFB. The flags on theXrRenderModelCapabilitiesRequestFBare an acknowledgement of the application’s ability to render such a model. Multiple values ofXrRenderModelFlagBitsFBcan be set on this variable to indicate acceptance of different support levels. The flags parameter on theXrRenderModelPropertiesFBwill indicate what capabilities the model in the runtime actually requires. It will be set to a single value ofXrRenderModelFlagBitsFB.- See Also:
-
XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FB
public static final int XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FBXrRenderModelFlagBitsFB - XrRenderModelFlagBitsFBFlag Descriptions
RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB— Minimal level of support. Can only contain a single mesh. Can only contain a single texture. Can not contain transparency. Assumes unlit rendering. Requires Extension KHR_texturebasisu.RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FB— All of XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB support plus: Multiple meshes. Multiple Textures. Texture Transparency.
Render Model Support Levels: An application should request a model of a certain complexity via the
XrRenderModelCapabilitiesRequestFBon the structure chain ofXrRenderModelPropertiesFBpassed intoGetRenderModelPropertiesFB. The flags on theXrRenderModelCapabilitiesRequestFBare an acknowledgement of the application’s ability to render such a model. Multiple values ofXrRenderModelFlagBitsFBcan be set on this variable to indicate acceptance of different support levels. The flags parameter on theXrRenderModelPropertiesFBwill indicate what capabilities the model in the runtime actually requires. It will be set to a single value ofXrRenderModelFlagBitsFB.- See Also:
-
XR_NULL_RENDER_MODEL_KEY_FB
public static final long XR_NULL_RENDER_MODEL_KEY_FBAPI Constants- See Also:
-
-
Method Details
-
nxrEnumerateRenderModelPathsFB
public static int nxrEnumerateRenderModelPathsFB(XrSession session, int pathCapacityInput, long pathCountOutput, long paths) Unsafe version of:EnumerateRenderModelPathsFB- Parameters:
pathCapacityInput- the capacity of thepaths, or 0 to retrieve the required capacity.
-
xrEnumerateRenderModelPathsFB
public static int xrEnumerateRenderModelPathsFB(XrSession session, IntBuffer pathCountOutput, @Nullable XrRenderModelPathInfoFB.Buffer paths) Enumerate supported render model paths.C Specification
The
EnumerateRenderModelPathsFBfunction is defined as:XrResult xrEnumerateRenderModelPathsFB( XrSession session, uint32_t pathCapacityInput, uint32_t* pathCountOutput, XrRenderModelPathInfoFB* paths);Description
The application must call
EnumerateRenderModelPathsFBto enumerate the valid render model paths that are supported by the runtime before callingGetRenderModelPropertiesFB. The paths returned may be used later inGetRenderModelPropertiesFB.Valid Usage (Implicit)
- The
XR_FB_render_modelextension must be enabled prior to callingEnumerateRenderModelPathsFB sessionmust be a validXrSessionhandlepathCountOutputmust be a pointer to auint32_tvalue- If
pathCapacityInputis not 0,pathsmust be a pointer to an array ofpathCapacityInputXrRenderModelPathInfoFBstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.pathCountOutput- a pointer to the count offloatpathswritten, or a pointer to the required capacity in the case thatpathCapacityInputis insufficient.paths- a pointer to an application-allocated array that will be filled withXrRenderModelPathInfoFBvalues that are supported by the runtime, but can beNULLifpathCapacityInputis 0
- The
-
nxrGetRenderModelPropertiesFB
Unsafe version of:GetRenderModelPropertiesFB -
xrGetRenderModelPropertiesFB
public static int xrGetRenderModelPropertiesFB(XrSession session, long path, XrRenderModelPropertiesFB properties) Get information for a render model.C Specification
The
GetRenderModelPropertiesFBfunction is defined as:XrResult xrGetRenderModelPropertiesFB( XrSession session, XrPath path, XrRenderModelPropertiesFB* properties);Description
GetRenderModelPropertiesFBis used for getting information for a render model using a path retrieved fromEnumerateRenderModelPathsFB. The information returned will be for the connected device that corresponds to the path given. For example, using pathname:/model_fb/controller/left will return information for the left controller that is currently connected and will change if a different device that also represents a left controller is connected.The runtime must return
ERROR_CALL_ORDER_INVALIDifGetRenderModelPropertiesFBis called with render model paths before callingEnumerateRenderModelPathsFB. The runtime must returnERROR_PATH_INVALIDif a path not given byEnumerateRenderModelPathsFBis used.If
GetRenderModelPropertiesFBreturns a success code ofRENDER_MODEL_UNAVAILABLE_FBand has aXrRenderModelPropertiesFB::modelKeyofNULL_RENDER_MODEL_KEY_FB, this indicates that the model for the device is unavailable. The application may keep callingGetRenderModelPropertiesFBbecause the model may become available later when a device is connected.Valid Usage (Implicit)
- The
XR_FB_render_modelextension must be enabled prior to callingGetRenderModelPropertiesFB sessionmust be a validXrSessionhandlepropertiesmust be a pointer to anXrRenderModelPropertiesFBstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.path- the path of the render model to get the properties for.properties- a pointer to theXrRenderModelPropertiesFBto write the render model information to.
- The
-
nxrLoadRenderModelFB
Unsafe version of:LoadRenderModelFB -
xrLoadRenderModelFB
public static int xrLoadRenderModelFB(XrSession session, XrRenderModelLoadInfoFB info, XrRenderModelBufferFB buffer) Load binary data for a render model.C Specification
The
LoadRenderModelFBfunction is defined as:XrResult xrLoadRenderModelFB( XrSession session, const XrRenderModelLoadInfoFB* info, XrRenderModelBufferFB* buffer);Description
LoadRenderModelFBis used to load the GLTF model data using a validXrRenderModelLoadInfoFB::modelKey.LoadRenderModelFBloads the model as a byte buffer containing the GLTF in the binary format (GLB). The GLB data must conform to the glTF 2.0 format defined at https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html. The GLB may contain texture data in a format that requires the use of theKHR_texture_basisuGLTF extension defined at https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_basisu. Therefore, the application should ensure it can handle this extension.If the device for the requested model is disconnected or does not match the
XrRenderModelLoadInfoFB::modelKeyprovided,LoadRenderModelFBmust returnRENDER_MODEL_UNAVAILABLE_FBas well as anXrRenderModelBufferFB::bufferCountOutputvalue of 0 indicating that the model was not available.The
LoadRenderModelFBfunction may be slow, therefore applications should call it from a non-time sensitive thread.Valid Usage (Implicit)
- The
XR_FB_render_modelextension must be enabled prior to callingLoadRenderModelFB sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrRenderModelLoadInfoFBstructurebuffermust be a pointer to anXrRenderModelBufferFBstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.info- a pointer to theXrRenderModelLoadInfoFBstructure.buffer- a pointer to theXrRenderModelBufferFBstructure to write the binary data into.
- The
-