Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ivmi-Builder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damien Marchal
Ivmi-Builder
Commits
2a4a8f0c
Commit
2a4a8f0c
authored
1 year ago
by
Vincent Reynaert
Browse files
Options
Downloads
Patches
Plain Diff
Fixed to OpenXR passthrough
parent
eab7b69a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/IvmiScene.gd
+20
-10
20 additions, 10 deletions
core/IvmiScene.gd
core/ivmi_scene.pd
+0
-0
0 additions, 0 deletions
core/ivmi_scene.pd
with
20 additions
and
10 deletions
core/IvmiScene.gd
+
20
−
10
View file @
2a4a8f0c
...
...
@@ -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
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
_xr_interface
.
start_p
assthrough
(
)
print
(
"IVMI : Activated OpenXR P
assthrough
"
)
else
:
print
(
"Error : Could not activate OpenXR Passthrough"
)
print
(
"IVMI : Initialised OpenXR Interface"
)
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
])
...
...
This diff is collapsed.
Click to expand it.
core/ivmi_scene.pd
+48 B (+1%)
View file @
2a4a8f0c
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment