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.101.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cyisrael committed Nov 7, 2017
1 parent 2b8db5b commit 6aef4ab
Show file tree
Hide file tree
Showing 37 changed files with 93 additions and 59 deletions.
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.100.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-audio-1.101.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr_audio.so"
}

task extractGvrSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-base-1.100.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-base-1.101.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr.so"
}
Expand Down
24 changes: 23 additions & 1 deletion libraries/headers/vr/gvr/capi/include/gvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,23 @@ gvr_sizei gvr_frame_get_buffer_size(const gvr_frame* frame, int32_t index);
/// submitted.
int32_t gvr_frame_get_framebuffer_object(const gvr_frame* frame, int32_t index);

/// Gets the hardware buffer backing the specified frame buffer.
///
/// Hardware buffers (Android NDK type AHardwareBuffer) are used to back frames
/// if asynchronous reprojection is enabled and GVR_FEATURE_HARDWARE_BUFFERS is
/// supported (currently on Android O and later Android versions). See the
/// documentation for the feature enum value for further information.
///
/// There is no need to acquire or release the AHardwareBuffer. The swap chain
/// maintains a reference to it while the frame is acquired.
///
/// @param frame The gvr_frame from which to obtain the buffer.
/// @param index Index of the pixel buffer.
/// @return Pointer to AHardwareBuffer backing the frame's pixel buffer where
/// available, or NULL otherwise.
AHardwareBuffer* gvr_frame_get_hardware_buffer(const gvr_frame* frame,
int32_t index);

/// Submits the frame for distortion and display on the screen. The passed
/// pointer is nulled to prevent reuse.
///
Expand Down Expand Up @@ -1273,10 +1290,15 @@ class Frame : public WrapperBase<gvr_frame> {
}

