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

Commit

Permalink
GVR Android SDK v1.130.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cyisrael committed Mar 1, 2018
1 parent 3bd22d7 commit 233e7fe
Show file tree
Hide file tree
Showing 49 changed files with 98 additions and 770 deletions.
706 changes: 0 additions & 706 deletions NOTICE

Large diffs are not rendered by default.

Binary file modified apks/controller_emulator.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ task clean(type: Delete) {
// The dependencies for NDK builds live inside the .aar files so they need to
// be extracted before NDK targets can build.
task extractAudioSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-audio-1.120.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-audio-1.130.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr_audio.so"
}

task extractGvrSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-base-1.120.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-base-1.130.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr.so"
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
19 changes: 15 additions & 4 deletions libraries/headers/vr/gvr/capi/include/gvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,17 @@ gvr_swap_chain* gvr_swap_chain_create(gvr_context* gvr,
const gvr_buffer_spec** buffers,
int32_t count);

/// Destroys the swap chain and nulls the pointer.
/// Destroys the swap chain and nulls the pointer that is passed in. This
/// should be called after rendering is finished to free all the buffers that
/// have been allocated in the swap chain.
///
/// @param swap_chain The swap chain to destroy.
void gvr_swap_chain_destroy(gvr_swap_chain** swap_chain);

/// Gets the number of buffers in each frame of the swap chain.
///
/// @param swap_chain The swap chain to query.
/// @return The number of buffers in the swap chain.
int32_t gvr_swap_chain_get_buffer_count(const gvr_swap_chain* swap_chain);

