Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class FBRenderModel

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

The XR_FB_render_model extension.

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

Modifier and TypeField and Description
public static final int
public static final String
public static final int
XR_FB_render_model_SPEC_VERSION

The extension specification version.

public static final int
XR_MAX_RENDER_MODEL_NAME_SIZE_FB

XR_MAX_RENDER_MODEL_NAME_SIZE_FB

public static final long
public static final int
XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB

XrRenderModelFlagBitsFB - XrRenderModelFlagBitsFB Flag Descriptions

public static final int
XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FB

XrRenderModelFlagBitsFB - XrRenderModelFlagBitsFB Flag Descriptions

public static final int
public static final int
XR_TYPE_RENDER_MODEL_BUFFER_FB

Extends XrStructureType.

public static final int
public static final int
XR_TYPE_RENDER_MODEL_LOAD_INFO_FB

Extends XrStructureType.

public static final int
XR_TYPE_RENDER_MODEL_PATH_INFO_FB

Extends XrStructureType.

public static final int
XR_TYPE_RENDER_MODEL_PROPERTIES_FB

Extends XrStructureType.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrEnumerateRenderModelPathsFB(XrSession session, int
the capacity of the paths, or 0 to retrieve the required capacity.
pathCapacityInput
,
long pathCountOutput, long paths)

Unsafe version of: EnumerateRenderModelPathsFB

public static int
nxrGetRenderModelPropertiesFB(XrSession session, long path, long properties)

Unsafe version of: GetRenderModelPropertiesFB

public static int
nxrLoadRenderModelFB(XrSession session, long info, long buffer)

Unsafe version of: LoadRenderModelFB

public static int
xrEnumerateRenderModelPathsFB(XrSession
the specified XrSession.
session
,
IntBuffer
a pointer to the count of float paths written, or a pointer to the required capacity in the case that pathCapacityInput is insufficient.
pathCountOutput
,
XrRenderModelPathInfoFB.Buffer
a pointer to an application-allocated array that will be filled with XrRenderModelPathInfoFB values that are supported by the runtime, but can be NULL if pathCapacityInput is 0
paths
)

Enumerate supported render model paths.

public static int
xrGetRenderModelPropertiesFB(XrSession
the specified XrSession.
session
,
long
the path of the render model to get the properties for.
path
,
XrRenderModelPropertiesFB
a pointer to the XrRenderModelPropertiesFB to write the render model information to.
properties
)

Get information for a render model.

public static int
xrLoadRenderModelFB(XrSession
the specified XrSession.
session
,
XrRenderModelLoadInfoFB
a pointer to the XrRenderModelLoadInfoFB structure.
info
,
XrRenderModelBufferFB
a pointer to the XrRenderModelBufferFB structure to write the binary data into.
buffer
)

Load binary data for a render model.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_ERROR_RENDER_MODEL_KEY_INVALID_FBback to summary
public static final int XR_ERROR_RENDER_MODEL_KEY_INVALID_FB

Extends XrResult.

Enum values:
XR_FB_RENDER_MODEL_EXTENSION_NAMEback to summary
public static final String XR_FB_RENDER_MODEL_EXTENSION_NAME

The extension name.

XR_FB_render_model_SPEC_VERSIONback to summary
public static final int XR_FB_render_model_SPEC_VERSION

The extension specification version.

XR_MAX_RENDER_MODEL_NAME_SIZE_FBback to summary
public static final int XR_MAX_RENDER_MODEL_NAME_SIZE_FB

XR_MAX_RENDER_MODEL_NAME_SIZE_FB

XR_NULL_RENDER_MODEL_KEY_FBback to summary
public static final long XR_NULL_RENDER_MODEL_KEY_FB

API Constants

XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FBback to summary
public static final int XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_1_BIT_FB

XrRenderModelFlagBitsFB - XrRenderModelFlagBitsFB

Flag Descriptions

