Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Commit 3bd22d7

Browse files
committed
GVR Android SDK v1.120.0
1 parent 6aef4ab commit 3bd22d7

File tree

72 files changed

+8095
-6136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+8095
-6136
lines changed

Diff for: NOTICE

+4,956-5,992
Large diffs are not rendered by default.

Diff for: README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
Google VR SDK
2-
=====================
3-
Copyright (c) 2017 Google Inc. All rights reserved.
1+
# Google VR SDK for Android
42

5-
[https://developers.google.com/vr/android/get-started](https://developers.google.com/vr/android/get-started)
3+
Enables Daydream and Cardboard app development on Android.
4+
5+
Copyright (c) 2016 Google Inc. All rights reserved.
6+
7+
For updates, known issues, and upgrade instructions, see the
8+
[release-notes](//github.com/googlevr/gvr-android-sdk/releases).
9+
10+
For first time users, see the
11+
[Get Started with Google VR on Android](//developers.google.com/vr/android/get-started)
12+
guide.
613

714
Please note, we do not accept pull requests.

Diff for: apks/controller_emulator.apk

423 KB
Binary file not shown.

Diff for: build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ task clean(type: Delete) {
3333
// The dependencies for NDK builds live inside the .aar files so they need to
3434
// be extracted before NDK targets can build.
3535
task extractAudioSo(type: Copy) {
36-
from zipTree("${project.rootDir}/libraries/sdk-audio-1.101.0.aar")
36+
from zipTree("${project.rootDir}/libraries/sdk-audio-1.120.0.aar")
3737
into "${project.rootDir}/libraries/"
3838
include "jni/**/libgvr_audio.so"
3939
}
4040

4141
task extractGvrSo(type: Copy) {
42-
from zipTree("${project.rootDir}/libraries/sdk-base-1.101.0.aar")
42+
from zipTree("${project.rootDir}/libraries/sdk-base-1.120.0.aar")
4343
into "${project.rootDir}/libraries/"
4444
include "jni/**/libgvr.so"
4545
}

Diff for: libraries/headers/vr/gvr/capi/include/gvr.h

+18-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern "C" {
7676
/// gvr_clock_time_point next_vsync = AppGetNextVsyncTime();
7777
///
7878
/// const gvr_mat4f head_view =
79-
/// gvr_get_head_space_from_start_space_rotation(gvr, next_vsync);
79+
/// gvr_get_head_space_from_start_space_transform(gvr, next_vsync);
8080
/// const gvr_mat4f left_eye_view = MatrixMultiply(
8181
/// gvr_get_eye_from_head_matrix(gvr, GVR_LEFT_EYE), head_view);
8282
/// const gvr::Mat4f right_eye_view = MatrixMultiply(
@@ -499,7 +499,12 @@ int32_t gvr_buffer_viewport_get_external_surface_id(
499499
const gvr_buffer_viewport* viewport);
500500

501501
/// Sets the ID of the externally-managed Surface texture from which this
502-
/// viewport reads. The ID is issued by GvrLayout.
502+
/// viewport reads. The ID is issued by GvrLayout. If this viewport does not
503+
/// read from an external surface, this should be set to
504+
/// GVR_EXTERNAL_SURFACE_ID_NONE, which is also the default value. If it does
505+
/// read from an external surface, set this to the ID obtained from GvrLayout
506+
/// and set the source buffer index to the special value
507+
/// GVR_BUFFER_INDEX_EXTERNAL_SURFACE.
503508
///
504509
/// @param viewport The buffer viewport.
505510
/// @param external_surface_id The ID of the surface to read from.
@@ -821,6 +826,11 @@ void gvr_bind_default_framebuffer(gvr_context* gvr);
821826
/// @return The current monotonic system time.
822827
gvr_clock_time_point gvr_get_time_point_now();
823828

829+
/// @deprecated Calls to this method can be safely replaced by calls to
830+
/// gvr_get_head_space_from_start_space_transform. The new API reflects that
831+
/// the call *can* return a full 6DoF transform when supported by both the
832+
/// host platform and the client application.
833+
///
824834
/// Gets the rotation from start space to head space. The head space is a
825835
/// space where the head is at the origin and faces the -Z direction.
826836
///
@@ -836,6 +846,11 @@ gvr_mat4f gvr_get_head_space_from_start_space_rotation(
836846
/// Gets the position and rotation from start space to head space. The head
837847
/// space is a space where the head is at the origin and faces the -Z direction.
838848
///
849+
/// For platforms that support 6DoF head tracking, the app may also be required
850+
/// to declare support for 6DoF in order to receive a fully formed 6DoF pose,
851+
/// e.g., on Android, this requires declaration of support for at least version
852+
/// 1 of the "android.hardware.vr.headtracking" feature in the manifest.
853+
///
839854
/// @param gvr Pointer to the gvr instance from which to get the pose.
840855
/// @param time The time at which to get the head pose. The time should be in
841856
/// the future. If the time is not in the future, it will be clamped to now.
@@ -1032,7 +1047,7 @@ class UserPrefs : public WrapperBase<const gvr_user_prefs> {
10321047
}
10331048
};
10341049

1035-
/// Convenience C++ wrapper for gvr_user_prefs.
1050+
/// Convenience C++ wrapper for gvr_properties.
10361051
class Properties : public WrapperBase<const gvr_properties> {
10371052
public:
10381053
using WrapperBase::WrapperBase;

Diff for: libraries/headers/vr/gvr/capi/include/gvr_controller.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extern "C" {
5959
/// gvr_controller_state* state = gvr_controller_state_create();
6060
///
6161
/// // Resume:
62-
/// gvr_controller_resume(api);
62+
/// gvr_controller_resume(context);
6363
///
6464
/// Usage:
6565
///
@@ -241,7 +241,12 @@ void gvr_controller_state_update(gvr_controller_context* api,
241241
/// handedness and gaze behavior can be changed as needed in a sequence of
242242
/// frames. This needs to be called before gvr_controller_state_update() to
243243
/// apply arm model. GVR_CONTROLLER_ENABLE_ARM_MODEL flag needs to be enabled
244-
/// to apply arm model.
244+
/// to apply arm model. The controller position computed with arm model is
245+
/// relative to the head origin. If using the opt-in neck model, the effective
246+
/// eye position after using vr_apply_neck_model() is shifted forward from the
247+
/// head origin by the neck-to-eye distance (8cm) when the head is in
248+
/// neutral position, and a matching forward offset should be applied to the
249+
/// controller position to compensate.
245250
///
246251
/// When multiple controllers are configured, this arm model will be applied to
247252
/// the controller at the given controller_index, if one exists.

Diff for: libraries/headers/vr/gvr/capi/include/gvr_types.h

+52-17
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,16 @@ typedef struct gvr_frame_ gvr_frame;
198198
/// Generic flag type.
199199
typedef uint32_t gvr_flags;
200200

201+
/// Generic 64-bit flag type.
202+
typedef uint64_t gvr_flags64;
203+
201204
/// Opaque handle to a collection of properties.
202205
typedef struct gvr_properties_ gvr_properties;
203206

207+
/// Represents a Daydream Controller API object, used to invoke the
208+
/// Daydream Controller API.
209+
typedef struct gvr_controller_context_ gvr_controller_context;
210+
204211
/// A generic container for various pure value types.
205212
typedef struct gvr_value {
206213
int32_t value_type; // gvr_value_type
@@ -211,6 +218,7 @@ typedef struct gvr_value {
211218
int32_t i;
212219
int64_t i64;
213220
gvr_flags fl;
221+
gvr_flags64 fl64;
214222
gvr_sizei si;
215223
gvr_recti ri;
216224
gvr_rectf rf;
@@ -231,8 +239,8 @@ typedef struct gvr_value {
231239
/// The type of a recentering associated with a GVR_EVENT_RECENTER event.
232240
typedef enum {
233241
/// Recentering state received from the platform upon starting or resuming the
234-
/// application. This event is usually preceded in the same frame by a
235-
/// GVR_EVENT_HEAD_TRACKING_RESUMED event.
242+
/// application. This event is usually precedes a
243+
/// GVR_EVENT_HEAD_TRACKING_RESUMED event in the same frame.
236244
GVR_RECENTER_EVENT_RESTART = 1,
237245

238246
/// A recenter event triggered by the controller (e.g. long-press on Home
@@ -251,6 +259,10 @@ typedef enum {
251259
typedef struct gvr_recenter_event_data {
252260
int32_t recenter_type; // gvr_recenter_event_type
253261
gvr_flags recenter_event_flags;
262+
263+
/// The new transform that maps from "sensor" space to the recentered "start"
264+
/// space. This transform can also be retrieved by querying for the
265+
/// GVR_PROPERTY_RECENTER_TRANSFORM property.
254266
gvr_mat4f start_space_from_tracking_space_transform;
255267
} gvr_recenter_event_data;
256268

@@ -480,20 +492,37 @@ typedef enum {
480492
// Virtual stereo speakers at -30 degrees and +30 degrees.
481493
GVR_AUDIO_SURROUND_FORMAT_SURROUND_STEREO = 2,
482494

483-
// 5.1 surround sound according to the ITU-R BS 775 speaker configuration
495+
// 5.1 surround sound according to the ITU-R BS.775-3 speaker configuration
484496
// recommendation:
485-
// - Front left (FL) at 30 degrees.
486-
// - Front right (FR) at -30 degrees.
487-
// - Front center (FC) at 0 degrees.
497+
// - Left (L) at 30 degrees.
498+
// - Right (R) at -30 degrees.
499+
// - Center (C) at 0 degrees.
488500
// - Low frequency effects (LFE) at front center at 0 degrees.
489-
// - Left side (LS) at 110 degrees.
490-
// - Right side (RS) at -110 degrees.
501+
// - Left surround (LS) at 110 degrees.
502+
// - Right surround (RS) at -110 degrees.
491503
//
492-
// The 5.1 channel input layout must matches AAC: FL, FR, FC, LFE, LS, RS.
504+
// The 5.1 channel input layout must matches AAC: L, R, C, LFE, LS, RS.
493505
// Note that this differs from the Vorbis/Opus 5.1 channel layout, which
494-
// is: FL, FC, FR, LS, RS, LFE.
506+
// is: L, C, R, LS, RS, LFE.
495507
GVR_AUDIO_SURROUND_FORMAT_SURROUND_FIVE_DOT_ONE = 3,
496508

509+
// 7.1 surround sound according to the ITU-R BS.775-3 speaker configuration
510+
// recommendation:
511+
// - Left (FL) at 30 degrees.
512+
// - Right (FR) at -30 degrees.
513+
// - Center (C) at 0 degrees.
514+
// - Low frequency effects (LFE) at front center at 0 degrees.
515+
// - Left surround 1 (LS1) at 90 degrees.
516+
// - Right surround 1 (RS1) at -90 degrees.
517+
// - Left surround 2 (LS2) at 150 degrees.
518+
// - Right surround 2 (LS2) at -150 degrees.
519+
//
520+
// The 7.1 channel input layout must matches AAC: L, R, C, LFE, LS1, RS1,
521+
// LS2, RS2.
522+
// Note that this differs from the Vorbis/Opus 7.1 channel layout, which
523+
// is: L, C, R, LS1, RS1, LS2, RS2, LFE.
524+
GVR_AUDIO_SURROUND_FORMAT_SURROUND_SEVEN_DOT_ONE = 10,
525+
497526
// First-order ambisonics (AmbiX format: 4 channels, ACN channel ordering,
498527
// SN3D normalization).
499528
GVR_AUDIO_SURROUND_FORMAT_FIRST_ORDER_AMBISONICS = 4,
@@ -524,6 +553,8 @@ typedef enum {
524553
// (AmbiX format: 16 channels, ACN channel ordering, SN3D normalization).
525554
// Channel 17 to 18 contain non-diegetic stereo.
526555
GVR_AUDIO_SURROUND_FORMAT_THIRD_ORDER_AMBISONICS_WITH_NON_DIEGETIC_STEREO = 9,
556+
557+
// Note: Next available value is: 11
527558
} gvr_audio_surround_format_type;
528559

529560
/// Valid color formats for swap chain buffers.
@@ -604,7 +635,9 @@ typedef enum {
604635
/// The current transform that maps from "sensor" space to the recentered
605636
/// "start" space. Apps can optionally undo or extend this transform to
606637
/// perform custom recentering logic with the returned pose, but all poses
607-
/// supplied during frame submission are assumed to be in start space.
638+
/// supplied during frame submission are assumed to be in start space. This
639+
/// transform matches the one reported in the most
640+
/// recent gvr_recenter_event_data.
608641
/// Type: gvr_mat4f
609642
GVR_PROPERTY_RECENTER_TRANSFORM = 2,
610643

@@ -632,14 +665,14 @@ typedef enum {
632665
GVR_PROPERTY_TRACKING_STATUS = 6
633666
} gvr_property_type;
634667

635-
// Safety region types exposed from the GVR_PROPERTY_SAFETY_REGION property.
668+
/// Safety region types exposed from the GVR_PROPERTY_SAFETY_REGION property.
636669
typedef enum {
637670
GVR_SAFETY_REGION_NONE = 0,
638671

639-
// A safety region defined by a vertically-oriented cylinder, extending
640-
// infinitely along the Y axis, and centered at the start space origin.
641-
// Extents can be queried with the GVR_PROPERTY_SAFETY_CYLINDER_INNER_RADIUS
642-
// and GVR_PROPERTY_SAFETY_CYLINDER_OUTER_RADIUS property keys.
672+
/// A safety region defined by a vertically-oriented cylinder, extending
673+
/// infinitely along the Y axis, and centered at the start space origin.
674+
/// Extents can be queried with the GVR_PROPERTY_SAFETY_CYLINDER_INNER_RADIUS
675+
/// and GVR_PROPERTY_SAFETY_CYLINDER_OUTER_RADIUS property keys.
643676
GVR_SAFETY_REGION_CYLINDER = 1,
644677
} gvr_safety_region_type;
645678

@@ -679,7 +712,7 @@ typedef enum {
679712

680713
/// Notification that head tracking was resumed (or started for the first
681714
/// time). Before this event is sent, head tracking will always return the
682-
/// identity pose. This event is usually followed in the same frame by a
715+
/// identity pose. This event is usually preceded in the same frame by a
683716
/// GVR_EVENT_RECENTER of recenter_type GVR_RECENTER_EVENT_RESTART.
684717
/// Event data type: none
685718
GVR_EVENT_HEAD_TRACKING_RESUMED = 4,
@@ -917,6 +950,8 @@ const ArmModelBehavior kArmModelBehaviorFollowGaze =
917950
static_cast<ArmModelBehavior>(GVR_ARM_MODEL_FOLLOW_GAZE);
918951
const ArmModelBehavior kArmModelBehaviorSyncGaze =
919952
static_cast<ArmModelBehavior>(GVR_ARM_MODEL_SYNC_GAZE);
953+
const ArmModelBehavior kArmModelBehaviorIgnoreGaze =
954+
static_cast<ArmModelBehavior>(GVR_ARM_MODEL_IGNORE_GAZE);
920955

921956
typedef gvr_error Error;
922957
const Error kErrorNone = static_cast<Error>(GVR_ERROR_NONE);

Diff for: libraries/headers/vr/gvr/capi/include/gvr_version.h

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* Copyright 2016 Google Inc. All rights reserved.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
#ifndef VR_GVR_CAPI_INCLUDE_GVR_VERSION_H_
17+
#define VR_GVR_CAPI_INCLUDE_GVR_VERSION_H_
18+
19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
/// A string representation of the current GVR build version. This is of
24+
/// the form "MAJOR.MINOR.PATCH". Note that this may differ from the runtime
25+
/// GVR version as reported by gvr_get_version_string().
26+
#define GVR_SDK_VERSION_STRING "1.120.0"
27+
28+
/// Semantic components for the current GVR build version. Note that these
29+
/// values may differ from the runtime GVR version as reported by
30+
/// gvr_get_version().
31+
enum {
32+
GVR_SDK_MAJOR_VERSION = 1,
33+
GVR_SDK_MINOR_VERSION = 120,
34+
GVR_SDK_PATCH_VERSION = 0,
35+
};
36+
37+
#ifdef __cplusplus
38+
} // extern "C"
39+
#endif
40+
41+
#endif // VR_GVR_CAPI_INCLUDE_GVR_VERSION_H_

Diff for: libraries/sdk-audio-1.101.0.aar

-831 KB
Binary file not shown.

Diff for: libraries/sdk-audio-1.120.0.aar

834 KB
Binary file not shown.

Diff for: libraries/sdk-audio-1.101.0.pom renamed to libraries/sdk-audio-1.120.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-audio</artifactId>
7-
<version>1.101.0</version>
7+
<version>1.120.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Audio</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-base</artifactId>
2121
<type>aar</type>
22-
<version>1.101.0</version>
22+
<version>1.120.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-base-1.101.0.aar

-2.51 MB
Binary file not shown.

Diff for: libraries/sdk-base-1.120.0.aar

2.64 MB
Binary file not shown.

Diff for: libraries/sdk-base-1.101.0.pom renamed to libraries/sdk-base-1.120.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-base</artifactId>
7-
<version>1.101.0</version>
7+
<version>1.120.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Base</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-common</artifactId>
2121
<type>aar</type>
22-
<version>1.101.0</version>
22+
<version>1.120.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-common-1.101.0.aar

-696 KB
Binary file not shown.

Diff for: libraries/sdk-common-1.120.0.aar

752 KB
Binary file not shown.

Diff for: libraries/sdk-common-1.101.0.pom renamed to libraries/sdk-common-1.120.0.pom

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-common</artifactId>
7-
<version>1.101.0</version>
7+
<version>1.120.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Common</name>
Binary file not shown.

Diff for: libraries/sdk-commonwidget-1.101.0.pom renamed to libraries/sdk-commonwidget-1.120.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-commonwidget</artifactId>
7-
<version>1.101.0</version>
7+
<version>1.120.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-CommonWidget</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-common</artifactId>
2121
<type>aar</type>
22-
<version>1.101.0</version>
22+
<version>1.120.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-controller-1.101.0.aar

-9.45 KB
Binary file not shown.

Diff for: libraries/sdk-controller-1.120.0.aar

9.45 KB
Binary file not shown.

Diff for: libraries/sdk-controller-1.101.0.pom renamed to libraries/sdk-controller-1.120.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-controller</artifactId>
7-
<version>1.101.0</version>
7+
<version>1.120.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Controller</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-base</artifactId>
2121
<type>aar</type>
22-
<version>1.101.0</version>
22+
<version>1.120.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-panowidget-1.101.0.aar

-3.04 MB
Binary file not shown.

Diff for: libraries/sdk-panowidget-1.120.0.aar

3.21 MB
Binary file not shown.

0 commit comments

Comments
 (0)