Temporary workaround, `XR_SCENE_COMPUTE_FEATURE_PLANE_MESH_MSFT`. SU meshes now work :)
@@ -99,7 +99,8 @@ void world_request_update() {
XrSceneComputeFeatureMSFT features[] = {
XR_SCENE_COMPUTE_FEATURE_VISUAL_MESH_MSFT,
XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT,
- XR_SCENE_COMPUTE_FEATURE_COLLIDER_MESH_MSFT
+ XR_SCENE_COMPUTE_FEATURE_COLLIDER_MESH_MSFT,
+ XR_SCENE_COMPUTE_FEATURE_PLANE_MESH_MSFT
};
XrNewSceneComputeInfoMSFT compute_info = { XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT };
@@ -248,6 +249,7 @@ void world_load_scene_meshes(XrSceneComponentTypeMSFT type, array_t<su_mesh_inst
xr_meshes[mesh_idx].buffer_updated = components.components[i].updateTime;
xr_meshes[mesh_idx].buffer_dirty = true;
}
+ mesh_list->add(inst);
}
free(locations.locations);
@@ -276,7 +278,7 @@ bool world_init() {
///////////////////////////////////////////
void world_update() {
- if (xr_ext_available.MSFT_scene_understanding) {
+ if (!xr_ext_available.MSFT_scene_understanding) return;
if (xr_time > 0 && !xr_scene_updating && vec3_magnitude_sq(input_head()->position - xr_scene_last_center) > xr_scene_radius * xr_scene_radius) {
xr_scene_last_center = input_head()->position;
@@ -309,7 +311,6 @@ void world_update() {
} else {
}
}
- }
for (size_t i = 0; i < xr_scene_visuals.count; i++) {
render_add_mesh(xr_scene_visuals[i].mesh_ref, xr_scene_material, xr_scene_visuals[i].transform, color_hsv((i % 8) / 8.0f, 0.8f, 0.8f, 1));