Render Model Support Levels: An application should request a model of a certain complexity via the XrRenderModelCapabilitiesRequestFB on the structure chain of XrRenderModelPropertiesFB passed into GetRenderModelPropertiesFB. The flags on the XrRenderModelCapabilitiesRequestFB are an acknowledgement of the application’s ability to render such a model. Multiple values of XrRenderModelFlagBitsFB can be set on this variable to indicate acceptance of different support levels. The flags parameter on the XrRenderModelPropertiesFB will indicate what capabilities the model in the runtime actually requires. It will be set to a single value of XrRenderModelFlagBitsFB.

XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FBback to summary
public static final int XR_RENDER_MODEL_SUPPORTS_GLTF_2_0_SUBSET_2_BIT_FB

XrRenderModelFlagBitsFB - XrRenderModelFlagBitsFB

Flag Descriptions

Render Model Support Levels: An application should request a model of a certain complexity via the XrRenderModelCapabilitiesRequestFB on the structure chain of XrRenderModelPropertiesFB passed into GetRenderModelPropertiesFB. The flags on the XrRenderModelCapabilitiesRequestFB are an acknowledgement of the application’s ability to render such a model. Multiple values of XrRenderModelFlagBitsFB can be set on this variable to indicate acceptance of different support levels. The flags parameter on the XrRenderModelPropertiesFB will indicate what capabilities the model in the runtime actually requires. It will be set to a single value of XrRenderModelFlagBitsFB.

XR_RENDER_MODEL_UNAVAILABLE_FBback to summary
public static final int XR_RENDER_MODEL_UNAVAILABLE_FB

Extends XrResult.

Enum values:
XR_TYPE_RENDER_MODEL_BUFFER_FBback to summary
public static final int XR_TYPE_RENDER_MODEL_BUFFER_FB

Extends XrStructureType.

Enum values:
XR_TYPE_RENDER_MODEL_CAPABILITIES_REQUEST_FBback to summary
public static final int XR_TYPE_RENDER_MODEL_CAPABILITIES_REQUEST_FB

Extends XrStructureType.

Enum values:
XR_TYPE_RENDER_MODEL_LOAD_INFO_FBback to summary
public static final int XR_TYPE_RENDER_MODEL_LOAD_INFO_FB

Extends XrStructureType.

Enum values:
XR_TYPE_RENDER_MODEL_PATH_INFO_FBback to summary
public static final int XR_TYPE_RENDER_MODEL_PATH_INFO_FB

Extends XrStructureType.

Enum values:
XR_TYPE_RENDER_MODEL_PROPERTIES_FBback to summary
public static final int XR_TYPE_RENDER_MODEL_PROPERTIES_FB

Extends XrStructureType.

Enum values:
XR_TYPE_SYSTEM_RENDER_MODEL_PROPERTIES_FBback to summary
public static final int XR_TYPE_SYSTEM_RENDER_MODEL_PROPERTIES_FB

Extends XrStructureType.

Enum values:

Constructor Detail

FBRenderModelback to summary
protected FBRenderModel()

Method Detail

nxrEnumerateRenderModelPathsFBback to summary
public static int nxrEnumerateRenderModelPathsFB(XrSession session, int pathCapacityInput, long pathCountOutput, long paths)

Unsafe version of: EnumerateRenderModelPathsFB

Parameters
pathCapacityInput:int

the capacity of the paths, or 0 to retrieve the required capacity.

nxrGetRenderModelPropertiesFBback to summary
public static int nxrGetRenderModelPropertiesFB(XrSession session, long path, long properties)

Unsafe version of: GetRenderModelPropertiesFB

nxrLoadRenderModelFBback to summary
public static int nxrLoadRenderModelFB(XrSession session, long info, long buffer)

Unsafe version of: LoadRenderModelFB

xrEnumerateRenderModelPathsFBback to summary
public static int xrEnumerateRenderModelPathsFB(XrSession session, IntBuffer pathCountOutput, XrRenderModelPathInfoFB.Buffer paths)

