Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class MSFTSceneUnderstandingSerialization

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

The XR_MSFT_scene_understanding_serialization extension.

This extension extends the scene understanding extension and enables scenes to be serialized or deserialized. It enables computing a new scene into a serialized binary stream and it enables deserializing a binary stream into an XrSceneMSFT handle.

Field Summary

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

The extension specification version.

public static final int
public static final int
XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFT

Extends XrSceneComputeFeatureMSFT.

public static final int
XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT

Extends XrStructureType.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, long deserializeInfo)

Unsafe version of: DeserializeSceneMSFT

public static int
nxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, long getInfo, int
the number of bytes that should be read.
countInput
,
long readOutput, long buffer)

Unsafe version of: GetSerializedSceneFragmentDataMSFT

public static int
xrDeserializeSceneMSFT(XrSceneObserverMSFT
a handle to an XrSceneObserverMSFT previously created with CreateSceneObserverMSFT.
sceneObserver
,
XrSceneDeserializeInfoMSFT
a pointer to an XrSceneDeserializeInfoMSFT structure.
deserializeInfo
)

Deserialize scene.

public static int
xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT
the XrSceneMSFT handle to read from.
scene
,
XrSerializedSceneFragmentDataGetInfoMSFT
a pointer to an XrSerializedSceneFragmentDataGetInfoMSFT structure.
getInfo
,
IntBuffer
the number of bytes read.
readOutput
,
ByteBuffer
a pointer to the buffer where the data should be copied.
buffer
)

Get serialized scene fragment data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_MSFT_SCENE_UNDERSTANDING_SERIALIZATION_EXTENSION_NAMEback to summary
public static final String XR_MSFT_SCENE_UNDERSTANDING_SERIALIZATION_EXTENSION_NAME

The extension name.

XR_MSFT_scene_understanding_serialization_SPEC_VERSIONback to summary
public static final int XR_MSFT_scene_understanding_serialization_SPEC_VERSION

The extension specification version.

XR_SCENE_COMPONENT_TYPE_SERIALIZED_SCENE_FRAGMENT_MSFTback to summary
public static final int XR_SCENE_COMPONENT_TYPE_SERIALIZED_SCENE_FRAGMENT_MSFT

Extends XrSceneComponentTypeMSFT.

XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFTback to summary
public static final int XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFT

Extends XrSceneComputeFeatureMSFT.

XR_TYPE_SCENE_DESERIALIZE_INFO_MSFTback to summary
public static final int XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFTback to summary
public static final int XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT

Extends XrStructureType.

Enum values:

Constructor Detail

MSFTSceneUnderstandingSerializationback to summary
protected MSFTSceneUnderstandingSerialization()

Method Detail

nxrDeserializeSceneMSFTback to summary
public static int nxrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, long deserializeInfo)

Unsafe version of: DeserializeSceneMSFT

nxrGetSerializedSceneFragmentDataMSFTback to summary
public static int nxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, long getInfo, int countInput, long readOutput, long buffer)

Unsafe version of: GetSerializedSceneFragmentDataMSFT

Parameters
countInput:int

the number of bytes that should be read.

xrDeserializeSceneMSFTback to summary
public static int xrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, XrSceneDeserializeInfoMSFT deserializeInfo)

Deserialize scene.

C Specification

The DeserializeSceneMSFT function is defined as:


XrResult xrDeserializeSceneMSFT(
    XrSceneObserverMSFT                         sceneObserver,
    const XrSceneDeserializeInfoMSFT*           deserializeInfo);
Description

The DeserializeSceneMSFT function begins deserializing a list of serialized scene fragments. The runtime must return quickly without waiting for the deserialization to complete. The application should use GetSceneComputeStateMSFT to inspect the completeness of the deserialization.

The runtime must return ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT if DeserializeSceneMSFT is called while the scene computation is in progress.

The GetSceneComputeStateMSFT function must return SCENE_COMPUTE_STATE_UPDATING_MSFT while the deserialization is in progress, and SCENE_COMPUTE_STATE_COMPLETED_MSFT when the deserialization has completed successfully. If the runtime fails to deserialize the binary stream, GetSceneComputeStateMSFT must return SCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT to indicate that the deserialization has completed but an error occurred.

When GetSceneComputeStateMSFT returns SCENE_COMPUTE_STATE_COMPLETED_MSFT, the application may call CreateSceneMSFT to create the XrSceneMSFT handle. If CreateSceneMSFT is called while GetSceneComputeStateMSFT returns SCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT, a valid XrSceneMSFT handle must be returned, but that handle must contain zero scene components.

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

XrSceneDeserializeInfoMSFT

Parameters
sceneObserver:XrSceneObserverMSFT

a handle to an XrSceneObserverMSFT previously created with CreateSceneObserverMSFT.

deserializeInfo:XrSceneDeserializeInfoMSFT

a pointer to an XrSceneDeserializeInfoMSFT structure.

Annotations
@NativeType:XrResult
xrGetSerializedSceneFragmentDataMSFTback to summary
public static int xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, XrSerializedSceneFragmentDataGetInfoMSFT getInfo, IntBuffer readOutput, ByteBuffer buffer)

Get serialized scene fragment data.

C Specification

The application can call the GetSerializedSceneFragmentDataMSFT function to read the binary data of a serialized scene fragment from the XrSceneMSFT handle. This function follows the two-call idiom for filling the buffer.

The GetSerializedSceneFragmentDataMSFT function is defined as:


XrResult xrGetSerializedSceneFragmentDataMSFT(
    XrSceneMSFT                                 scene,
    const XrSerializedSceneFragmentDataGetInfoMSFT* getInfo,
    uint32_t                                    countInput,
    uint32_t*                                   readOutput,
    uint8_t*                                    buffer);
Description

The runtime must return ERROR_SCENE_COMPONENT_ID_INVALID_MSFT if the given scene fragment XrUuidMSFT was not found.

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

XrSerializedSceneFragmentDataGetInfoMSFT

Parameters
scene:XrSceneMSFT

the XrSceneMSFT handle to read from.

getInfo:XrSerializedSceneFragmentDataGetInfoMSFT

a pointer to an XrSerializedSceneFragmentDataGetInfoMSFT structure.

readOutput:IntBuffer

the number of bytes read.

buffer:ByteBuffer

a pointer to the buffer where the data should be copied.

Annotations
@NativeType:XrResult