/// For more information, see gvr_frame_get_framebuffer_object().
int32_t GetFramebufferObject(int32_t index) {
int32_t GetFramebufferObject(int32_t index) const {
return gvr_frame_get_framebuffer_object(cobj(), index);
}

/// For more information, see gvr_frame_get_hardware_buffer().
void* GetHardwareBuffer(int32_t index) const {
return gvr_frame_get_hardware_buffer(cobj(), index);
}

/// For more information, see gvr_frame_submit().
void Submit(const BufferViewportList& viewport_list,
const Mat4f& head_space_from_start_space) {
Expand Down
12 changes: 12 additions & 0 deletions libraries/headers/vr/gvr/capi/include/gvr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ typedef enum {
/// Support for providing head poses with 6 degrees-of-freedom (orientation
/// and position).
GVR_FEATURE_HEAD_POSE_6DOF = 3,
/// Indicates that buffers which are part of a frame are backed by Android
/// AHardwareBuffer objects. When this feature is available, the function
/// gvr_frame_get_hardware_buffer can be called to get the AHardwareBuffer
/// pointer.
/// Hardware buffers are only supported on Android O and later, on a
/// best-effort basis. Future versions of GVR and/or Android may also cease to
/// support hardware buffers if the underlying implementation no longer
/// supports this rendering path.
GVR_FEATURE_HARDWARE_BUFFERS = 4,
} gvr_feature;

/// @}
Expand Down Expand Up @@ -682,6 +691,9 @@ typedef enum {

/// @}

// Forward declaration of Android AHardwareBuffer.
typedef struct AHardwareBuffer AHardwareBuffer;

#ifdef __cplusplus
} // extern "C"
#endif
Expand Down
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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-base-1.100.0.aar
Binary file not shown.
Binary file added libraries/sdk-base-1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-common-1.100.0.aar
Binary file not shown.
Binary file added libraries/sdk-common-1.101.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.100.0</version>
<version>1.101.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Common</name>
Expand Down
Binary file removed libraries/sdk-commonwidget-1.100.0.aar
Binary file not shown.
Binary file added libraries/sdk-commonwidget-1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-panowidget-1.100.0.aar
Binary file not shown.
Binary file added libraries/sdk-panowidget-1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-videowidget-1.100.0.aar
Binary file not shown.
Binary file added libraries/sdk-videowidget-1.101.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.100.0</version>
<version>1.101.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.100.0</version>
<version>1.101.0</version>
</dependency>
</dependencies>
</project>
10 changes: 5 additions & 5 deletions samples/ndk-controllerpaint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion = 25
buildToolsVersion = "25.0.0"
compileSdkVersion = 26
buildToolsVersion = "26.0.0"

defaultConfig.with {
applicationId = "com.google.vr.ndk.samples.controllerpaint"
Expand All @@ -15,8 +15,8 @@ model {
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-android.txt'))
minifyEnabled = true
proguardFiles.add(file('../../proguard-gvr.txt'))
}
}
android.ndk {
Expand Down Expand Up @@ -53,7 +53,7 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-base:1.100.0'
compile 'com.google.vr:sdk-base:1.101.0'
}

build.dependsOn(':extractNdk')
4 changes: 2 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="170912063"
android:versionName="1.100.0">
android:versionCode="170912043"
android:versionName="1.101.0">

<!-- The Daydream SDK requires API 24+ and OpenGL ES 3.2+. -->
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24" />
Expand Down
12 changes: 6 additions & 6 deletions samples/ndk-treasurehunt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion = 25
buildToolsVersion = "25.0.0"
compileSdkVersion = 26
buildToolsVersion = "26.0.0"

defaultConfig.with {
applicationId = "com.google.vr.ndk.samples.treasurehunt"
Expand All @@ -15,8 +15,8 @@ model {
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-android.txt'))
minifyEnabled = true
proguardFiles.add(file('../../proguard-gvr.txt'))
}
}
android.ndk {
Expand Down Expand Up @@ -54,8 +54,8 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-audio:1.100.0'
compile 'com.google.vr:sdk-base:1.100.0'
compile 'com.google.vr:sdk-audio:1.101.0'
compile 'com.google.vr:sdk-base:1.101.0'
}

build.dependsOn(':extractNdk')
4 changes: 2 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="170912063"
android:versionName="1.100.0">
android:versionCode="170912043"
android:versionName="1.101.0">

<!-- The GVR SDK requires API 19+ and OpenGL ES 2+. -->
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />
Expand Down
8 changes: 4 additions & 4 deletions samples/sdk-controllerclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.0"

defaultConfig {
minSdkVersion.apiLevel 24
Expand All @@ -37,6 +37,6 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-base:1.100.0'
compile 'com.google.vr:sdk-controller:1.100.0'
compile 'com.google.vr:sdk-base:1.101.0'
compile 'com.google.vr:sdk-controller:1.101.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="170912063"
android:versionName="1.100.0">
android:versionCode="170912043"
android:versionName="1.101.0">
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24" />
<uses-feature android:glEsVersion="0x00030002" android:required="true" />

Expand Down
6 changes: 3 additions & 3 deletions samples/sdk-simplepanowidget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.0"

defaultConfig {
minSdkVersion.apiLevel 19
Expand All @@ -37,5 +37,5 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-panowidget:1.100.0'
compile 'com.google.vr:sdk-panowidget:1.101.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="170912063"
android:versionName="1.100.0">
android:versionCode="170912043"
android:versionName="1.101.0">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

Expand Down
6 changes: 3 additions & 3 deletions samples/sdk-simplevideowidget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.0"

defaultConfig {
minSdkVersion.apiLevel 19
Expand All @@ -37,5 +37,5 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-videowidget:1.100.0'
compile 'com.google.vr:sdk-videowidget:1.101.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="170912063"
android:versionName="1.100.0">
android:versionCode="170912043"
android:versionName="1.101.0">

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Expand Down
8 changes: 4 additions & 4 deletions samples/sdk-treasurehunt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.0"

defaultConfig {
minSdkVersion.apiLevel 19
Expand All @@ -37,6 +37,6 @@ model {
}

dependencies {
compile 'com.google.vr:sdk-audio:1.100.0'
compile 'com.google.vr:sdk-base:1.100.0'
compile 'com.google.vr:sdk-audio:1.101.0'
compile 'com.google.vr:sdk-base:1.101.0'
}
Loading

0 comments on commit 6aef4ab

Please sign in to comment.