Enumerate supported render model paths.

C Specification

The EnumerateRenderModelPathsFB function is defined as:


XrResult xrEnumerateRenderModelPathsFB(
    XrSession                                   session,
    uint32_t                                    pathCapacityInput,
    uint32_t*                                   pathCountOutput,
    XrRenderModelPathInfoFB*                    paths);
Description

The application must call EnumerateRenderModelPathsFB to enumerate the valid render model paths that are supported by the runtime before calling GetRenderModelPropertiesFB. The paths returned may be used later in GetRenderModelPropertiesFB.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrRenderModelPathInfoFB

Parameters
session:XrSession

the specified XrSession.

pathCountOutput:IntBuffer

a pointer to the count of float paths written, or a pointer to the required capacity in the case that pathCapacityInput is insufficient.

paths:XrRenderModelPathInfoFB.Buffer

a pointer to an application-allocated array that will be filled with XrRenderModelPathInfoFB values that are supported by the runtime, but can be NULL if pathCapacityInput is 0

Annotations
@NativeType:XrResult
xrGetRenderModelPropertiesFBback to summary
public static int xrGetRenderModelPropertiesFB(XrSession session, long path, XrRenderModelPropertiesFB properties)

Get information for a render model.

C Specification

The GetRenderModelPropertiesFB function is defined as:


XrResult xrGetRenderModelPropertiesFB(
    XrSession                                   session,
    XrPath                                      path,
    XrRenderModelPropertiesFB*                  properties);
Description

GetRenderModelPropertiesFB is used for getting information for a render model using a path retrieved from EnumerateRenderModelPathsFB. 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_INVALID if GetRenderModelPropertiesFB is called with render model paths before calling EnumerateRenderModelPathsFB. The runtime must return ERROR_PATH_INVALID if a path not given by EnumerateRenderModelPathsFB is used.

If GetRenderModelPropertiesFB returns a success code of RENDER_MODEL_UNAVAILABLE_FB and has a modelKey of NULL_RENDER_MODEL_KEY_FB, this indicates that the model for the device is unavailable. The application may keep calling GetRenderModelPropertiesFB because the model may become available later when a device is connected.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrRenderModelPropertiesFB

Parameters
session:XrSession

the specified XrSession.

path:long

the path of the render model to get the properties for.

properties:XrRenderModelPropertiesFB

a pointer to the XrRenderModelPropertiesFB to write the render model information to.

Annotations
@NativeType:XrResult
xrLoadRenderModelFBback to summary
public static int xrLoadRenderModelFB(XrSession session, XrRenderModelLoadInfoFB info, XrRenderModelBufferFB buffer)

Load binary data for a render model.

C Specification

The LoadRenderModelFB function is defined as:


XrResult xrLoadRenderModelFB(
    XrSession                                   session,
    const XrRenderModelLoadInfoFB*              info,
    XrRenderModelBufferFB*                      buffer);
Description

LoadRenderModelFB is used to load the GLTF model data using a valid modelKey. LoadRenderModelFB loads 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 {uri-fb-gltf2} The GLB may contain texture data in a format that requires the use of the KHR_texture_basisu GLTF extension defined at {uri-fb-gltf2-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 modelKey provided, LoadRenderModelFB must return RENDER_MODEL_UNAVAILABLE_FB as well as a bufferCountOutput value of 0 indicating that the model was not available.

The LoadRenderModelFB function may be slow, therefore applications should call it from a non-time sensitive thread.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrRenderModelBufferFB, XrRenderModelLoadInfoFB

Parameters
session:XrSession

the specified XrSession.

info:XrRenderModelLoadInfoFB

a pointer to the XrRenderModelLoadInfoFB structure.

buffer:XrRenderModelBufferFB

a pointer to the XrRenderModelBufferFB structure to write the binary data into.

Annotations
@NativeType:XrResult