-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VisionGlass] Render Wolvic in glasses and control UI on phone screen
This is a large change because it's difficult to split it in smaller chunks as we're revamping the way Wolvic works in the VisionGlass. In general this is not a good idea but provided that we're in early stages of VisionGlass port this should be fine as there should not be regressions as the previous funtionality was quite limited. These are the main changes: * Wolvic is now rendered just in the external screen (the glasses) using Android's Presentation API. * The phone screen shows a different UI which consists on a quite minimalistic and simple UI that allows users to performs clicks on a touchpad and also a "back" button. Apart from that there are some other changes: * Fix a crash with early setControllerOrientation call * Enable WebXR by properly setting EyeResolution * Enable clicks on WebXR experiences * Use the actual FOV of the device * Improved the "wait for USB permissions" code
- Loading branch information
Showing
7 changed files
with
335 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<android.opengl.GLSurfaceView | ||
android:id="@+id/gl_view" | ||
<View | ||
android:id="@+id/touchpad" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
android:background="#333333" /> | ||
|
||
<TextView | ||
android:id="@+id/frame_rate_text" | ||
<Button | ||
android:id="@+id/back_button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="24dp" | ||
android:background="#000000" | ||
app:layout_constraintStart_toStartOf="@+id/gl_view" | ||
app:layout_constraintTop_toTopOf="@+id/gl_view" /> | ||
android:text="@string/back_button" | ||
android:drawableStart="@drawable/ic_icon_back" | ||
android:layout_alignParentBottom="true" | ||
android:layout_alignParentStart="true" /> | ||
|
||
<Button | ||
android:id="@+id/home_button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/home_tooltip" | ||
android:drawableStart="@drawable/ic_icon_home" | ||
android:layout_alignParentBottom="true" | ||
android:layout_alignParentEnd="true" | ||
android:visibility="gone"/> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</RelativeLayout> |
16 changes: 16 additions & 0 deletions
16
app/src/main/res/layout/visionglass_presentation_layout.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<android.opengl.GLSurfaceView | ||
android:id="@+id/gl_presentation_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.