diff --git a/android/examples/gltfskinning/build.gradle b/android/examples/gltfskinning/build.gradle index 00e0ba2f..4eff3458 100644 --- a/android/examples/gltfskinning/build.gradle +++ b/android/examples/gltfskinning/build.gradle @@ -49,8 +49,8 @@ task copyTask { } copy { - from '../../../data/shaders/gltfskinning' - into 'assets/shaders/gltfskinning' + from '../../../data/shaders/glsl/gltfskinning' + into 'assets/shaders/glsl/gltfskinning' include '*.*' } diff --git a/android/examples/skeletalanimation/CMakeLists.txt b/android/examples/skeletalanimation/CMakeLists.txt deleted file mode 100644 index 53af56a8..00000000 --- a/android/examples/skeletalanimation/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) - -set(NAME skeletalanimation) - -set(SRC_DIR ../../../examples/${NAME}) -set(BASE_DIR ../../../base) -set(EXTERNAL_DIR ../../../external) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -DVK_USE_PLATFORM_ANDROID_KHR -DVK_NO_PROTOTYPES") - -file(GLOB EXAMPLE_SRC "${SRC_DIR}/*.cpp") - -add_library(native-lib SHARED ${EXAMPLE_SRC}) - -add_library(native-app-glue STATIC ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) - -add_subdirectory(../base ${CMAKE_SOURCE_DIR}/../base) - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate") - -include_directories(${BASE_DIR}) -include_directories(${EXTERNAL_DIR}) -include_directories(${EXTERNAL_DIR}/glm) -include_directories(${EXTERNAL_DIR}/gli) -include_directories(${EXTERNAL_DIR}/imgui) -include_directories(${EXTERNAL_DIR}/assimp) -include_directories(${ANDROID_NDK}/sources/android/native_app_glue) - -target_link_libraries( - native-lib - native-app-glue - libbase - android - log - z -) diff --git a/android/examples/skeletalanimation/build.gradle b/android/examples/skeletalanimation/build.gradle deleted file mode 100644 index cdb88fce..00000000 --- a/android/examples/skeletalanimation/build.gradle +++ /dev/null @@ -1,84 +0,0 @@ -apply plugin: 'com.android.application' -apply from: '../gradle/outputfilename.gradle' - -android { - compileSdkVersion 26 - defaultConfig { - applicationId "de.saschawillems.vulkanSkeletalanimation" - minSdkVersion 19 - targetSdkVersion 26 - versionCode 1 - versionName "1.0" - ndk { - abiFilters "armeabi-v7a" - } - externalNativeBuild { - cmake { - cppFlags "-std=c++14" - arguments "-DANDROID_STL=c++_shared", '-DANDROID_TOOLCHAIN=clang' - } - } - } - sourceSets { - main.assets.srcDirs = ['assets'] - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - externalNativeBuild { - cmake { - path "CMakeLists.txt" - } - } -} - -task copyTask { - copy { - from '../../common/res/drawable' - into "src/main/res/drawable" - include 'icon.png' - } - - copy { - from '../../../data/shaders/glsl/base' - into 'assets/shaders/glsl/base' - include '*.spv' - } - - copy { - from '../../../data/shaders/glsl/skeletalanimation' - into 'assets/shaders/glsl/skeletalanimation' - include '*.*' - } - - copy { - from '../../../data/models' - into 'assets/models' - include 'goblin.dae' - } - - copy { - from '../../../data/models' - into 'assets/models' - include 'plane_z.obj' - } - - copy { - from '../../../data/textures' - into 'assets/textures' - include 'trail*.ktx' - } - - copy { - from '../../../data/textures' - into 'assets/textures' - include 'goblin*.ktx' - } - - -} - -preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/skeletalanimation/src/main/AndroidManifest.xml b/android/examples/skeletalanimation/src/main/AndroidManifest.xml deleted file mode 100644 index 95e4a668..00000000 --- a/android/examples/skeletalanimation/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/android/examples/skeletalanimation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/skeletalanimation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java deleted file mode 100644 index 12e14fc6..00000000 --- a/android/examples/skeletalanimation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2018 by Sascha Willems - www.saschawillems.de - * - * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) - */ -package de.saschawillems.vulkanSample; - -import android.app.AlertDialog; -import android.app.NativeActivity; -import android.content.DialogInterface; -import android.content.pm.ApplicationInfo; -import android.os.Bundle; - -import java.util.concurrent.Semaphore; - -public class VulkanActivity extends NativeActivity { - - static { - // Load native library - System.loadLibrary("native-lib"); - } - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - } - - // Use a semaphore to create a modal dialog - - private final Semaphore semaphore = new Semaphore(0, true); - - public void showAlert(final String message) - { - final VulkanActivity activity = this; - - ApplicationInfo applicationInfo = activity.getApplicationInfo(); - final String applicationName = applicationInfo.nonLocalizedLabel.toString(); - - this.runOnUiThread(new Runnable() { - public void run() { - AlertDialog.Builder builder = new AlertDialog.Builder(activity, android.R.style.Theme_Material_Dialog_Alert); - builder.setTitle(applicationName); - builder.setMessage(message); - builder.setPositiveButton("Close", new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - semaphore.release(); - } - }); - builder.setCancelable(false); - AlertDialog dialog = builder.create(); - dialog.show(); - } - }); - try { - semaphore.acquire(); - } - catch (InterruptedException e) { } - } -}