Skip to content

Commit

Permalink
Cardboard SDK v1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyunh0929 committed Feb 24, 2022
1 parent 7685b2a commit cc8b826
Show file tree
Hide file tree
Showing 7 changed files with 225 additions and 139 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.16'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
12 changes: 7 additions & 5 deletions hellocardboard-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.12.0"
versionName "1.13.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
Expand All @@ -40,11 +40,13 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
// Android Mobile Vision
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.protobuf:protobuf-javalite:3.10.0'
// TODO(b/213613345) Migrate to ML Kit.
implementation 'com.google.android.gms:play-services-vision:20.1.3'
// TODO(b/219489509): Update to 1.5.0 once b/218868656 is fixed.
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.protobuf:protobuf-javalite:3.19.4'
implementation project(":sdk")
}

Expand Down
4 changes: 2 additions & 2 deletions hellocardboard-ios/HelloCardboard-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.12.0</string>
<string>1.13.0</string>
<key>CFBundleVersion</key>
<string>1.12.0</string>
<string>1.13.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
Expand Down
14 changes: 8 additions & 6 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.12.0"
versionName "1.13.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
Expand Down Expand Up @@ -56,7 +56,7 @@ android {

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.10.0'
artifact = 'com.google.protobuf:protoc:3.19.4'
}
generateProtoTasks {
all().each { task ->
Expand All @@ -71,9 +71,11 @@ protobuf {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
// Android Mobile Vision
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.protobuf:protobuf-javalite:3.10.0'
// TODO(b/217176538) Migrate to ML Kit.
implementation 'com.google.android.gms:play-services-vision:20.1.3'
// TODO(b/219489509): Update to 1.5.0 once b/218868656 is fixed.
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.protobuf:protobuf-javalite:3.19.4'
}
34 changes: 18 additions & 16 deletions sdk/include/cardboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,8 @@ typedef struct CardboardVulkanDistortionRendererConfig {
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDevice.html).
/// Maintained by the user.
uint64_t logical_device;
/// The render pass object that would be used to bind vertex, indices and
/// descriptor set.
/// This field holds a [VkRenderPass
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPass.html).
/// Maintained by the user.
uint64_t render_pass;
/// An array of command buffer objects. The number should be the same as
/// the image count in swapchain.
/// This field holds an array of [VkCommandBuffer
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBuffer.html).
/// Maintained by the user.
uint64_t command_buffers;
/// The number of images in the swapchain.
uint32_t swapchain_image_count;
/// The width of the display area.
uint32_t image_width;
/// The height of the display area.
uint32_t image_height;
} CardboardVulkanDistortionRendererConfig;

/// Struct to set Metal distortion renderer target configuration.
Expand Down Expand Up @@ -215,6 +199,23 @@ typedef struct CardboardMetalDistortionRendererTargetConfig {

/// Struct to set Vulkan distortion renderer target.
typedef struct CardboardVulkanDistortionRendererTarget {
/// The render pass object that would be used to bind vertex, indices and
/// descriptor set.
/// This field holds a [VkRenderPass
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPass.html).
/// Maintained by the user.
uint64_t vk_render_pass;
/// The command buffer object.
/// This field holds a[VkCommandBuffer
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBuffer.html).
/// Maintained by the user and this command buffer should be started before
/// calling the rendering function.
uint64_t vk_command_buffer;
/// The frame buffer object.
/// This field holds a[VkFrameBuffer
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFrameBuffer.html).
/// Maintained by the user.
uint64_t vk_frame_buffer;
/// The queue that the command buffers will be submitted to.
/// This field holds a [VkQueue
/// value](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueue.html).
Expand Down Expand Up @@ -500,6 +501,7 @@ void CardboardDistortionRenderer_setMesh(CardboardDistortionRenderer* renderer,
/// @pre @p renderer Must not be null.
/// @pre @p left_eye Must not be null.
/// @pre @p right_eye Must not be null.
/// @pre @p renderer.command_buffer Must be started.
/// When it is unmet, a call to this function results in a no-op.
///
/// @param[in] renderer Distortion renderer object pointer.
Expand Down
3 changes: 3 additions & 0 deletions sdk/rendering/android/shaders/generate_vulkan_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generate Vulkan header files for each shader

To generate shader header files please refer to the [developer guide](https://developers.google.com/cardboard/develop/c/vulkan).
Loading

0 comments on commit cc8b826

Please sign in to comment.