/// Retrieves the size of the specified pixel buffer. Note that if the buffer
Expand Down Expand Up @@ -800,6 +807,10 @@ AHardwareBuffer* gvr_frame_get_hardware_buffer(const gvr_frame* frame,
/// Submits the frame for distortion and display on the screen. The passed
/// pointer is nulled to prevent reuse.
///
/// Note: On Cardboard devices, this function makes OpenGL commands in the
/// current thread's GL context; this can affect various GL state such as
/// texture bindings, depth testing, backface culling, and blending.
///
/// @param frame The frame to submit.
/// @param list Buffer view configuration to be used for this frame.
/// @param head_space_from_start_space Transform from start space (space with
Expand Down Expand Up @@ -1457,7 +1468,7 @@ class GvrApi {
if (!context) {
return nullptr;
}
return std::unique_ptr<GvrApi>(new GvrApi(context, true /* owned */));
return std::unique_ptr<GvrApi>(new GvrApi(context, /*owned=*/true));
}
#else
/// Instantiates and returns a GvrApi instance that owns a gvr_context.
Expand All @@ -1468,7 +1479,7 @@ class GvrApi {
if (!context) {
return nullptr;
}
return std::unique_ptr<GvrApi>(new GvrApi(context, true /* owned */));
return std::unique_ptr<GvrApi>(new GvrApi(context, /*owned=*/true));
}
#endif // #ifdef __ANDROID__

Expand Down Expand Up @@ -1699,7 +1710,7 @@ class GvrApi {
/// @param context Pointer to a non-null, non-owned gvr_context instance.
/// @return unique_ptr to the created GvrApi instance. Never null.
static std::unique_ptr<GvrApi> WrapNonOwned(gvr_context* context) {
return std::unique_ptr<GvrApi>(new GvrApi(context, false /* owned */));
return std::unique_ptr<GvrApi>(new GvrApi(context, /*owned=*/false));
}
/// @}

Expand Down
2 changes: 1 addition & 1 deletion libraries/headers/vr/gvr/capi/include/gvr_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ extern "C" {
/// position_x,
/// position_y,
/// position_z);
/// gvr_audio_api->PlaySound(source_id, true /* looped playback */);
/// gvr_audio_api->PlaySound(source_id, /*looped playback=*/true);
///

/// @{
Expand Down
7 changes: 5 additions & 2 deletions libraries/headers/vr/gvr/capi/include/gvr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,13 @@ typedef enum {
GVR_CONTROLLER_BUTTON_APP = 3,
GVR_CONTROLLER_BUTTON_VOLUME_UP = 4,
GVR_CONTROLLER_BUTTON_VOLUME_DOWN = 5,
GVR_CONTROLLER_BUTTON_RESERVED0 = 6,
GVR_CONTROLLER_BUTTON_RESERVED1 = 7,
GVR_CONTROLLER_BUTTON_RESERVED2 = 8,

/// Note: there are 5 buttons on the controller, but the state arrays have
/// Note: there are 8 buttons on the controller, but the state arrays have
/// this many elements due to the inclusion of a dummy "none" button.
GVR_CONTROLLER_BUTTON_COUNT = 6,
GVR_CONTROLLER_BUTTON_COUNT = 9,
} gvr_controller_button;

/// Controller battery states.
Expand Down
4 changes: 2 additions & 2 deletions libraries/headers/vr/gvr/capi/include/gvr_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ extern "C" {
/// A string representation of the current GVR build version. This is of
/// the form "MAJOR.MINOR.PATCH". Note that this may differ from the runtime
/// GVR version as reported by gvr_get_version_string().
#define GVR_SDK_VERSION_STRING "1.120.0"
#define GVR_SDK_VERSION_STRING "1.130.0"

/// Semantic components for the current GVR build version. Note that these
/// values may differ from the runtime GVR version as reported by
/// gvr_get_version().
enum {
GVR_SDK_MAJOR_VERSION = 1,
GVR_SDK_MINOR_VERSION = 120,
GVR_SDK_MINOR_VERSION = 130,
GVR_SDK_PATCH_VERSION = 0,
};

Expand Down
Binary file removed libraries/sdk-audio-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-audio-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-audio</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Audio</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-base-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-base-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Base</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-common-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-common-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Common</name>
Expand Down
Binary file removed libraries/sdk-commonwidget-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-commonwidget-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-controller</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Controller</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-panowidget-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-panowidget-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-panowidget</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-videowidget-1.120.0.aar
Binary file not shown.
Binary file added libraries/sdk-videowidget-1.130.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-videowidget</artifactId>
<version>1.120.0</version>
<version>1.130.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand Down Expand Up @@ -32,7 +32,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<type>aar</type>
<version>1.120.0</version>
<version>1.130.0</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion samples/ndk-controllerpaint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-base:1.120.0'
compile 'com.google.vr:sdk-base:1.130.0'
}

build.dependsOn(':extractNdk')
11 changes: 9 additions & 2 deletions samples/ndk-controllerpaint/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.ndk.samples.controllerpaint"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">

<!-- The Daydream SDK requires API 24+ and OpenGL ES 3.2+. -->
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24" />
Expand All @@ -21,6 +21,13 @@
For a Cardboard-compatible app, this should be android:required="false" -->
<uses-feature android:name="android.hardware.vr.high_performance" android:required="true"/>

<!-- Indicates support for 6DoF headtracking (version 1). This is required to receive 6DoF
poses through the new 6DoF head tracking API, and will implicitly enable 6DoF poses through
the (legacy) 3DoF head tracking API. -->
<uses-feature android:name="android.hardware.vr.headtracking"
android:version="1"
android:required="false" />

<!-- NOTE: even though the controller is a bluetooth device, you do NOT need
to add bluetooth permissions to your app, because the controller is handled
directly by the Google VR Services layer. -->
Expand Down
4 changes: 2 additions & 2 deletions samples/ndk-treasurehunt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-audio:1.120.0'
compile 'com.google.vr:sdk-base:1.120.0'
compile 'com.google.vr:sdk-audio:1.130.0'
compile 'com.google.vr:sdk-base:1.130.0'
}

build.dependsOn(':extractNdk')
11 changes: 9 additions & 2 deletions samples/ndk-treasurehunt/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.ndk.samples.treasurehunt"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">

<!-- The GVR SDK requires API 19+ and OpenGL ES 2+. -->
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />
Expand All @@ -22,6 +22,13 @@
<!-- Indicates use of VR features that are available only on Daydream-ready devices. -->
<uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>

<!-- Indicates support for 6DoF head tracking (version 1). This is required to receive 6DoF
poses through the new 6DoF head tracking API, and will implicitly enable 6DoF poses through
the (legacy) 3DoF head tracking API. -->
<uses-feature android:name="android.hardware.vr.headtracking"
android:version="1"
android:required="false" />

<application
android:allowBackup="true"
android:label="MainActivity"
Expand Down
4 changes: 2 additions & 2 deletions samples/sdk-controllerclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-base:1.120.0'
compile 'com.google.vr:sdk-controller:1.120.0'
compile 'com.google.vr:sdk-base:1.130.0'
compile 'com.google.vr:sdk-controller:1.130.0'
}
4 changes: 2 additions & 2 deletions samples/sdk-controllerclient/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.sdk.samples.controllerclient"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24" />
<uses-feature android:glEsVersion="0x00030002" android:required="true" />

Expand Down
2 changes: 1 addition & 1 deletion samples/sdk-simplepanowidget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-panowidget:1.120.0'
compile 'com.google.vr:sdk-panowidget:1.130.0'
}
4 changes: 2 additions & 2 deletions samples/sdk-simplepanowidget/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.sdk.samples.simplepanowidget"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

Expand Down
2 changes: 1 addition & 1 deletion samples/sdk-simplevideowidget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-videowidget:1.120.0'
compile 'com.google.vr:sdk-videowidget:1.130.0'
}
4 changes: 2 additions & 2 deletions samples/sdk-simplevideowidget/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.sdk.samples.simplevideowidget"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Expand Down
4 changes: 2 additions & 2 deletions samples/sdk-treasurehunt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-audio:1.120.0'
compile 'com.google.vr:sdk-base:1.120.0'
compile 'com.google.vr:sdk-audio:1.130.0'
compile 'com.google.vr:sdk-base:1.130.0'
}
4 changes: 2 additions & 2 deletions samples/sdk-treasurehunt/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.sdk.samples.treasurehunt"
android:versionCode="171114033"
android:versionName="1.120.0">
android:versionCode="180130033"
android:versionName="1.130.0">

<!-- The GVR SDK requires API 19+ and OpenGL ES 2+. -->
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ private String readRawTextFile(int resId) {
reader.close();
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
Log.e(TAG, "Failed to load text file: " + e);
}
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions samples/sdk-video360/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ model {

dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.vr:sdk-base:1.120.0'
compile 'com.google.vr:sdk-controller:1.120.0'
compile 'com.google.vr:sdk-base:1.130.0'
compile 'com.google.vr:sdk-controller:1.130.0'
}
Loading

0 comments on commit 233e7fe

Please sign in to comment.