diff --git a/core/IvmiScene.gd b/core/IvmiScene.gd index daabd5ee3579cc8b71b33c86f7fb6a0d3b7cec3d..6e1138617fe3aefe220fdd89a0e977b9b6d9413d 100644 --- a/core/IvmiScene.gd +++ b/core/IvmiScene.gd @@ -74,25 +74,35 @@ var _ivmi_node = load("res://addons/ivmi-builder/core/IvmiNode.gd") func _ready(): - print("Creating IvmiScene") + print("IVMI : Creating IvmiScene") _is_2D=true match _xr_mode : XRMode.OpenXr : _xr_interface = XRServer.find_interface("OpenXR") if _xr_interface and _xr_interface.initialize(): - #remove v-sync - DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED) + #DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED) get_viewport().use_xr = true - _xr_interface.play_area_changed.connect(_on_play_area_changed) + #_xr_interface.play_area_changed.connect(_on_play_area_changed) _is_2D = false - if _open_xr_passthrough : - get_viewport().transparent_bg=true - _xr_interface.start_passthrough() - else: - print("Error : Could not activate OpenXR Passthrough") print("IVMI : Initialised OpenXR Interface") + if _open_xr_passthrough : + var pt : bool = true + if _xr_interface.is_passthrough_supported(): + if !_xr_interface.start_passthrough(): + pt=false + else: + var modes = _xr_interface.get_supported_environment_blend_modes() + if _xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND in modes: + _xr_interface.set_environment_blend_mode(_xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND) + else: + pt=false + if pt : + get_viewport().transparent_bg=true + print("IVMI : Activated OpenXR Passthrough") + else: + print("Error : Could not activate OpenXR Passthrough") else: print("Error : Could not initialize OpenXR interface") XRMode.ScreenVr: @@ -237,7 +247,7 @@ func _process(delta) : _osc_to_pd.set_output(_osc_output_address, _osc_output_port) var local_addr = "127.0.0.1" for addr in IP.get_local_addresses() : - if addr!="127.0.0.1" and not ":" in addr : + if not ":" in addr : local_addr = addr _osc_to_pd.send_msg("/ivmi/hello_from_gd","sf",[local_addr, _input_port]) diff --git a/core/ivmi_scene.pd b/core/ivmi_scene.pd index 37b9757c9ded8862b33ead7d17e430a0b625b7b4..4baa00c9f5157fc6cb5889f14880d4ea693903a1 100644 Binary files a/core/ivmi_scene.pd and b/core/ivmi_scene.pd differ