From 61508d016b3de543cb981508dbafe3b320b2bf07 Mon Sep 17 00:00:00 2001 From: Joseph Dibble Date: Wed, 5 Jul 2023 20:44:18 +0000 Subject: [PATCH] ARCore Android SDK v1.38.0 --- libraries/include/arcore_c_api.h | 6 +-- samples/augmented_faces_java/app/build.gradle | 2 +- samples/augmented_image_c/app/build.gradle | 4 +- samples/augmented_image_java/app/build.gradle | 2 +- samples/cloud_anchor_java/app/build.gradle | 2 +- samples/computervision_c/app/build.gradle | 4 +- samples/computervision_java/app/build.gradle | 2 +- samples/geospatial_java/app/build.gradle | 2 +- samples/hardwarebuffer_c/app/build.gradle | 4 +- samples/hardwarebuffer_java/app/build.gradle | 4 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ samples/hello_ar_c/app/build.gradle | 4 +- samples/hello_ar_java/app/build.gradle | 2 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ .../java/helloar/HelloArActivity.java | 46 +++++++++++-------- samples/hello_ar_kotlin/app/build.gradle | 2 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ samples/hello_ar_vulkan_c/app/build.gradle | 4 +- .../app/src/main/cpp/vulkan_handler.cc | 4 +- samples/hello_eis_kotlin/app/build.gradle | 2 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ samples/ml_kotlin/app/build.gradle | 2 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ .../app/build.gradle | 2 +- samples/raw_depth_java/app/build.gradle | 2 +- .../recording_playback_java/app/build.gradle | 2 +- samples/semantics_java/app/build.gradle | 2 +- .../assets/shaders/streetscape_geometry.frag | 22 --------- .../assets/shaders/streetscape_geometry.vert | 29 ------------ samples/shared_camera_java/app/build.gradle | 2 +- 35 files changed, 59 insertions(+), 355 deletions(-) delete mode 100644 samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.vert delete mode 100644 samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.vert delete mode 100644 samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert delete mode 100644 samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert delete mode 100644 samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert delete mode 100644 samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.frag delete mode 100644 samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.vert diff --git a/libraries/include/arcore_c_api.h b/libraries/include/arcore_c_api.h index 05b3a3670..cf27e2df5 100644 --- a/libraries/include/arcore_c_api.h +++ b/libraries/include/arcore_c_api.h @@ -95,6 +95,7 @@ /// Note: There is no runtime checking that casts are correct. When downcasting /// @c ::ArTrackable, call @c ::ArTrackable_getType beforehand to figure out the /// correct cast. +#endif // __cplusplus /// @defgroup ArAnchor ArAnchor /// Describes a fixed location and orientation in the real world, representing @@ -107,7 +108,6 @@ /// Augmented Faces supports front-facing (selfie) camera only, and does not /// support attaching anchors nor raycast hit testing. Calling /// @c ::ArTrackable_acquireNewAnchor will return @c #AR_ERROR_ILLEGAL_STATE. -#endif // __cplusplus /// @defgroup ArAugmentedImage ArAugmentedImage /// An image being detected and tracked by ARCore. @@ -265,7 +265,7 @@ /// ::ArEarth_getCameraGeospatialPose. /// -/// @defgroup ArSemantics ArSemantics +/// @defgroup ArSemanticLabel ArSemanticLabel /// Scene Semantics API. See the /// Scene /// Semantics Developer Guide for more information. @@ -1480,7 +1480,7 @@ AR_DEFINE_ENUM(ArSemanticMode){ AR_SEMANTIC_MODE_ENABLED = 1, }; -/// @ingroup ArSemantics +/// @ingroup ArSemanticLabel /// Defines the labels the Scene Semantics API is able to detect and maps /// human-readable names to per-pixel semantic labels. See the /// Scene diff --git a/samples/augmented_faces_java/app/build.gradle b/samples/augmented_faces_java/app/build.gradle index eff192029..091a01ddf 100644 --- a/samples/augmented_faces_java/app/build.gradle +++ b/samples/augmented_faces_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/augmented_image_c/app/build.gradle b/samples/augmented_image_c/app/build.gradle index 208f7a8a1..0ef7e8156 100644 --- a/samples/augmented_image_c/app/build.gradle +++ b/samples/augmented_image_c/app/build.gradle @@ -68,8 +68,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' diff --git a/samples/augmented_image_java/app/build.gradle b/samples/augmented_image_java/app/build.gradle index 7ca627bd6..32e6e7319 100644 --- a/samples/augmented_image_java/app/build.gradle +++ b/samples/augmented_image_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/cloud_anchor_java/app/build.gradle b/samples/cloud_anchor_java/app/build.gradle index 40057b720..ff13b4377 100644 --- a/samples/cloud_anchor_java/app/build.gradle +++ b/samples/cloud_anchor_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/computervision_c/app/build.gradle b/samples/computervision_c/app/build.gradle index 2d1f75bac..378fe0b7d 100644 --- a/samples/computervision_c/app/build.gradle +++ b/samples/computervision_c/app/build.gradle @@ -68,8 +68,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' diff --git a/samples/computervision_java/app/build.gradle b/samples/computervision_java/app/build.gradle index 408e738d9..2acb9a178 100644 --- a/samples/computervision_java/app/build.gradle +++ b/samples/computervision_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/geospatial_java/app/build.gradle b/samples/geospatial_java/app/build.gradle index 764657ac0..7b1bd0b73 100644 --- a/samples/geospatial_java/app/build.gradle +++ b/samples/geospatial_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' implementation 'com.google.android.gms:play-services-location:19.0.1' implementation 'com.google.android.gms:play-services-auth:19.0.0' diff --git a/samples/hardwarebuffer_c/app/build.gradle b/samples/hardwarebuffer_c/app/build.gradle index 5d69ca292..ce7a88105 100644 --- a/samples/hardwarebuffer_c/app/build.gradle +++ b/samples/hardwarebuffer_c/app/build.gradle @@ -70,8 +70,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' diff --git a/samples/hardwarebuffer_java/app/build.gradle b/samples/hardwarebuffer_java/app/build.gradle index 63dede607..f124f702d 100644 --- a/samples/hardwarebuffer_java/app/build.gradle +++ b/samples/hardwarebuffer_java/app/build.gradle @@ -66,8 +66,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/hardwarebuffer_java/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/hello_ar_c/app/build.gradle b/samples/hello_ar_c/app/build.gradle index 78f9843d0..4d24d4792 100644 --- a/samples/hello_ar_c/app/build.gradle +++ b/samples/hello_ar_c/app/build.gradle @@ -68,8 +68,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' diff --git a/samples/hello_ar_java/app/build.gradle b/samples/hello_ar_java/app/build.gradle index a33f13129..4d5c4a852 100644 --- a/samples/hello_ar_java/app/build.gradle +++ b/samples/hello_ar_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/hello_ar_java/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/hello_ar_java/app/src/main/java/com/google/ar/core/examples/java/helloar/HelloArActivity.java b/samples/hello_ar_java/app/src/main/java/com/google/ar/core/examples/java/helloar/HelloArActivity.java index bd455304d..7320df096 100644 --- a/samples/hello_ar_java/app/src/main/java/com/google/ar/core/examples/java/helloar/HelloArActivity.java +++ b/samples/hello_ar_java/app/src/main/java/com/google/ar/core/examples/java/helloar/HelloArActivity.java @@ -34,6 +34,7 @@ import androidx.appcompat.app.AppCompatActivity; import com.google.ar.core.Anchor; import com.google.ar.core.ArCoreApk; +import com.google.ar.core.ArCoreApk.Availability; import com.google.ar.core.Camera; import com.google.ar.core.Config; import com.google.ar.core.Config.InstantPlacementMode; @@ -181,10 +182,10 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); surfaceView = findViewById(R.id.surfaceview); - displayRotationHelper = new DisplayRotationHelper(/*context=*/ this); + displayRotationHelper = new DisplayRotationHelper(/* context= */ this); // Set up touch listener. - tapHelper = new TapHelper(/*context=*/ this); + tapHelper = new TapHelper(/* context= */ this); surfaceView.setOnTouchListener(tapHelper); // Set up renderer. @@ -241,12 +242,18 @@ protected void onResume() { Exception exception = null; String message = null; try { - switch (ArCoreApk.getInstance().requestInstall(this, !installRequested)) { - case INSTALL_REQUESTED: - installRequested = true; - return; - case INSTALLED: - break; + // Always check the latest availability. + Availability availability = ArCoreApk.getInstance().checkAvailability(this); + + // In all other cases, try to install ARCore and handle installation failures. + if (availability != Availability.SUPPORTED_INSTALLED) { + switch (ArCoreApk.getInstance().requestInstall(this, !installRequested)) { + case INSTALL_REQUESTED: + installRequested = true; + return; + case INSTALLED: + break; + } } // ARCore requires camera permissions to operate. If we did not yet obtain runtime @@ -344,7 +351,7 @@ public void onSurfaceCreated(SampleRender render) { try { planeRenderer = new PlaneRenderer(render); backgroundRenderer = new BackgroundRenderer(render); - virtualSceneFramebuffer = new Framebuffer(render, /*width=*/ 1, /*height=*/ 1); + virtualSceneFramebuffer = new Framebuffer(render, /* width= */ 1, /* height= */ 1); cubemapFilter = new SpecularCubemapFilter( @@ -355,7 +362,7 @@ public void onSurfaceCreated(SampleRender render) { render, Texture.Target.TEXTURE_2D, Texture.WrapMode.CLAMP_TO_EDGE, - /*useMipmaps=*/ false); + /* useMipmaps= */ false); // The dfg.raw file is a raw half-float texture with two channels. final int dfgResolution = 64; final int dfgChannels = 2; @@ -371,11 +378,11 @@ public void onSurfaceCreated(SampleRender render) { GLError.maybeThrowGLException("Failed to bind DFG texture", "glBindTexture"); GLES30.glTexImage2D( GLES30.GL_TEXTURE_2D, - /*level=*/ 0, + /* level= */ 0, GLES30.GL_RG16F, - /*width=*/ dfgResolution, - /*height=*/ dfgResolution, - /*border=*/ 0, + /* width= */ dfgResolution, + /* height= */ dfgResolution, + /* border= */ 0, GLES30.GL_RG, GLES30.GL_HALF_FLOAT, buffer); @@ -384,17 +391,20 @@ public void onSurfaceCreated(SampleRender render) { // Point cloud pointCloudShader = Shader.createFromAssets( - render, "shaders/point_cloud.vert", "shaders/point_cloud.frag", /*defines=*/ null) + render, + "shaders/point_cloud.vert", + "shaders/point_cloud.frag", + /* defines= */ null) .setVec4( "u_Color", new float[] {31.0f / 255.0f, 188.0f / 255.0f, 210.0f / 255.0f, 1.0f}) .setFloat("u_PointSize", 5.0f); // four entries per vertex: X, Y, Z, confidence pointCloudVertexBuffer = - new VertexBuffer(render, /*numberOfEntriesPerVertex=*/ 4, /*entries=*/ null); + new VertexBuffer(render, /* numberOfEntriesPerVertex= */ 4, /* entries= */ null); final VertexBuffer[] pointCloudVertexBuffers = {pointCloudVertexBuffer}; pointCloudMesh = new Mesh( - render, Mesh.PrimitiveMode.POINTS, /*indexBuffer=*/ null, pointCloudVertexBuffers); + render, Mesh.PrimitiveMode.POINTS, /* indexBuffer= */ null, pointCloudVertexBuffers); // Virtual object to render (ARCore pawn) virtualObjectAlbedoTexture = @@ -422,7 +432,7 @@ public void onSurfaceCreated(SampleRender render) { render, "shaders/environmental_hdr.vert", "shaders/environmental_hdr.frag", - /*defines=*/ new HashMap() { + /* defines= */ new HashMap() { { put( "NUMBER_OF_MIPMAP_LEVELS", diff --git a/samples/hello_ar_kotlin/app/build.gradle b/samples/hello_ar_kotlin/app/build.gradle index 0470f33bb..32ad9b615 100644 --- a/samples/hello_ar_kotlin/app/build.gradle +++ b/samples/hello_ar_kotlin/app/build.gradle @@ -45,7 +45,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/hello_ar_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/hello_ar_vulkan_c/app/build.gradle b/samples/hello_ar_vulkan_c/app/build.gradle index 553bbf750..b0ab5ecaf 100644 --- a/samples/hello_ar_vulkan_c/app/build.gradle +++ b/samples/hello_ar_vulkan_c/app/build.gradle @@ -69,8 +69,8 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' - natives 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' + natives 'com.google.ar:core:1.38.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' diff --git a/samples/hello_ar_vulkan_c/app/src/main/cpp/vulkan_handler.cc b/samples/hello_ar_vulkan_c/app/src/main/cpp/vulkan_handler.cc index dfbf99a00..a35d561a2 100644 --- a/samples/hello_ar_vulkan_c/app/src/main/cpp/vulkan_handler.cc +++ b/samples/hello_ar_vulkan_c/app/src/main/cpp/vulkan_handler.cc @@ -147,10 +147,10 @@ void VulkanHandler::RenderFromHardwareBuffer(int current_frame, AHardwareBuffer_Desc buffer_desc = {}; - if (__builtin_available(android 26, *)) { + if (__builtin_available(android 27, *)) { AHardwareBuffer_describe(hardware_buffer, &buffer_desc); } else { - LOGE("Android API 26+ Required."); + LOGE("Android API 27+ Required."); exit(0); } diff --git a/samples/hello_eis_kotlin/app/build.gradle b/samples/hello_eis_kotlin/app/build.gradle index 7dbdac3e2..32937df41 100644 --- a/samples/hello_eis_kotlin/app/build.gradle +++ b/samples/hello_eis_kotlin/app/build.gradle @@ -45,7 +45,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/hello_eis_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/ml_kotlin/app/build.gradle b/samples/ml_kotlin/app/build.gradle index 9774deb48..0093c570a 100644 --- a/samples/ml_kotlin/app/build.gradle +++ b/samples/ml_kotlin/app/build.gradle @@ -69,7 +69,7 @@ dependencies { implementation 'com.google.mlkit:object-detection-custom:16.3.1' // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/ml_kotlin/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/persistent_cloud_anchor_java/app/build.gradle b/samples/persistent_cloud_anchor_java/app/build.gradle index 312a531ae..fed629e08 100644 --- a/samples/persistent_cloud_anchor_java/app/build.gradle +++ b/samples/persistent_cloud_anchor_java/app/build.gradle @@ -45,7 +45,7 @@ repositories { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/raw_depth_java/app/build.gradle b/samples/raw_depth_java/app/build.gradle index dddc43360..8f094de81 100644 --- a/samples/raw_depth_java/app/build.gradle +++ b/samples/raw_depth_java/app/build.gradle @@ -42,7 +42,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/recording_playback_java/app/build.gradle b/samples/recording_playback_java/app/build.gradle index 422bc0e31..f499936e9 100644 --- a/samples/recording_playback_java/app/build.gradle +++ b/samples/recording_playback_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/semantics_java/app/build.gradle b/samples/semantics_java/app/build.gradle index 180efd87c..af813f291 100644 --- a/samples/semantics_java/app/build.gradle +++ b/samples/semantics_java/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj diff --git a/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.frag b/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.frag deleted file mode 100644 index 199b53514..000000000 --- a/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.frag +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -precision mediump float; -varying vec4 v_Color; - -void main() { - gl_FragColor = v_Color; -} diff --git a/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.vert b/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.vert deleted file mode 100644 index 87fb23b36..000000000 --- a/samples/semantics_java/app/src/main/assets/shaders/streetscape_geometry.vert +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -uniform mat4 u_ModelViewProjection; -uniform vec4 u_Color; -uniform float u_PointSize; - -attribute vec4 a_Position; - -varying vec4 v_Color; - -void main() { - v_Color = u_Color; - gl_Position = u_ModelViewProjection * vec4(a_Position.xyz, 1.0); - gl_PointSize = u_PointSize; -} diff --git a/samples/shared_camera_java/app/build.gradle b/samples/shared_camera_java/app/build.gradle index d3cdf2da3..9fc7791ec 100644 --- a/samples/shared_camera_java/app/build.gradle +++ b/samples/shared_camera_java/app/build.gradle @@ -42,7 +42,7 @@ android { dependencies { // ARCore (Google Play Services for AR) library. - implementation 'com.google.ar:core:1.37.0' + implementation 'com.google.ar:core:1.38.0' // Obj - a simple Wavefront OBJ file loader // https://github.com/javagl/Obj