From 13a4f611e46c2930152d57d09fa6a762cffa8f96 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sun, 29 Apr 2018 11:54:08 +0200 Subject: [PATCH 01/24] Removed old android build files --- android/bloom/.gitignore | 10 -- android/bloom/AndroidManifest.xml | 28 --- android/bloom/example.json | 16 -- android/build-all.py | 88 ---------- android/build.py | 162 ------------------ android/cleanup.bat | 10 -- android/computecloth/.gitignore | 10 -- android/computecloth/AndroidManifest.xml | 28 --- android/computecloth/example.json | 14 -- android/computecullandlod/.gitignore | 10 -- android/computecullandlod/AndroidManifest.xml | 28 --- android/computecullandlod/example.json | 11 -- android/computeheadless/.gitignore | 10 -- android/computeheadless/AndroidManifest.xml | 27 --- android/computeheadless/example.json | 8 - android/computenbody/.gitignore | 10 -- android/computenbody/AndroidManifest.xml | 28 --- android/computenbody/example.json | 12 -- android/computeparticles/.gitignore | 10 -- android/computeparticles/AndroidManifest.xml | 28 --- android/computeparticles/example.json | 12 -- android/computeshader/.gitignore | 10 -- android/computeshader/AndroidManifest.xml | 28 --- android/computeshader/example.json | 11 -- android/debugmarker/.gitignore | 10 -- android/debugmarker/AndroidManifest.xml | 28 --- android/debugmarker/example.json | 12 -- android/deferred/.gitignore | 10 -- android/deferred/AndroidManifest.xml | 28 --- android/deferred/example.json | 25 --- android/deferredmultisampling/.gitignore | 10 -- .../deferredmultisampling/AndroidManifest.xml | 28 --- android/deferredmultisampling/example.json | 25 --- android/deferredshadows/.gitignore | 10 -- android/deferredshadows/AndroidManifest.xml | 28 --- android/deferredshadows/example.json | 25 --- android/descriptorsets/.gitignore | 10 -- android/descriptorsets/AndroidManifest.xml | 28 --- android/descriptorsets/example.json | 15 -- android/displacement/.gitignore | 10 -- android/displacement/AndroidManifest.xml | 28 --- android/displacement/example.json | 16 -- android/distancefieldfonts/.gitignore | 10 -- .../distancefieldfonts/AndroidManifest.xml | 28 --- android/distancefieldfonts/example.json | 17 -- android/dynamicuniformbuffer/.gitignore | 10 -- .../dynamicuniformbuffer/AndroidManifest.xml | 28 --- android/dynamicuniformbuffer/example.json | 7 - android/gears/.gitignore | 10 -- android/gears/AndroidManifest.xml | 28 --- android/gears/example.json | 7 - android/geometryshader/.gitignore | 10 -- android/geometryshader/AndroidManifest.xml | 28 --- android/geometryshader/example.json | 11 -- android/hdr/.gitignore | 10 -- android/hdr/AndroidManifest.xml | 28 --- android/hdr/example.json | 23 --- android/imgui/.gitignore | 10 -- android/imgui/AndroidManifest.xml | 28 --- android/imgui/example.json | 13 -- android/indirectdraw/.gitignore | 10 -- android/indirectdraw/AndroidManifest.xml | 28 --- android/indirectdraw/example.json | 21 --- android/instancing/.gitignore | 10 -- android/instancing/AndroidManifest.xml | 28 --- android/instancing/example.json | 20 --- android/mesh/.gitignore | 10 -- android/mesh/AndroidManifest.xml | 28 --- android/mesh/example.json | 16 -- android/multisampling/.gitignore | 10 -- android/multisampling/AndroidManifest.xml | 28 --- android/multisampling/example.json | 16 -- android/multithreading/.gitignore | 10 -- android/multithreading/AndroidManifest.xml | 28 --- android/multithreading/example.json | 12 -- android/occlusionquery/.gitignore | 10 -- android/occlusionquery/AndroidManifest.xml | 28 --- android/occlusionquery/example.json | 13 -- android/offscreen/.gitignore | 10 -- android/offscreen/AndroidManifest.xml | 28 --- android/offscreen/example.json | 17 -- android/parallaxmapping/.gitignore | 10 -- android/parallaxmapping/AndroidManifest.xml | 28 --- android/parallaxmapping/example.json | 17 -- android/particlefire/.gitignore | 10 -- android/particlefire/AndroidManifest.xml | 28 --- android/particlefire/example.json | 21 --- android/pbrbasic/.gitignore | 10 -- android/pbrbasic/AndroidManifest.xml | 28 --- android/pbrbasic/example.json | 14 -- android/pbribl/.gitignore | 10 -- android/pbribl/AndroidManifest.xml | 28 --- android/pbribl/example.json | 23 --- android/pbrtexture/.gitignore | 10 -- android/pbrtexture/AndroidManifest.xml | 28 --- android/pbrtexture/example.json | 18 -- android/pipelines/.gitignore | 10 -- android/pipelines/AndroidManifest.xml | 28 --- android/pipelines/example.json | 11 -- android/pipelinestatistics/.gitignore | 10 -- .../pipelinestatistics/AndroidManifest.xml | 28 --- android/pipelinestatistics/example.json | 15 -- android/pushconstants/.gitignore | 10 -- android/pushconstants/AndroidManifest.xml | 28 --- android/pushconstants/example.json | 11 -- android/pushdescriptors/.gitignore | 10 -- android/pushdescriptors/AndroidManifest.xml | 28 --- android/pushdescriptors/example.json | 15 -- android/radialblur/.gitignore | 10 -- android/radialblur/AndroidManifest.xml | 28 --- android/radialblur/example.json | 14 -- android/raytracing/.gitignore | 10 -- android/raytracing/AndroidManifest.xml | 28 --- android/raytracing/example.json | 7 - android/renderheadless/.gitignore | 10 -- android/renderheadless/AndroidManifest.xml | 29 ---- android/renderheadless/example.json | 8 - android/scenerendering/.gitignore | 10 -- android/scenerendering/AndroidManifest.xml | 28 --- android/scenerendering/example.json | 16 -- android/shadowmapping/.gitignore | 10 -- android/shadowmapping/AndroidManifest.xml | 28 --- android/shadowmapping/example.json | 11 -- android/shadowmappingcascade/.gitignore | 10 -- .../shadowmappingcascade/AndroidManifest.xml | 28 --- android/shadowmappingcascade/example.json | 18 -- android/shadowmappingomni/.gitignore | 10 -- android/shadowmappingomni/AndroidManifest.xml | 28 --- android/shadowmappingomni/example.json | 12 -- android/skeletalanimation/.gitignore | 10 -- android/skeletalanimation/AndroidManifest.xml | 28 --- android/skeletalanimation/example.json | 20 --- android/specializationconstants/.gitignore | 10 -- .../AndroidManifest.xml | 28 --- android/specializationconstants/example.json | 14 -- android/sphericalenvmapping/.gitignore | 10 -- .../sphericalenvmapping/AndroidManifest.xml | 28 --- android/sphericalenvmapping/example.json | 14 -- android/ssao/.gitignore | 10 -- android/ssao/AndroidManifest.xml | 28 --- android/ssao/example.json | 16 -- android/stencilbuffer/.gitignore | 10 -- android/stencilbuffer/AndroidManifest.xml | 28 --- android/stencilbuffer/example.json | 11 -- android/subpasses/.gitignore | 10 -- android/subpasses/AndroidManifest.xml | 28 --- android/subpasses/example.json | 17 -- android/templates/Android.mk | 49 ------ android/templates/Application.mk | 7 - android/terraintessellation/.gitignore | 10 -- .../terraintessellation/AndroidManifest.xml | 28 --- android/terraintessellation/example.json | 20 --- android/tessellation/.gitignore | 10 -- android/tessellation/AndroidManifest.xml | 28 --- android/tessellation/example.json | 21 --- android/textoverlay/.gitignore | 10 -- android/textoverlay/AndroidManifest.xml | 28 --- android/textoverlay/example.json | 11 -- android/texture/.gitignore | 10 -- android/texture/AndroidManifest.xml | 28 --- android/texture/example.json | 11 -- android/texture3d/.gitignore | 10 -- android/texture3d/AndroidManifest.xml | 28 --- android/texture3d/example.json | 7 - android/texturearray/.gitignore | 10 -- android/texturearray/AndroidManifest.xml | 28 --- android/texturearray/example.json | 13 -- android/texturecubemap/.gitignore | 10 -- android/texturecubemap/AndroidManifest.xml | 28 --- android/texturecubemap/example.json | 19 -- android/texturemipmapgen/.gitignore | 10 -- android/texturemipmapgen/AndroidManifest.xml | 28 --- android/texturemipmapgen/example.json | 14 -- android/triangle/.gitignore | 10 -- android/triangle/AndroidManifest.xml | 28 --- android/triangle/example.json | 6 - android/uninstall-all.py | 75 -------- android/viewportarray/.gitignore | 10 -- android/viewportarray/AndroidManifest.xml | 28 --- android/viewportarray/example.json | 11 -- android/vulkanscene/.gitignore | 10 -- android/vulkanscene/AndroidManifest.xml | 28 --- android/vulkanscene/example.json | 17 -- 183 files changed, 3501 deletions(-) delete mode 100644 android/bloom/.gitignore delete mode 100644 android/bloom/AndroidManifest.xml delete mode 100644 android/bloom/example.json delete mode 100755 android/build-all.py delete mode 100755 android/build.py delete mode 100644 android/cleanup.bat delete mode 100644 android/computecloth/.gitignore delete mode 100644 android/computecloth/AndroidManifest.xml delete mode 100644 android/computecloth/example.json delete mode 100644 android/computecullandlod/.gitignore delete mode 100644 android/computecullandlod/AndroidManifest.xml delete mode 100644 android/computecullandlod/example.json delete mode 100644 android/computeheadless/.gitignore delete mode 100644 android/computeheadless/AndroidManifest.xml delete mode 100644 android/computeheadless/example.json delete mode 100644 android/computenbody/.gitignore delete mode 100644 android/computenbody/AndroidManifest.xml delete mode 100644 android/computenbody/example.json delete mode 100644 android/computeparticles/.gitignore delete mode 100644 android/computeparticles/AndroidManifest.xml delete mode 100644 android/computeparticles/example.json delete mode 100644 android/computeshader/.gitignore delete mode 100644 android/computeshader/AndroidManifest.xml delete mode 100644 android/computeshader/example.json delete mode 100644 android/debugmarker/.gitignore delete mode 100644 android/debugmarker/AndroidManifest.xml delete mode 100644 android/debugmarker/example.json delete mode 100644 android/deferred/.gitignore delete mode 100644 android/deferred/AndroidManifest.xml delete mode 100644 android/deferred/example.json delete mode 100644 android/deferredmultisampling/.gitignore delete mode 100644 android/deferredmultisampling/AndroidManifest.xml delete mode 100644 android/deferredmultisampling/example.json delete mode 100644 android/deferredshadows/.gitignore delete mode 100644 android/deferredshadows/AndroidManifest.xml delete mode 100644 android/deferredshadows/example.json delete mode 100644 android/descriptorsets/.gitignore delete mode 100644 android/descriptorsets/AndroidManifest.xml delete mode 100644 android/descriptorsets/example.json delete mode 100644 android/displacement/.gitignore delete mode 100644 android/displacement/AndroidManifest.xml delete mode 100644 android/displacement/example.json delete mode 100644 android/distancefieldfonts/.gitignore delete mode 100644 android/distancefieldfonts/AndroidManifest.xml delete mode 100644 android/distancefieldfonts/example.json delete mode 100644 android/dynamicuniformbuffer/.gitignore delete mode 100644 android/dynamicuniformbuffer/AndroidManifest.xml delete mode 100644 android/dynamicuniformbuffer/example.json delete mode 100644 android/gears/.gitignore delete mode 100644 android/gears/AndroidManifest.xml delete mode 100644 android/gears/example.json delete mode 100644 android/geometryshader/.gitignore delete mode 100644 android/geometryshader/AndroidManifest.xml delete mode 100644 android/geometryshader/example.json delete mode 100644 android/hdr/.gitignore delete mode 100644 android/hdr/AndroidManifest.xml delete mode 100644 android/hdr/example.json delete mode 100644 android/imgui/.gitignore delete mode 100644 android/imgui/AndroidManifest.xml delete mode 100644 android/imgui/example.json delete mode 100644 android/indirectdraw/.gitignore delete mode 100644 android/indirectdraw/AndroidManifest.xml delete mode 100644 android/indirectdraw/example.json delete mode 100644 android/instancing/.gitignore delete mode 100644 android/instancing/AndroidManifest.xml delete mode 100644 android/instancing/example.json delete mode 100644 android/mesh/.gitignore delete mode 100644 android/mesh/AndroidManifest.xml delete mode 100644 android/mesh/example.json delete mode 100644 android/multisampling/.gitignore delete mode 100644 android/multisampling/AndroidManifest.xml delete mode 100644 android/multisampling/example.json delete mode 100644 android/multithreading/.gitignore delete mode 100644 android/multithreading/AndroidManifest.xml delete mode 100644 android/multithreading/example.json delete mode 100644 android/occlusionquery/.gitignore delete mode 100644 android/occlusionquery/AndroidManifest.xml delete mode 100644 android/occlusionquery/example.json delete mode 100644 android/offscreen/.gitignore delete mode 100644 android/offscreen/AndroidManifest.xml delete mode 100644 android/offscreen/example.json delete mode 100644 android/parallaxmapping/.gitignore delete mode 100644 android/parallaxmapping/AndroidManifest.xml delete mode 100644 android/parallaxmapping/example.json delete mode 100644 android/particlefire/.gitignore delete mode 100644 android/particlefire/AndroidManifest.xml delete mode 100644 android/particlefire/example.json delete mode 100644 android/pbrbasic/.gitignore delete mode 100644 android/pbrbasic/AndroidManifest.xml delete mode 100644 android/pbrbasic/example.json delete mode 100644 android/pbribl/.gitignore delete mode 100644 android/pbribl/AndroidManifest.xml delete mode 100644 android/pbribl/example.json delete mode 100644 android/pbrtexture/.gitignore delete mode 100644 android/pbrtexture/AndroidManifest.xml delete mode 100644 android/pbrtexture/example.json delete mode 100644 android/pipelines/.gitignore delete mode 100644 android/pipelines/AndroidManifest.xml delete mode 100644 android/pipelines/example.json delete mode 100644 android/pipelinestatistics/.gitignore delete mode 100644 android/pipelinestatistics/AndroidManifest.xml delete mode 100644 android/pipelinestatistics/example.json delete mode 100644 android/pushconstants/.gitignore delete mode 100644 android/pushconstants/AndroidManifest.xml delete mode 100644 android/pushconstants/example.json delete mode 100644 android/pushdescriptors/.gitignore delete mode 100644 android/pushdescriptors/AndroidManifest.xml delete mode 100644 android/pushdescriptors/example.json delete mode 100644 android/radialblur/.gitignore delete mode 100644 android/radialblur/AndroidManifest.xml delete mode 100644 android/radialblur/example.json delete mode 100644 android/raytracing/.gitignore delete mode 100644 android/raytracing/AndroidManifest.xml delete mode 100644 android/raytracing/example.json delete mode 100644 android/renderheadless/.gitignore delete mode 100644 android/renderheadless/AndroidManifest.xml delete mode 100644 android/renderheadless/example.json delete mode 100644 android/scenerendering/.gitignore delete mode 100644 android/scenerendering/AndroidManifest.xml delete mode 100644 android/scenerendering/example.json delete mode 100644 android/shadowmapping/.gitignore delete mode 100644 android/shadowmapping/AndroidManifest.xml delete mode 100644 android/shadowmapping/example.json delete mode 100644 android/shadowmappingcascade/.gitignore delete mode 100644 android/shadowmappingcascade/AndroidManifest.xml delete mode 100644 android/shadowmappingcascade/example.json delete mode 100644 android/shadowmappingomni/.gitignore delete mode 100644 android/shadowmappingomni/AndroidManifest.xml delete mode 100644 android/shadowmappingomni/example.json delete mode 100644 android/skeletalanimation/.gitignore delete mode 100644 android/skeletalanimation/AndroidManifest.xml delete mode 100644 android/skeletalanimation/example.json delete mode 100644 android/specializationconstants/.gitignore delete mode 100644 android/specializationconstants/AndroidManifest.xml delete mode 100644 android/specializationconstants/example.json delete mode 100644 android/sphericalenvmapping/.gitignore delete mode 100644 android/sphericalenvmapping/AndroidManifest.xml delete mode 100644 android/sphericalenvmapping/example.json delete mode 100644 android/ssao/.gitignore delete mode 100644 android/ssao/AndroidManifest.xml delete mode 100644 android/ssao/example.json delete mode 100644 android/stencilbuffer/.gitignore delete mode 100644 android/stencilbuffer/AndroidManifest.xml delete mode 100644 android/stencilbuffer/example.json delete mode 100644 android/subpasses/.gitignore delete mode 100644 android/subpasses/AndroidManifest.xml delete mode 100644 android/subpasses/example.json delete mode 100644 android/templates/Android.mk delete mode 100644 android/templates/Application.mk delete mode 100644 android/terraintessellation/.gitignore delete mode 100644 android/terraintessellation/AndroidManifest.xml delete mode 100644 android/terraintessellation/example.json delete mode 100644 android/tessellation/.gitignore delete mode 100644 android/tessellation/AndroidManifest.xml delete mode 100644 android/tessellation/example.json delete mode 100644 android/textoverlay/.gitignore delete mode 100644 android/textoverlay/AndroidManifest.xml delete mode 100644 android/textoverlay/example.json delete mode 100644 android/texture/.gitignore delete mode 100644 android/texture/AndroidManifest.xml delete mode 100644 android/texture/example.json delete mode 100644 android/texture3d/.gitignore delete mode 100644 android/texture3d/AndroidManifest.xml delete mode 100644 android/texture3d/example.json delete mode 100644 android/texturearray/.gitignore delete mode 100644 android/texturearray/AndroidManifest.xml delete mode 100644 android/texturearray/example.json delete mode 100644 android/texturecubemap/.gitignore delete mode 100644 android/texturecubemap/AndroidManifest.xml delete mode 100644 android/texturecubemap/example.json delete mode 100644 android/texturemipmapgen/.gitignore delete mode 100644 android/texturemipmapgen/AndroidManifest.xml delete mode 100644 android/texturemipmapgen/example.json delete mode 100644 android/triangle/.gitignore delete mode 100644 android/triangle/AndroidManifest.xml delete mode 100644 android/triangle/example.json delete mode 100755 android/uninstall-all.py delete mode 100644 android/viewportarray/.gitignore delete mode 100644 android/viewportarray/AndroidManifest.xml delete mode 100644 android/viewportarray/example.json delete mode 100644 android/vulkanscene/.gitignore delete mode 100644 android/vulkanscene/AndroidManifest.xml delete mode 100644 android/vulkanscene/example.json diff --git a/android/bloom/.gitignore b/android/bloom/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/bloom/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/bloom/AndroidManifest.xml b/android/bloom/AndroidManifest.xml deleted file mode 100644 index 880dd91f..00000000 --- a/android/bloom/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/bloom/example.json b/android/bloom/example.json deleted file mode 100644 index e8bc7770..00000000 --- a/android/bloom/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanBloom", - "directories": { - "shaders": "bloom" - }, - "assets": { - "models": [ - "retroufo.dae", - "retroufo_glow.dae", - "cube.obj" - ], - "textures": [ - "cubemap_space.ktx" - ] - } -} \ No newline at end of file diff --git a/android/build-all.py b/android/build-all.py deleted file mode 100755 index d4785215..00000000 --- a/android/build-all.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import subprocess -import sys - -import build - -EXAMPLES = [ - "bloom", - "computecullandlod", - "computecloth", - "computeheadless", - "computenbody", - "computeparticles", - "computeshader", - "debugmarker", - "deferred", - "deferredmultisampling", - "deferredshadows", - "displacement", - "distancefieldfonts", - "dynamicuniformbuffer", - "gears", - "geometryshader", - "hdr", - "imgui", - "indirectdraw", - "instancing", - "mesh", - "multisampling", - "multithreading", - "occlusionquery", - "offscreen", - "parallaxmapping", - "particlefire", - "pbrbasic", - "pbribl", - "pbrtexture", - "pipelines", - "pipelinestatistics", - "pushconstants", - "radialblur", - "raytracing", - "renderheadless", - "ssao", - "scenerendering", - "shadowmapping", - "shadowmappingcascade", - "shadowmappingomni", - "skeletalanimation", - "specializationconstants", - "sphericalenvmapping", - "stencilbuffer", - "subpasses", - "terraintessellation", - "tessellation", - "textoverlay", - "texture", - "texture3d", - "texturearray", - "texturecubemap", - "texturemipmapgen", - "triangle", - "viewportarray", - "vulkanscene" -] - -COLOR_GREEN = '\033[92m' -COLOR_END = '\033[0m' - -CURR_INDEX = 0 - -parser = argparse.ArgumentParser() -parser.add_argument('-deploy', default=False, action='store_true', help="install examples on device") -parser.add_argument('-validation', default=False, action='store_true') -args = parser.parse_args() - -print("Building all examples...") - -for example in EXAMPLES: - print(COLOR_GREEN + "Building %s (%d/%d)" % (example, CURR_INDEX, len(EXAMPLES)) + COLOR_END) - if not build.main(example, args.deploy, args.validation): - print("Error during build process for %s" % example) - sys.exit(-1) - CURR_INDEX += 1 - -print("Successfully build %d examples" % CURR_INDEX) diff --git a/android/build.py b/android/build.py deleted file mode 100755 index 555dd379..00000000 --- a/android/build.py +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env python3 - -import os -import subprocess -import sys -import shutil -import glob -import json -import argparse - -def main(project_folder, deploy=False, validation=False): - - # Android SDK version used - SDK_VERSION = "android-23" - - # Check if python 3, python 2 not supported - if sys.version_info <= (3, 0): - print("Sorry, requires Python 3.x, not Python 2.x") - return False - - # Definitions (apk name, folders, etc.) will be taken from a json definition - if not os.path.isfile(os.path.join(project_folder, "example.json")): - print("Could not find json definition for example %s" % project_folder) - return False - - # Check if a build file is present, if not create one using the android SDK version specified - if not os.path.isfile(os.path.join(project_folder, "build.xml")): - print("Build.xml not present, generating with %s " % SDK_VERSION) - ANDROID_CMD = "android" - if os.name == 'nt': - ANDROID_CMD += ".bat" - if subprocess.call(("%s update project -p ./%s -t %s" % (ANDROID_CMD, project_folder, SDK_VERSION)).split(' ')) != 0: - print("Error: Project update failed!") - return False - - # Load example definition from json file - with open(os.path.join(project_folder, "example.json")) as json_file: - EXAMPLE_JSON = json.load(json_file) - - APK_NAME = EXAMPLE_JSON["apkname"] - SHADER_DIR = EXAMPLE_JSON["directories"]["shaders"] - - # Additional - ADDITIONAL_DIRS = [] - ADDITIONAL_FILES = [] - if "assets" in EXAMPLE_JSON and "additional" in EXAMPLE_JSON["assets"]: - ADDITIONAL = EXAMPLE_JSON["assets"]["additional"] - if "directories" in ADDITIONAL: - ADDITIONAL_DIRS = ADDITIONAL["directories"] - if "files" in ADDITIONAL: - ADDITIONAL_FILES = ADDITIONAL["files"] - - # Get assets to be copied - ASSETS_MODELS = [] - ASSETS_TEXTURES = [] - if "assets" in EXAMPLE_JSON: - ASSETS = EXAMPLE_JSON["assets"] - if "models" in ASSETS: - ASSETS_MODELS = EXAMPLE_JSON["assets"]["models"] - if "textures" in ASSETS: - ASSETS_TEXTURES = EXAMPLE_JSON["assets"]["textures"] - - # Enable validation - BUILD_ARGS = "" - - if validation: - # Use a define to force validation in code - BUILD_ARGS = "APP_CFLAGS=-D_VALIDATION" - - # Verify submodules are loaded in external folder - if not os.listdir("../external/glm/") or not os.listdir("../external/gli/"): - print("External submodules not loaded. Clone them using:") - print("\tgit submodule init\n\tgit submodule update") - return False - - # Build - old_cwd = os.getcwd() - os.chdir(project_folder) - - # Create android build files from templates - os.makedirs("./jni", exist_ok=True) - shutil.copy("./../templates/Application.mk", "./jni/") - with open("./../templates/Android.mk", "rt") as fin: - with open("./jni/Android.mk", "wt") as fout: - for line in fin: - fout.write(line.replace("%APK_NAME%", "%s" % APK_NAME).replace("%SRC_FOLDER%", "%s" % project_folder)) - - if subprocess.call("ndk-build %s" %BUILD_ARGS, shell=True) == 0: - print("Build successful") - - if validation: - # Copy validation layers - # todo: Currently only arm v7 - print("Validation enabled, copying validation layers...") - os.makedirs("./libs/armeabi-v7a", exist_ok=True) - for file in glob.glob("../layers/armeabi-v7a/*.so"): - print("\t" + file) - shutil.copy(file, "./libs/armeabi-v7a") - - # Create folders - os.makedirs("./assets/shaders/base", exist_ok=True) - os.makedirs("./assets/shaders/%s" % SHADER_DIR, exist_ok=True) - os.makedirs("./assets/models", exist_ok=True) - os.makedirs("./assets/textures", exist_ok=True) - for directory in ADDITIONAL_DIRS: - os.makedirs("./assets/%s" % directory, exist_ok=True) - os.makedirs("./res/drawable", exist_ok=True) - - # Copy assets - for filename in glob.glob("../../data/shaders/base/*.spv"): - shutil.copy(filename, "./assets/shaders/base") - for filename in glob.glob("../../data/shaders/%s/*.spv" % SHADER_DIR): - shutil.copy(filename, "./assets/shaders/%s" % SHADER_DIR) - for filename in ASSETS_MODELS: - shutil.copy("../../data/models/%s" % filename, "./assets/models") - for filename in ASSETS_TEXTURES: - shutil.copy("../../data/textures/%s" % filename, "./assets/textures") - for filename in ADDITIONAL_FILES: - if "*." in filename: - for fname in glob.glob("../../data/%s" % filename): - locfname = fname.replace("../../data/", "") - shutil.copy(fname, "./assets/%s" % locfname) - else: - shutil.copy("../../data/%s" % filename, "./assets/%s" % filename) - - shutil.copy("../../android/images/icon.png", "./res/drawable") - - if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0: - if deploy and subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0: - print("Could not deploy to device!") - else: - print("Error during build process!") - return False - else: - print("Error building project!") - return False - - # Copy apk to bin folder - os.makedirs("../bin", exist_ok=True) - shutil.move('%s.apk' % APK_NAME, "../bin/%s.apk" % APK_NAME) - os.chdir(old_cwd) - return True - -class ReadableDir(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - if not os.path.isdir(values): - raise argparse.ArgumentTypeError("{0} is not a valid path".format(values)) - if not os.access(values, os.R_OK): - raise argparse.ArgumentTypeError("{0} is not a readable dir".format(values)) - setattr(namespace, self.dest,values) - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description="Build and deploy a single example") - parser.add_argument('-deploy', default=False, action='store_true', help="install example on device") - parser.add_argument('-validation', default=False, action='store_true') - parser.add_argument('project_folder', action=ReadableDir) - try: - args = parser.parse_args() - except SystemExit: - sys.exit(1) - ok = main(args.project_folder, args.deploy, args.validation) - sys.exit(0 if ok else 1) diff --git a/android/cleanup.bat b/android/cleanup.bat deleted file mode 100644 index 909a2a2a..00000000 --- a/android/cleanup.bat +++ /dev/null @@ -1,10 +0,0 @@ -FOR /d /r . %%x IN (assets) DO @IF EXIST "%%x" rd /s /q "%%x" -FOR /d /r . %%x IN (bin) DO @IF EXIST "%%x" rd /s /q "%%x" -FOR /d /r . %%x IN (libs) DO @IF EXIST "%%x" rd /s /q "%%x" -FOR /d /r . %%x IN (obj) DO @IF EXIST "%%x" rd /s /q "%%x" -FOR /d /r . %%x IN (res) DO @IF EXIST "%%x" rd /s /q "%%x" -FOR /d /r . %%x IN (jni) DO @IF EXIST "%%x" rd /s /q "%%x" -del /s build.xml -del /s local.properties -del /s proguard-project.txt -del /s project.properties \ No newline at end of file diff --git a/android/computecloth/.gitignore b/android/computecloth/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computecloth/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computecloth/AndroidManifest.xml b/android/computecloth/AndroidManifest.xml deleted file mode 100644 index 86dc355d..00000000 --- a/android/computecloth/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computecloth/example.json b/android/computecloth/example.json deleted file mode 100644 index 6fe3e02e..00000000 --- a/android/computecloth/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanComputecloth", - "directories": { - "shaders": "computecloth" - }, - "assets": { - "models": [ - "geosphere.obj" - ], - "textures": [ - "vulkan_cloth_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/computecullandlod/.gitignore b/android/computecullandlod/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computecullandlod/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computecullandlod/AndroidManifest.xml b/android/computecullandlod/AndroidManifest.xml deleted file mode 100644 index ccc68ea3..00000000 --- a/android/computecullandlod/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computecullandlod/example.json b/android/computecullandlod/example.json deleted file mode 100644 index d79c5596..00000000 --- a/android/computecullandlod/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanComputecullandlod", - "directories": { - "shaders": "computecullandlod" - }, - "assets": { - "models": [ - "suzanne_lods.dae" - ] - } -} \ No newline at end of file diff --git a/android/computeheadless/.gitignore b/android/computeheadless/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computeheadless/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computeheadless/AndroidManifest.xml b/android/computeheadless/AndroidManifest.xml deleted file mode 100644 index eedf7502..00000000 --- a/android/computeheadless/AndroidManifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computeheadless/example.json b/android/computeheadless/example.json deleted file mode 100644 index d1ac654e..00000000 --- a/android/computeheadless/example.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "apkname": "vulkanComputeheadless", - "directories": { - "shaders": "computeheadless" - }, - "assets": { - } -} \ No newline at end of file diff --git a/android/computenbody/.gitignore b/android/computenbody/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computenbody/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computenbody/AndroidManifest.xml b/android/computenbody/AndroidManifest.xml deleted file mode 100644 index a316e781..00000000 --- a/android/computenbody/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computenbody/example.json b/android/computenbody/example.json deleted file mode 100644 index 56e31f4b..00000000 --- a/android/computenbody/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apkname": "vulkanComputenbody", - "directories": { - "shaders": "computenbody" - }, - "assets": { - "textures": [ - "particle01_rgba.ktx", - "particle_gradient_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/computeparticles/.gitignore b/android/computeparticles/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computeparticles/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computeparticles/AndroidManifest.xml b/android/computeparticles/AndroidManifest.xml deleted file mode 100644 index 291bb1ad..00000000 --- a/android/computeparticles/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computeparticles/example.json b/android/computeparticles/example.json deleted file mode 100644 index b1ebea49..00000000 --- a/android/computeparticles/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apkname": "vulkanComputeparticles", - "directories": { - "shaders": "computeparticles" - }, - "assets": { - "textures": [ - "particle01_rgba.ktx", - "particle_gradient_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/computeshader/.gitignore b/android/computeshader/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/computeshader/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/computeshader/AndroidManifest.xml b/android/computeshader/AndroidManifest.xml deleted file mode 100644 index d04ca488..00000000 --- a/android/computeshader/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/computeshader/example.json b/android/computeshader/example.json deleted file mode 100644 index 66a29fe2..00000000 --- a/android/computeshader/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanComputeshader", - "directories": { - "shaders": "computeshader" - }, - "assets": { - "textures": [ - "vulkan_11_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/debugmarker/.gitignore b/android/debugmarker/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/debugmarker/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/debugmarker/AndroidManifest.xml b/android/debugmarker/AndroidManifest.xml deleted file mode 100644 index 65c11486..00000000 --- a/android/debugmarker/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/debugmarker/example.json b/android/debugmarker/example.json deleted file mode 100644 index 09b9df1c..00000000 --- a/android/debugmarker/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apkname": "vulkanDebugmarker", - "directories": { - "shaders": "debugmarker" - }, - "assets": { - "models": [ - "treasure_smooth.dae", - "treasure_glow.dae" - ] - } -} \ No newline at end of file diff --git a/android/deferred/.gitignore b/android/deferred/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/deferred/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/deferred/AndroidManifest.xml b/android/deferred/AndroidManifest.xml deleted file mode 100644 index d40f2a3d..00000000 --- a/android/deferred/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/deferred/example.json b/android/deferred/example.json deleted file mode 100644 index f7b80757..00000000 --- a/android/deferred/example.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "apkname": "vulkanDeferred", - "directories": { - "shaders": "deferred" - }, - "assets": { - "models": [ - "plane.obj" - ], - "textures": [ - "stonefloor01_color_astc_8x8_unorm.ktx", - "stonefloor01_color_bc3_unorm.ktx", - "stonefloor01_normal_astc_8x8_unorm.ktx", - "stonefloor01_normal_bc3_unorm.ktx", - "stonefloor01_color_etc2_unorm.ktx", - "stonefloor01_normal_etc2_unorm.ktx" - ], - "additional" : { - "directories": ["models/armor"], - "files": [ - "models/armor/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/deferredmultisampling/.gitignore b/android/deferredmultisampling/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/deferredmultisampling/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/deferredmultisampling/AndroidManifest.xml b/android/deferredmultisampling/AndroidManifest.xml deleted file mode 100644 index 64906144..00000000 --- a/android/deferredmultisampling/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/deferredmultisampling/example.json b/android/deferredmultisampling/example.json deleted file mode 100644 index 7ce1dc65..00000000 --- a/android/deferredmultisampling/example.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "apkname": "vulkanDeferredmulitsampling", - "directories": { - "shaders": "deferredmultisampling" - }, - "assets": { - "models": [ - "openbox.dae" - ], - "textures": [ - "stonefloor02_color_astc_8x8_unorm.ktx", - "stonefloor02_color_bc3_unorm.ktx", - "stonefloor02_normal_astc_8x8_unorm.ktx", - "stonefloor02_normal_bc3_unorm.ktx", - "stonefloor02_color_etc2_unorm.ktx", - "stonefloor02_normal_etc2_unorm.ktx" - ], - "additional" : { - "directories": ["models/armor"], - "files": [ - "models/armor/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/deferredshadows/.gitignore b/android/deferredshadows/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/deferredshadows/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/deferredshadows/AndroidManifest.xml b/android/deferredshadows/AndroidManifest.xml deleted file mode 100644 index 7bead55f..00000000 --- a/android/deferredshadows/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/deferredshadows/example.json b/android/deferredshadows/example.json deleted file mode 100644 index 64fda99a..00000000 --- a/android/deferredshadows/example.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "apkname": "vulkanDeferredshadows", - "directories": { - "shaders": "deferredshadows" - }, - "assets": { - "models": [ - "openbox.dae" - ], - "textures": [ - "stonefloor02_color_astc_8x8_unorm.ktx", - "stonefloor02_color_bc3_unorm.ktx", - "stonefloor02_normal_astc_8x8_unorm.ktx", - "stonefloor02_normal_bc3_unorm.ktx", - "stonefloor02_color_etc2_unorm.ktx", - "stonefloor02_normal_etc2_unorm.ktx" - ], - "additional" : { - "directories": ["models/armor"], - "files": [ - "models/armor/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/descriptorsets/.gitignore b/android/descriptorsets/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/descriptorsets/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/descriptorsets/AndroidManifest.xml b/android/descriptorsets/AndroidManifest.xml deleted file mode 100644 index 985a732d..00000000 --- a/android/descriptorsets/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/descriptorsets/example.json b/android/descriptorsets/example.json deleted file mode 100644 index 6172a259..00000000 --- a/android/descriptorsets/example.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "apkname": "vulkanDescriptorsets", - "directories": { - "shaders": "descriptorsets" - }, - "assets": { - "models": [ - "cube.dae" - ], - "textures": [ - "crate01_color_height_rgba.ktx", - "crate02_color_height_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/displacement/.gitignore b/android/displacement/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/displacement/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/displacement/AndroidManifest.xml b/android/displacement/AndroidManifest.xml deleted file mode 100644 index 64b1b6f4..00000000 --- a/android/displacement/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/displacement/example.json b/android/displacement/example.json deleted file mode 100644 index 91199b88..00000000 --- a/android/displacement/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanDisplacement", - "directories": { - "shaders": "displacement" - }, - "assets": { - "models": [ - "plane.obj" - ], - "textures": [ - "stonefloor03_color_bc3_unorm.ktx", - "stonefloor03_color_astc_8x8_unorm.ktx", - "stonefloor03_color_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/distancefieldfonts/.gitignore b/android/distancefieldfonts/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/distancefieldfonts/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/distancefieldfonts/AndroidManifest.xml b/android/distancefieldfonts/AndroidManifest.xml deleted file mode 100644 index 27cf582a..00000000 --- a/android/distancefieldfonts/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/distancefieldfonts/example.json b/android/distancefieldfonts/example.json deleted file mode 100644 index 4809371c..00000000 --- a/android/distancefieldfonts/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apkname": "vulkanDistancefieldfonts", - "directories": { - "shaders": "distancefieldfonts" - }, - "assets": { - "textures": [ - "font_sdf_rgba.ktx", - "font_bitmap_rgba.ktx" - ], - "additional": { - "files": [ - "/font.fnt" - ] - } - } -} \ No newline at end of file diff --git a/android/dynamicuniformbuffer/.gitignore b/android/dynamicuniformbuffer/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/dynamicuniformbuffer/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/dynamicuniformbuffer/AndroidManifest.xml b/android/dynamicuniformbuffer/AndroidManifest.xml deleted file mode 100644 index ecd1f165..00000000 --- a/android/dynamicuniformbuffer/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/dynamicuniformbuffer/example.json b/android/dynamicuniformbuffer/example.json deleted file mode 100644 index cdee2177..00000000 --- a/android/dynamicuniformbuffer/example.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "apkname": "vulkanDynamicuniformbuffer", - "directories": { - "shaders": "dynamicuniformbuffer" - }, - "assets": {} -} \ No newline at end of file diff --git a/android/gears/.gitignore b/android/gears/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/gears/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/gears/AndroidManifest.xml b/android/gears/AndroidManifest.xml deleted file mode 100644 index b06d0c5a..00000000 --- a/android/gears/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/gears/example.json b/android/gears/example.json deleted file mode 100644 index 2abf6a15..00000000 --- a/android/gears/example.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "apkname": "vulkanGears", - "directories": { - "shaders": "gears" - }, - "assets": {} -} \ No newline at end of file diff --git a/android/geometryshader/.gitignore b/android/geometryshader/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/geometryshader/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/geometryshader/AndroidManifest.xml b/android/geometryshader/AndroidManifest.xml deleted file mode 100644 index e2369a7c..00000000 --- a/android/geometryshader/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/geometryshader/example.json b/android/geometryshader/example.json deleted file mode 100644 index dca01d7e..00000000 --- a/android/geometryshader/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanGeometryshader", - "directories": { - "shaders": "geometryshader" - }, - "assets": { - "models": [ - "suzanne.obj" - ] - } -} \ No newline at end of file diff --git a/android/hdr/.gitignore b/android/hdr/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/hdr/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/hdr/AndroidManifest.xml b/android/hdr/AndroidManifest.xml deleted file mode 100644 index 7b4a825b..00000000 --- a/android/hdr/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/hdr/example.json b/android/hdr/example.json deleted file mode 100644 index 595df0ca..00000000 --- a/android/hdr/example.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "apkname": "vulkanHDR", - "directories": { - "shaders": "hdr" - }, - "assets": { - "models": [ - "cube.obj", - "geosphere.obj", - "teapot.dae", - "torusknot.obj", - "venus.fbx" - ], - "additional" : { - "directories": [ - "textures/hdr" - ], - "files": [ - "textures/hdr/uffizi_cube.ktx" - ] - } - } -} \ No newline at end of file diff --git a/android/imgui/.gitignore b/android/imgui/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/imgui/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/imgui/AndroidManifest.xml b/android/imgui/AndroidManifest.xml deleted file mode 100644 index dba0fa3b..00000000 --- a/android/imgui/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/imgui/example.json b/android/imgui/example.json deleted file mode 100644 index 1341f23e..00000000 --- a/android/imgui/example.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "apkname": "vulkanImGui", - "directories": { - "shaders": "imgui" - }, - "assets": { - "models": [ - "vulkanscenemodels.dae", - "vulkanscenebackground.dae", - "vulkanscenelogos.dae" - ] - } -} \ No newline at end of file diff --git a/android/indirectdraw/.gitignore b/android/indirectdraw/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/indirectdraw/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/indirectdraw/AndroidManifest.xml b/android/indirectdraw/AndroidManifest.xml deleted file mode 100644 index 56e76021..00000000 --- a/android/indirectdraw/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/indirectdraw/example.json b/android/indirectdraw/example.json deleted file mode 100644 index 83135e1a..00000000 --- a/android/indirectdraw/example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "apkname": "vulkanIndirectdraw", - "directories": { - "shaders": "indirectdraw" - }, - "assets": { - "models": [ - "plants.dae", - "plane_circle.dae", - "skysphere.dae" - ], - "textures": [ - "texturearray_plants_bc3_unorm.ktx", - "texturearray_plants_astc_8x8_unorm.ktx", - "texturearray_plants_etc2_unorm.ktx", - "ground_dry_bc3_unorm.ktx", - "ground_dry_astc_8x8_unorm.ktx", - "ground_dry_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/instancing/.gitignore b/android/instancing/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/instancing/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/instancing/AndroidManifest.xml b/android/instancing/AndroidManifest.xml deleted file mode 100644 index 70490828..00000000 --- a/android/instancing/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/instancing/example.json b/android/instancing/example.json deleted file mode 100644 index 76bf7d50..00000000 --- a/android/instancing/example.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "apkname": "vulkanInstancing", - "directories": { - "shaders": "instancing" - }, - "assets": { - "models": [ - "rock01.dae", - "sphere.obj" - ], - "textures": [ - "texturearray_rocks_bc3_unorm.ktx", - "texturearray_rocks_astc_8x8_unorm.ktx", - "texturearray_rocks_etc2_unorm.ktx", - "lavaplanet_bc3_unorm.ktx", - "lavaplanet_astc_8x8_unorm.ktx", - "lavaplanet_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/mesh/.gitignore b/android/mesh/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/mesh/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/mesh/AndroidManifest.xml b/android/mesh/AndroidManifest.xml deleted file mode 100644 index a6d918f0..00000000 --- a/android/mesh/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/mesh/example.json b/android/mesh/example.json deleted file mode 100644 index 734e36f3..00000000 --- a/android/mesh/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanMesh", - "directories": { - "shaders": "mesh" - }, - "assets": { - "additional": { - "directories": [ - "models/voyager" - ], - "files": [ - "models/voyager/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/multisampling/.gitignore b/android/multisampling/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/multisampling/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/multisampling/AndroidManifest.xml b/android/multisampling/AndroidManifest.xml deleted file mode 100644 index ec1f09ef..00000000 --- a/android/multisampling/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/multisampling/example.json b/android/multisampling/example.json deleted file mode 100644 index 2150538a..00000000 --- a/android/multisampling/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanMultisampling", - "directories": { - "shaders": "mesh" - }, - "assets": { - "additional": { - "directories": [ - "models/voyager" - ], - "files": [ - "models/voyager/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/multithreading/.gitignore b/android/multithreading/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/multithreading/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/multithreading/AndroidManifest.xml b/android/multithreading/AndroidManifest.xml deleted file mode 100644 index 656c5d43..00000000 --- a/android/multithreading/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/multithreading/example.json b/android/multithreading/example.json deleted file mode 100644 index 888d24e0..00000000 --- a/android/multithreading/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apkname": "vulkanMultithreading", - "directories": { - "shaders": "multithreading" - }, - "assets": { - "models": [ - "retroufo_red_lowpoly.dae", - "sphere.obj" - ] - } -} \ No newline at end of file diff --git a/android/occlusionquery/.gitignore b/android/occlusionquery/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/occlusionquery/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/occlusionquery/AndroidManifest.xml b/android/occlusionquery/AndroidManifest.xml deleted file mode 100644 index cde9428a..00000000 --- a/android/occlusionquery/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/occlusionquery/example.json b/android/occlusionquery/example.json deleted file mode 100644 index f7f4b5d7..00000000 --- a/android/occlusionquery/example.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "apkname": "vulkanOcclusionquery", - "directories": { - "shaders": "occlusionquery" - }, - "assets": { - "models": [ - "plane_z.3ds", - "teapot.3ds", - "sphere.3ds" - ] - } -} \ No newline at end of file diff --git a/android/offscreen/.gitignore b/android/offscreen/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/offscreen/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/offscreen/AndroidManifest.xml b/android/offscreen/AndroidManifest.xml deleted file mode 100644 index 2e20569f..00000000 --- a/android/offscreen/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/offscreen/example.json b/android/offscreen/example.json deleted file mode 100644 index db98376e..00000000 --- a/android/offscreen/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apkname": "vulkanOffscreen", - "directories": { - "shaders": "offscreen" - }, - "assets": { - "models": [ - "plane.obj", - "chinesedragon.dae" - ], - "textures": [ - "darkmetal_bc3_unorm.ktx", - "darkmetal_astc_8x8_unorm.ktx", - "darkmetal_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/parallaxmapping/.gitignore b/android/parallaxmapping/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/parallaxmapping/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/parallaxmapping/AndroidManifest.xml b/android/parallaxmapping/AndroidManifest.xml deleted file mode 100644 index 1d700370..00000000 --- a/android/parallaxmapping/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/parallaxmapping/example.json b/android/parallaxmapping/example.json deleted file mode 100644 index 7cc51c3d..00000000 --- a/android/parallaxmapping/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apkname": "vulkanParallaxmapping", - "directories": { - "shaders": "parallaxmapping" - }, - "assets": { - "models": [ - "plane_z.obj" - ], - "textures": [ - "rocks_normal_height_rgba.dds", - "rocks_color_bc3_unorm.dds", - "rocks_color_astc_8x8_unorm.ktx", - "rocks_color_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/particlefire/.gitignore b/android/particlefire/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/particlefire/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/particlefire/AndroidManifest.xml b/android/particlefire/AndroidManifest.xml deleted file mode 100644 index 49383d38..00000000 --- a/android/particlefire/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/particlefire/example.json b/android/particlefire/example.json deleted file mode 100644 index 30f12040..00000000 --- a/android/particlefire/example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "apkname": "vulkanParticlefire", - "directories": { - "shaders": "particlefire" - }, - "assets": { - "models": [ - "fireplace.obj" - ], - "textures": [ - "particle_fire.ktx", - "particle_smoke.ktx", - "fireplace_normalmap_bc3_unorm.ktx", - "fireplace_normalmap_astc_8x8_unorm.ktx", - "fireplace_normalmap_etc2_unorm.ktx", - "fireplace_colormap_bc3_unorm.ktx", - "fireplace_colormap_astc_8x8_unorm.ktx", - "fireplace_colormap_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/pbrbasic/.gitignore b/android/pbrbasic/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pbrbasic/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pbrbasic/AndroidManifest.xml b/android/pbrbasic/AndroidManifest.xml deleted file mode 100644 index 537ac5a9..00000000 --- a/android/pbrbasic/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pbrbasic/example.json b/android/pbrbasic/example.json deleted file mode 100644 index fc12510a..00000000 --- a/android/pbrbasic/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanPBRBasic", - "directories": { - "shaders": "pbrbasic" - }, - "assets": { - "models": [ - "geosphere.obj", - "teapot.dae", - "torusknot.obj", - "venus.fbx" - ] - } -} \ No newline at end of file diff --git a/android/pbribl/.gitignore b/android/pbribl/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pbribl/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pbribl/AndroidManifest.xml b/android/pbribl/AndroidManifest.xml deleted file mode 100644 index f0673290..00000000 --- a/android/pbribl/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pbribl/example.json b/android/pbribl/example.json deleted file mode 100644 index f2620b81..00000000 --- a/android/pbribl/example.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "apkname": "vulkanPBRIBL", - "directories": { - "shaders": "pbribl" - }, - "assets": { - "models": [ - "cube.obj", - "geosphere.obj", - "teapot.dae", - "torusknot.obj", - "venus.fbx" - ], - "additional" : { - "directories": [ - "textures/hdr" - ], - "files": [ - "textures/hdr/pisa_cube.ktx" - ] - } - } -} \ No newline at end of file diff --git a/android/pbrtexture/.gitignore b/android/pbrtexture/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pbrtexture/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pbrtexture/AndroidManifest.xml b/android/pbrtexture/AndroidManifest.xml deleted file mode 100644 index e43a7d97..00000000 --- a/android/pbrtexture/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pbrtexture/example.json b/android/pbrtexture/example.json deleted file mode 100644 index 32584555..00000000 --- a/android/pbrtexture/example.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "apkname": "vulkanPBRTexture", - "directories": { - "shaders": "pbrtexture" - }, - "assets": { - "models": [ - "cube.obj" - ], - "additional" : { - "directories": ["textures/hdr", "models/cerberus"], - "files": [ - "textures/hdr/gcanyon_cube.ktx", - "models/cerberus/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/pipelines/.gitignore b/android/pipelines/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pipelines/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pipelines/AndroidManifest.xml b/android/pipelines/AndroidManifest.xml deleted file mode 100644 index 65a7b2b9..00000000 --- a/android/pipelines/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pipelines/example.json b/android/pipelines/example.json deleted file mode 100644 index 49856b43..00000000 --- a/android/pipelines/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanPipelines", - "directories": { - "shaders": "pipelines" - }, - "assets": { - "models": [ - "treasure_smooth.dae" - ] - } -} \ No newline at end of file diff --git a/android/pipelinestatistics/.gitignore b/android/pipelinestatistics/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pipelinestatistics/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pipelinestatistics/AndroidManifest.xml b/android/pipelinestatistics/AndroidManifest.xml deleted file mode 100644 index 7e73dc1a..00000000 --- a/android/pipelinestatistics/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pipelinestatistics/example.json b/android/pipelinestatistics/example.json deleted file mode 100644 index ee6eebfd..00000000 --- a/android/pipelinestatistics/example.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "apkname": "vulkanPipelinestatistics", - "directories": { - "shaders": "pipelinestatistics" - }, - "assets": { - "models": [ - "cube.obj", - "geosphere.obj", - "teapot.dae", - "torusknot.obj", - "venus.fbx" - ] - } -} \ No newline at end of file diff --git a/android/pushconstants/.gitignore b/android/pushconstants/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pushconstants/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pushconstants/AndroidManifest.xml b/android/pushconstants/AndroidManifest.xml deleted file mode 100644 index 95bac500..00000000 --- a/android/pushconstants/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pushconstants/example.json b/android/pushconstants/example.json deleted file mode 100644 index ab370ffc..00000000 --- a/android/pushconstants/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanPushconstants", - "directories": { - "shaders": "pushconstants" - }, - "assets": { - "models": [ - "samplescene.dae" - ] - } -} \ No newline at end of file diff --git a/android/pushdescriptors/.gitignore b/android/pushdescriptors/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/pushdescriptors/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/pushdescriptors/AndroidManifest.xml b/android/pushdescriptors/AndroidManifest.xml deleted file mode 100644 index 754e9167..00000000 --- a/android/pushdescriptors/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/pushdescriptors/example.json b/android/pushdescriptors/example.json deleted file mode 100644 index b04a71a3..00000000 --- a/android/pushdescriptors/example.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "apkname": "vulkanPushdescriptors", - "directories": { - "shaders": "pushdescriptors" - }, - "assets": { - "models": [ - "cube.dae" - ], - "textures": [ - "crate01_color_height_rgba.ktx", - "crate02_color_height_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/radialblur/.gitignore b/android/radialblur/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/radialblur/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/radialblur/AndroidManifest.xml b/android/radialblur/AndroidManifest.xml deleted file mode 100644 index 39719255..00000000 --- a/android/radialblur/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/radialblur/example.json b/android/radialblur/example.json deleted file mode 100644 index 871a206f..00000000 --- a/android/radialblur/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanRadialblur", - "directories": { - "shaders": "radialblur" - }, - "assets": { - "models": [ - "glowsphere.dae" - ], - "textures": [ - "particle_gradient_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/raytracing/.gitignore b/android/raytracing/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/raytracing/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/raytracing/AndroidManifest.xml b/android/raytracing/AndroidManifest.xml deleted file mode 100644 index 9af99ae2..00000000 --- a/android/raytracing/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/raytracing/example.json b/android/raytracing/example.json deleted file mode 100644 index daa22f46..00000000 --- a/android/raytracing/example.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "apkname": "vulkanRaytracing", - "directories": { - "shaders": "raytracing" - }, - "assets": {} -} \ No newline at end of file diff --git a/android/renderheadless/.gitignore b/android/renderheadless/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/renderheadless/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/renderheadless/AndroidManifest.xml b/android/renderheadless/AndroidManifest.xml deleted file mode 100644 index af83adff..00000000 --- a/android/renderheadless/AndroidManifest.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/renderheadless/example.json b/android/renderheadless/example.json deleted file mode 100644 index 555f5de0..00000000 --- a/android/renderheadless/example.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "apkname": "vulkanRenderheadless", - "directories": { - "shaders": "renderheadless" - }, - "assets": { - } -} \ No newline at end of file diff --git a/android/scenerendering/.gitignore b/android/scenerendering/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/scenerendering/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/scenerendering/AndroidManifest.xml b/android/scenerendering/AndroidManifest.xml deleted file mode 100644 index 5c4c9c14..00000000 --- a/android/scenerendering/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/scenerendering/example.json b/android/scenerendering/example.json deleted file mode 100644 index bdc959ef..00000000 --- a/android/scenerendering/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanScenerendering", - "directories": { - "shaders": "scenerendering" - }, - "assets": { - "additional" : { - "directories" : [ - "models/sibenik" - ], - "files" : [ - "models/sibenik/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/shadowmapping/.gitignore b/android/shadowmapping/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/shadowmapping/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/shadowmapping/AndroidManifest.xml b/android/shadowmapping/AndroidManifest.xml deleted file mode 100644 index 3c925452..00000000 --- a/android/shadowmapping/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/shadowmapping/example.json b/android/shadowmapping/example.json deleted file mode 100644 index edbd65ce..00000000 --- a/android/shadowmapping/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanShadowmapping", - "directories": { - "shaders": "shadowmapping" - }, - "assets": { - "models": [ - "vulkanscene_shadow.dae" - ] - } -} \ No newline at end of file diff --git a/android/shadowmappingcascade/.gitignore b/android/shadowmappingcascade/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/shadowmappingcascade/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/shadowmappingcascade/AndroidManifest.xml b/android/shadowmappingcascade/AndroidManifest.xml deleted file mode 100644 index 5dcde9fc..00000000 --- a/android/shadowmappingcascade/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/shadowmappingcascade/example.json b/android/shadowmappingcascade/example.json deleted file mode 100644 index 4ee83b2c..00000000 --- a/android/shadowmappingcascade/example.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "apkname": "vulkanShadowmappingcascade", - "directories": { - "shaders": "shadowmappingcascade" - }, - "assets": { - "models": [ - "terrain_simple.dae", - "oak_trunk.dae", - "oak_leafs.dae" - ], - "textures": [ - "gridlines.ktx", - "oak_bark.ktx", - "oak_leafs.ktx" - ] - } -} \ No newline at end of file diff --git a/android/shadowmappingomni/.gitignore b/android/shadowmappingomni/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/shadowmappingomni/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/shadowmappingomni/AndroidManifest.xml b/android/shadowmappingomni/AndroidManifest.xml deleted file mode 100644 index c17eb35d..00000000 --- a/android/shadowmappingomni/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/shadowmappingomni/example.json b/android/shadowmappingomni/example.json deleted file mode 100644 index 907f1421..00000000 --- a/android/shadowmappingomni/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apkname": "vulkanShadowmappingomni", - "directories": { - "shaders": "shadowmapomni" - }, - "assets": { - "models": [ - "shadowscene_fire.dae", - "cube.obj" - ] - } -} \ No newline at end of file diff --git a/android/skeletalanimation/.gitignore b/android/skeletalanimation/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/skeletalanimation/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/skeletalanimation/AndroidManifest.xml b/android/skeletalanimation/AndroidManifest.xml deleted file mode 100644 index dfea8a0b..00000000 --- a/android/skeletalanimation/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/skeletalanimation/example.json b/android/skeletalanimation/example.json deleted file mode 100644 index 992ce5cc..00000000 --- a/android/skeletalanimation/example.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "apkname": "vulkanSkeletalanimation", - "directories": { - "shaders": "skeletalanimation" - }, - "assets": { - "models": [ - "goblin.dae", - "plane_z.obj" - ], - "textures": [ - "trail_bc3_unorm.ktx", - "goblin_bc3_unorm.ktx", - "trail_astc_8x8_unorm.ktx", - "goblin_astc_8x8_unorm.ktx", - "trail_etc2_unorm.ktx", - "goblin_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/specializationconstants/.gitignore b/android/specializationconstants/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/specializationconstants/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/specializationconstants/AndroidManifest.xml b/android/specializationconstants/AndroidManifest.xml deleted file mode 100644 index 724e4fb8..00000000 --- a/android/specializationconstants/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/specializationconstants/example.json b/android/specializationconstants/example.json deleted file mode 100644 index e0d87e78..00000000 --- a/android/specializationconstants/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanSpecializationconstants", - "directories": { - "shaders": "specializationconstants" - }, - "assets": { - "models": [ - "color_teapot_spheres.dae" - ], - "textures" : [ - "metalplate_nomips_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/sphericalenvmapping/.gitignore b/android/sphericalenvmapping/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/sphericalenvmapping/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/sphericalenvmapping/AndroidManifest.xml b/android/sphericalenvmapping/AndroidManifest.xml deleted file mode 100644 index 04ac63c3..00000000 --- a/android/sphericalenvmapping/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/sphericalenvmapping/example.json b/android/sphericalenvmapping/example.json deleted file mode 100644 index 0db9c325..00000000 --- a/android/sphericalenvmapping/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanSphericalenvmapping", - "directories": { - "shaders": "sphericalenvmapping" - }, - "assets": { - "models": [ - "chinesedragon.dae" - ], - "textures": [ - "matcap_array_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/ssao/.gitignore b/android/ssao/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/ssao/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/ssao/AndroidManifest.xml b/android/ssao/AndroidManifest.xml deleted file mode 100644 index 049ef2e9..00000000 --- a/android/ssao/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/ssao/example.json b/android/ssao/example.json deleted file mode 100644 index 085ad64c..00000000 --- a/android/ssao/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "apkname": "vulkanSSAO", - "directories": { - "shaders": "ssao" - }, - "assets": { - "additional" : { - "directories" : [ - "models/sibenik" - ], - "files" : [ - "models/sibenik/*.*" - ] - } - } -} \ No newline at end of file diff --git a/android/stencilbuffer/.gitignore b/android/stencilbuffer/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/stencilbuffer/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/stencilbuffer/AndroidManifest.xml b/android/stencilbuffer/AndroidManifest.xml deleted file mode 100644 index 56fb2a79..00000000 --- a/android/stencilbuffer/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/stencilbuffer/example.json b/android/stencilbuffer/example.json deleted file mode 100644 index b044522a..00000000 --- a/android/stencilbuffer/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanStencilbuffer", - "directories": { - "shaders": "stencilbuffer" - }, - "assets": { - "models": [ - "venus.fbx" - ] - } -} \ No newline at end of file diff --git a/android/subpasses/.gitignore b/android/subpasses/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/subpasses/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/subpasses/AndroidManifest.xml b/android/subpasses/AndroidManifest.xml deleted file mode 100644 index 868bbdf1..00000000 --- a/android/subpasses/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/subpasses/example.json b/android/subpasses/example.json deleted file mode 100644 index 4ae16f32..00000000 --- a/android/subpasses/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apkname": "vulkanSubpasses", - "directories": { - "shaders": "subpasses" - }, - "assets": { - "models": [ - "samplebuilding.dae", - "samplebuilding_glass.dae" - ], - "textures": [ - "colored_glass_bc3_unorm.ktx", - "colored_glass_etc2_unorm.ktx", - "colored_glass_astc_8x8_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/templates/Android.mk b/android/templates/Android.mk deleted file mode 100644 index 484d9601..00000000 --- a/android/templates/Android.mk +++ /dev/null @@ -1,49 +0,0 @@ -LOCAL_PATH := $(call my-dir)/../../%SRC_FOLDER% - -# assimp - -include $(CLEAR_VARS) - -LOCAL_MODULE := assimp -LOCAL_SRC_FILES := $(LOCAL_PATH)/../../libs/assimp/$(TARGET_ARCH_ABI)/libassimp.a -include $(PREBUILT_STATIC_LIBRARY) - -# vulkan example - -DATADIR := $(LOCAL_PATH)/../../data - -include $(CLEAR_VARS) - -LOCAL_MODULE := %APK_NAME% - -PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../examples/%SRC_FOLDER%/*.cpp) -PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.cpp) -PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../external/imgui/imgui.cpp $(LOCAL_PATH)/../../external/imgui/imgui_draw.cpp) - -LOCAL_CPPFLAGS := -std=c++11 -LOCAL_CPPFLAGS += -D__STDC_LIMIT_MACROS -LOCAL_CPPFLAGS += -DVK_NO_PROTOTYPES -LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../external/ -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../external/glm -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../external/gli -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../external/assimp -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../external/imgui -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/ - -LOCAL_SRC_FILES := $(PROJECT_FILES) - -LOCAL_LDLIBS := -landroid -llog -lz - -LOCAL_DISABLE_FORMAT_STRING_CHECKS := true -LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true - -LOCAL_STATIC_LIBRARIES += android_native_app_glue -LOCAL_STATIC_LIBRARIES += cpufeatures -LOCAL_STATIC_LIBRARIES += libassimp - -include $(BUILD_SHARED_LIBRARY) - -$(call import-module, android/native_app_glue) -$(call import-module, android/cpufeatures) diff --git a/android/templates/Application.mk b/android/templates/Application.mk deleted file mode 100644 index 3bedee99..00000000 --- a/android/templates/Application.mk +++ /dev/null @@ -1,7 +0,0 @@ -APP_PLATFORM := android-19 -APP_ABI := armeabi-v7a -APP_STL := c++_static -APP_CPPFLAGS := -std=c++11 -APP_CPPFLAGS += -fexceptions -NDK_TOOLCHAIN_VERSION := clang - diff --git a/android/terraintessellation/.gitignore b/android/terraintessellation/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/terraintessellation/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/terraintessellation/AndroidManifest.xml b/android/terraintessellation/AndroidManifest.xml deleted file mode 100644 index 943a86a0..00000000 --- a/android/terraintessellation/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/terraintessellation/example.json b/android/terraintessellation/example.json deleted file mode 100644 index 94e8d7e4..00000000 --- a/android/terraintessellation/example.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "apkname": "vulkanTerraintessellation", - "directories": { - "shaders": "terraintessellation" - }, - "assets": { - "models": [ - "geosphere.obj" - ], - "textures": [ - "skysphere_bc3_unorm.ktx", - "skysphere_astc_8x8_unorm.ktx", - "skysphere_etc2_unorm.ktx", - "terrain_texturearray_bc3_unorm.ktx", - "terrain_texturearray_astc_8x8_unorm.ktx", - "terrain_texturearray_etc2_unorm.ktx", - "terrain_heightmap_r16.ktx" - ] - } -} \ No newline at end of file diff --git a/android/tessellation/.gitignore b/android/tessellation/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/tessellation/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/tessellation/AndroidManifest.xml b/android/tessellation/AndroidManifest.xml deleted file mode 100644 index 4aab2ae7..00000000 --- a/android/tessellation/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/tessellation/example.json b/android/tessellation/example.json deleted file mode 100644 index 54d5edeb..00000000 --- a/android/tessellation/example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "apkname": "vulkanTessellation", - "directories": { - "shaders": "tessellation" - }, - "assets": { - "textures": [ - "deer_bc3_unorm.ktx", - "deer_astc_8x8_unorm.ktx", - "deer_etc2_unorm.ktx" - ], - "additional": { - "directories": [ - "models/lowpoly" - ], - "files" : [ - "models/lowpoly/deer.dae" - ] - } - } -} \ No newline at end of file diff --git a/android/textoverlay/.gitignore b/android/textoverlay/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/textoverlay/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/textoverlay/AndroidManifest.xml b/android/textoverlay/AndroidManifest.xml deleted file mode 100644 index 3b726bca..00000000 --- a/android/textoverlay/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/textoverlay/example.json b/android/textoverlay/example.json deleted file mode 100644 index cc973316..00000000 --- a/android/textoverlay/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanTextoverlay", - "directories": { - "shaders": "textoverlay" - }, - "assets": { - "models": [ - "cube.dae" - ] - } -} \ No newline at end of file diff --git a/android/texture/.gitignore b/android/texture/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/texture/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/texture/AndroidManifest.xml b/android/texture/AndroidManifest.xml deleted file mode 100644 index 000250a7..00000000 --- a/android/texture/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/texture/example.json b/android/texture/example.json deleted file mode 100644 index 24ec5bb7..00000000 --- a/android/texture/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanTexture", - "directories": { - "shaders": "texture" - }, - "assets": { - "textures": [ - "metalplate01_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/texture3d/.gitignore b/android/texture3d/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/texture3d/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/texture3d/AndroidManifest.xml b/android/texture3d/AndroidManifest.xml deleted file mode 100644 index 3c0030b8..00000000 --- a/android/texture3d/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/texture3d/example.json b/android/texture3d/example.json deleted file mode 100644 index 470e6e74..00000000 --- a/android/texture3d/example.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "apkname": "vulkanTexture3d", - "directories": { - "shaders": "texture3d" - }, - "assets": {} -} \ No newline at end of file diff --git a/android/texturearray/.gitignore b/android/texturearray/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/texturearray/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/texturearray/AndroidManifest.xml b/android/texturearray/AndroidManifest.xml deleted file mode 100644 index 2964192a..00000000 --- a/android/texturearray/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/texturearray/example.json b/android/texturearray/example.json deleted file mode 100644 index 8bffb1a9..00000000 --- a/android/texturearray/example.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "apkname": "vulkanTexturearray", - "directories": { - "shaders": "texturearray" - }, - "assets": { - "textures": [ - "texturearray_bc3_unorm.ktx", - "texturearray_astc_8x8_unorm.ktx", - "texturearray_etc2_unorm.ktx" - ] - } -} \ No newline at end of file diff --git a/android/texturecubemap/.gitignore b/android/texturecubemap/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/texturecubemap/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/texturecubemap/AndroidManifest.xml b/android/texturecubemap/AndroidManifest.xml deleted file mode 100644 index 9cf18008..00000000 --- a/android/texturecubemap/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/texturecubemap/example.json b/android/texturecubemap/example.json deleted file mode 100644 index 71ce4787..00000000 --- a/android/texturecubemap/example.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "apkname": "vulkanTexturecubemap", - "directories": { - "shaders": "texturecubemap" - }, - "assets": { - "models": [ - "sphere.obj", - "teapot.dae", - "torusknot.obj", - "cube.obj" - ], - "textures": [ - "cubemap_yokohama_bc3_unorm.ktx", - "cubemap_yokohama_etc2_unorm.ktx", - "cubemap_yokohama_astc_8x8_unorm.ktx" - ] - } -} diff --git a/android/texturemipmapgen/.gitignore b/android/texturemipmapgen/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/texturemipmapgen/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/texturemipmapgen/AndroidManifest.xml b/android/texturemipmapgen/AndroidManifest.xml deleted file mode 100644 index 0eea6e7e..00000000 --- a/android/texturemipmapgen/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/texturemipmapgen/example.json b/android/texturemipmapgen/example.json deleted file mode 100644 index b54f2dd0..00000000 --- a/android/texturemipmapgen/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "apkname": "vulkanTexturemipmapgen", - "directories": { - "shaders": "texturemipmapgen" - }, - "assets": { - "models": [ - "tunnel_cylinder.dae" - ], - "textures": [ - "metalplate_nomips_rgba.ktx" - ] - } -} \ No newline at end of file diff --git a/android/triangle/.gitignore b/android/triangle/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/triangle/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/triangle/AndroidManifest.xml b/android/triangle/AndroidManifest.xml deleted file mode 100644 index 3a80cf84..00000000 --- a/android/triangle/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/triangle/example.json b/android/triangle/example.json deleted file mode 100644 index 081ad343..00000000 --- a/android/triangle/example.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "apkname": "vulkanTriangle", - "directories": { - "shaders": "triangle" - } -} \ No newline at end of file diff --git a/android/uninstall-all.py b/android/uninstall-all.py deleted file mode 100755 index 9ec637ce..00000000 --- a/android/uninstall-all.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python3 - -# Remove all examples from connected device(s) -import subprocess -import sys - -APP_NAMES = [ - "de.saschawillems.vulkanBloom", - "de.saschawillems.vulkanComputecullandlod", - "de.saschawillems.vulkanComputecloth", - "de.saschawillems.vulkanComputeheadless", - "de.saschawillems.vulkanComputenbody", - "de.saschawillems.vulkanComputeparticles", - "de.saschawillems.vulkanComputeshader", - "de.saschawillems.vulkanDebugmarker", - "de.saschawillems.vulkanDeferred", - "de.saschawillems.vulkanDeferredmulitsampling", - "de.saschawillems.vulkanDeferredshadows", - "de.saschawillems.vulkanDisplacement", - "de.saschawillems.vulkanDistancefieldfonts", - "de.saschawillems.vulkanDynamicuniformbuffer", - "de.saschawillems.vulkanGears", - "de.saschawillems.vulkanGeometryshader", - "de.saschawillems.vulkanHDR", - "de.saschawillems.vulkanImGui", - "de.saschawillems.vulkanIndirectdraw", - "de.saschawillems.vulkanInstancing", - "de.saschawillems.vulkanMesh", - "de.saschawillems.vulkanMultisampling", - "de.saschawillems.vulkanMultithreading", - "de.saschawillems.vulkanOcclusionquery", - "de.saschawillems.vulkanOffscreen", - "de.saschawillems.vulkanPBRBasic", - "de.saschawillems.vulkanPBRIBL", - "de.saschawillems.vulkanPBRTexture", - "de.saschawillems.vulkanParallaxmapping", - "de.saschawillems.vulkanParticlefire", - "de.saschawillems.vulkanPipelines", - "de.saschawillems.vulkanPipelinestatistics", - "de.saschawillems.vulkanPushconstants", - "de.saschawillems.vulkanRadialblur", - "de.saschawillems.vulkanRaytracing", - "de.saschawillems.vulkanRenderheadless", - "de.saschawillems.vulkanSSAO", - "de.saschawillems.vulkanScenerendering", - "de.saschawillems.vulkanShadowmapping", - "de.saschawillems.vulkanShadowmappingomni", - "de.saschawillems.vulkanShadowmappingcascade" - "de.saschawillems.vulkanSkeletalanimation", - "de.saschawillems.vulkanSpecializationconstants", - "de.saschawillems.vulkanSphericalenvmapping", - "de.saschawillems.vulkanStencilbuffer", - "de.saschawillems.vulkanSubpasses", - "de.saschawillems.vulkanTerraintessellation", - "de.saschawillems.vulkanTessellation", - "de.saschawillems.vulkanTextoverlay", - "de.saschawillems.vulkanTexture", - "de.saschawillems.vulkanTexture3d", - "de.saschawillems.vulkanTexturearray", - "de.saschawillems.vulkanTexturecubemap", - "de.saschawillems.vulkanTexturemipmapgen", - "de.saschawillems.vulkanTriangle", - "de.saschawillems.vulkanViewportarray", - "de.saschawillems.vulkanVulkanscene" -] - -CURR_INDEX = 0 - -answer = input("Uninstall all vulkan examples from attached device (Y/N)").lower() == 'y' -if answer: - for app in APP_NAMES: - print("Uninstalling %s (%d/%d)" % (app, CURR_INDEX, len(APP_NAMES))) - subprocess.call("adb uninstall %s" % (app)) - CURR_INDEX += 1 - diff --git a/android/viewportarray/.gitignore b/android/viewportarray/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/viewportarray/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/viewportarray/AndroidManifest.xml b/android/viewportarray/AndroidManifest.xml deleted file mode 100644 index e632dd83..00000000 --- a/android/viewportarray/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/viewportarray/example.json b/android/viewportarray/example.json deleted file mode 100644 index e4a7ce92..00000000 --- a/android/viewportarray/example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apkname": "vulkanViewportarray", - "directories": { - "shaders": "viewportarray" - }, - "assets": { - "models": [ - "sampleroom.dae" - ] - } -} \ No newline at end of file diff --git a/android/vulkanscene/.gitignore b/android/vulkanscene/.gitignore deleted file mode 100644 index 7a5d249c..00000000 --- a/android/vulkanscene/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/assets/ -/res/ -/bin/ -/libs/ -/obj/ -/build.xml -/local.properties -/project.properties -/proguard-project.txt -*.apk \ No newline at end of file diff --git a/android/vulkanscene/AndroidManifest.xml b/android/vulkanscene/AndroidManifest.xml deleted file mode 100644 index af49f7e5..00000000 --- a/android/vulkanscene/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/vulkanscene/example.json b/android/vulkanscene/example.json deleted file mode 100644 index 7820ea2e..00000000 --- a/android/vulkanscene/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "apkname": "vulkanVulkanscene", - "directories": { - "shaders": "vulkanscene" - }, - "assets": { - "models": [ - "vulkanscenelogos.dae", - "vulkanscenebackground.dae", - "vulkanscenemodels.dae", - "cube.obj" - ], - "textures": [ - "cubemap_vulkan.ktx" - ] - } -} \ No newline at end of file From 2d48a76138e89cd4a7ab91f1109123633dce5c96 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sun, 29 Apr 2018 11:54:29 +0200 Subject: [PATCH 02/24] Removed deprecated call to app_dummy --- base/vulkanexamplebase.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 5680fb74..cd157389 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -426,12 +426,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) \ } #elif defined(VK_USE_PLATFORM_ANDROID_KHR) // Android entry point -// A note on app_dummy(): This is required as the compiler may otherwise remove the main entry point of the application #define VULKAN_EXAMPLE_MAIN() \ VulkanExample *vulkanExample; \ void android_main(android_app* state) \ { \ - app_dummy(); \ vulkanExample = new VulkanExample(); \ state->userData = vulkanExample; \ state->onAppCmd = VulkanExample::handleAppCommand; \ From 3cde83945e5b905aa49ee36a113d4f2a74c4a7b5 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sun, 29 Apr 2018 12:28:43 +0200 Subject: [PATCH 03/24] Android gradle build files (triangle) --- android/.gitignore | 68 ++++++++ android/build.gradle | 19 +++ .../{images => common/res/drawable}/icon.png | Bin android/examples/triangle/CMakeLists.txt | 37 ++++ android/examples/triangle/build.gradle | 58 +++++++ android/examples/triangle/proguard-rules.pro | 25 +++ .../triangle/src/main/AndroidManifest.xml | 24 +++ .../vulkanSample/VulkanActivity.java | 20 +++ android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + android/gradlew | 160 ++++++++++++++++++ android/gradlew.bat | 90 ++++++++++ android/settings.gradle | 1 + 13 files changed, 508 insertions(+) create mode 100644 android/.gitignore create mode 100644 android/build.gradle rename android/{images => common/res/drawable}/icon.png (100%) create mode 100644 android/examples/triangle/CMakeLists.txt create mode 100644 android/examples/triangle/build.gradle create mode 100644 android/examples/triangle/proguard-rules.pro create mode 100644 android/examples/triangle/src/main/AndroidManifest.xml create mode 100644 android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/gradle/wrapper/gradle-wrapper.jar create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/settings.gradle diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 00000000..8db79c32 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,68 @@ +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/caches + +# Keystore files +# Uncomment the following line if you do not want to check your keystore files in. +#*.jks + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +**/assets/ +**/src/main/res/drawable/ \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 00000000..76d0d98b --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,19 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.1.1' + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} \ No newline at end of file diff --git a/android/images/icon.png b/android/common/res/drawable/icon.png similarity index 100% rename from android/images/icon.png rename to android/common/res/drawable/icon.png diff --git a/android/examples/triangle/CMakeLists.txt b/android/examples/triangle/CMakeLists.txt new file mode 100644 index 00000000..c92c2114 --- /dev/null +++ b/android/examples/triangle/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME triangle) + +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") +file(GLOB BASE_SRC "${BASE_DIR}/*.cpp") + +add_library( + native-lib SHARED + ${EXAMPLE_SRC} + ${BASE_SRC} + ${EXTERNAL_DIR}/imgui/imgui.cpp + ${EXTERNAL_DIR}/imgui/imgui_draw.cpp +) + +add_library(native-app-glue STATIC ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) + +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate") + +include_directories(${BASE_DIR}) +include_directories(${EXTERNAL_DIR}/glm) +include_directories(${EXTERNAL_DIR}/gli) +include_directories(${EXTERNAL_DIR}/imgui) +include_directories(${ANDROID_NDK}/sources/android/native_app_glue) + +target_link_libraries( + native-lib + native-app-glue + android + log +) diff --git a/android/examples/triangle/build.gradle b/android/examples/triangle/build.gradle new file mode 100644 index 00000000..6c207bd8 --- /dev/null +++ b/android/examples/triangle/build.gradle @@ -0,0 +1,58 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTriangle" + minSdkVersion 19 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + ndk { + abiFilters "armeabi-v7a" + } + externalNativeBuild { + cmake { + cppFlags "-std=c++11" + arguments "-DANDROID_STL=c++_static" + } + } + } + sourceSets { + main.assets.srcDirs = ['assets'] + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + externalNativeBuild { + cmake { + path "CMakeLists.txt" + } + } +} + +task copyRes(type: Copy) { + from '../../common/res/drawable' + into "src/main/res/drawable" + include 'icon.png' +} + +task copyBaseShaders(type: Copy) { + from '../../../data/shaders/base' + into "assets/shaders/base" + include '*.spv' +} + +task copyShaders(type: Copy) { + from '../../../data/shaders/triangle' + into "assets/shaders/triangle" + include '*.spv' +} + +preBuild.dependsOn copyRes +preBuild.dependsOn copyBaseShaders +preBuild.dependsOn copyShaders \ No newline at end of file diff --git a/android/examples/triangle/proguard-rules.pro b/android/examples/triangle/proguard-rules.pro new file mode 100644 index 00000000..93aade8d --- /dev/null +++ b/android/examples/triangle/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /home/SERILOCAL/l.west/Android/Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android/examples/triangle/src/main/AndroidManifest.xml b/android/examples/triangle/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f0852aea --- /dev/null +++ b/android/examples/triangle/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..f9500cd4 --- /dev/null +++ b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,20 @@ +/* + * 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.NativeActivity; +import android.os.Bundle; + +public class VulkanActivity extends NativeActivity { + static { + // Load native library + System.loadLibrary("native-lib"); + } + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } +} diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..13372aef5e24af05341d49695ee84e5f9b594659 GIT binary patch literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWk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cX0M+REsE*20+WQ79T9&cqT>=I_U% z{=8~^Isg(Nzo~`4iQfIb_#CVCD>#5h>=-Z#5dH}WxYzn%0)GAm6L2WdUdP=0_h>7f z(jh&7%1i(ZOn+}D8$iGK4Vs{pmHl_w4Qm-46H9>4^{3dz^DZDh+dw)6Xd@CpQNK$j z{CU;-cmpK=egplZ3y3%y=sEnCJ^eYVKXzV8H2_r*fJ*%*B;a1_lOpt6)IT1IAK2eB z{rie|uDJUrbgfUE>~C>@RO|m5ex55F{=~Bb4Cucp{ok7Yf9V}QuZ`#Gc|WaqsQlK- zKaV)iMRR__&Ak2Z=IM9R9g5$WM4u{a^C-7uX*!myEym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ literal 0 HcmV?d00001 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..36bca093 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Apr 17 21:10:32 CEST 2018 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip diff --git a/android/gradlew b/android/gradlew new file mode 100644 index 00000000..9d82f789 --- /dev/null +++ b/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 00000000..8a0b282a --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 00000000..85c5327f --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1 @@ +include 'examples/:triangle' From 1227f1e7f439412e697a0852d31cb3352c2548e0 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Mon, 30 Apr 2018 22:21:24 +0200 Subject: [PATCH 04/24] Removed deprecated call to app_dummy --- examples/triangle/triangle.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/triangle/triangle.cpp b/examples/triangle/triangle.cpp index 095a472d..5e53500f 100644 --- a/examples/triangle/triangle.cpp +++ b/examples/triangle/triangle.cpp @@ -1123,11 +1123,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLin #elif defined(__ANDROID__) // Android entry point -// A note on app_dummy(): This is required as the compiler may otherwise remove the main entry point of the application VulkanExample *vulkanExample; void android_main(android_app* state) { - app_dummy(); vulkanExample = new VulkanExample(); state->userData = vulkanExample; state->onAppCmd = VulkanExample::handleAppCommand; From 5056563f5d19ec87dc5a19768dc9c965ca4948a0 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Mon, 30 Apr 2018 22:24:45 +0200 Subject: [PATCH 05/24] Android alert display functionality using JNI --- android/examples/triangle/build.gradle | 3 +- .../vulkanSample/VulkanActivity.java | 39 +++++++++++++++++++ base/VulkanAndroid.cpp | 18 +++++++++ base/VulkanAndroid.h | 2 + base/VulkanTools.cpp | 5 ++- 5 files changed, 64 insertions(+), 3 deletions(-) diff --git a/android/examples/triangle/build.gradle b/android/examples/triangle/build.gradle index 6c207bd8..3d36cbc6 100644 --- a/android/examples/triangle/build.gradle +++ b/android/examples/triangle/build.gradle @@ -1,9 +1,10 @@ apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' android { compileSdkVersion 26 defaultConfig { - applicationId "de.saschawillems.vulkanTriangle" + applicationId "de.saschawillems.VulkanTriangle" minSdkVersion 19 targetSdkVersion 26 versionCode 1 diff --git a/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java index f9500cd4..a13088db 100644 --- a/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java +++ b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -5,10 +5,18 @@ */ 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 { + + VulkanActivity _activity; + static { // Load native library System.loadLibrary("native-lib"); @@ -16,5 +24,36 @@ public class VulkanActivity extends NativeActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + _activity = this; + } + + // Use a semaphore to create a modal dialog + + private final Semaphore semaphore = new Semaphore(0, true); + + public void showAlert(final String message) + { + ApplicationInfo applicationInfo = _activity.getApplicationInfo(); + final String applicationName = applicationInfo.nonLocalizedLabel.toString(); + + this.runOnUiThread(new Runnable() { + public void run() { + AlertDialog.Builder builder = new AlertDialog.Builder(_activity, AlertDialog.THEME_HOLO_DARK); + 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) { } } } diff --git a/base/VulkanAndroid.cpp b/base/VulkanAndroid.cpp index aba260ae..a0aa2b8c 100644 --- a/base/VulkanAndroid.cpp +++ b/base/VulkanAndroid.cpp @@ -11,6 +11,7 @@ #if defined(__ANDROID__) #include #include + #include android_app* androidApp; @@ -292,6 +293,23 @@ namespace vks vks::android::screenDensity = AConfiguration_getDensity(config); AConfiguration_delete(config); } + + // Displays a native alert dialog using JNI + void showAlert(const char* message) { + JNIEnv* jni; + androidApp->activity->vm->AttachCurrentThread(&jni, NULL); + + jstring jmessage = jni->NewStringUTF(message); + + jclass clazz = jni->GetObjectClass(androidApp->activity->clazz); + // Signature has to match java implementation (arguments) + jmethodID methodID = jni->GetMethodID(clazz, "showAlert", "(Ljava/lang/String;)V"); + jni->CallVoidMethod(androidApp->activity->clazz, methodID, jmessage); + jni->DeleteLocalRef(jmessage); + + androidApp->activity->vm->DetachCurrentThread(); + return; + } } } diff --git a/base/VulkanAndroid.h b/base/VulkanAndroid.h index 372b36ef..f3a2d68c 100644 --- a/base/VulkanAndroid.h +++ b/base/VulkanAndroid.h @@ -26,6 +26,7 @@ #include #include #include +#include // Missing from the NDK namespace std @@ -169,6 +170,7 @@ namespace vks void loadVulkanFunctions(VkInstance instance); void freeVulkanLibrary(); void getDeviceConfig(); + void showAlert(const char* message); } } diff --git a/base/VulkanTools.cpp b/base/VulkanTools.cpp index 12f6c101..3dd28bbf 100644 --- a/base/VulkanTools.cpp +++ b/base/VulkanTools.cpp @@ -268,8 +268,9 @@ namespace vks if (!errorModeSilent) { MessageBox(NULL, message.c_str(), NULL, MB_OK | MB_ICONERROR); } -#elif defined(__ANDROID__) - LOGE("Fatal error: %s", message.c_str()); +#elif defined(__ANDROID__) + LOGE("Fatal error: %s", message.c_str()); + vks::android::showAlert(message.c_str()); #endif std::cerr << message << "\n"; exit(exitCode); From 5fe9f915296a8445b8a4e56806e46b5ecf2f119e Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 1 May 2018 11:23:36 +0200 Subject: [PATCH 06/24] Code cleanup, return and exit conditions for Android --- .../vulkanSample/VulkanActivity.java | 9 +++--- base/VulkanTools.cpp | 2 ++ base/vulkanexamplebase.cpp | 29 ++++++++++++++----- base/vulkanexamplebase.h | 2 +- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java index a13088db..b8825637 100644 --- a/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java +++ b/android/examples/triangle/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -15,8 +15,6 @@ import java.util.concurrent.Semaphore; public class VulkanActivity extends NativeActivity { - VulkanActivity _activity; - static { // Load native library System.loadLibrary("native-lib"); @@ -24,7 +22,6 @@ public class VulkanActivity extends NativeActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - _activity = this; } // Use a semaphore to create a modal dialog @@ -33,12 +30,14 @@ public class VulkanActivity extends NativeActivity { public void showAlert(final String message) { - ApplicationInfo applicationInfo = _activity.getApplicationInfo(); + 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, AlertDialog.THEME_HOLO_DARK); + AlertDialog.Builder builder = new AlertDialog.Builder(activity, AlertDialog.THEME_HOLO_DARK); builder.setTitle(applicationName); builder.setMessage(message); builder.setPositiveButton("Close", new DialogInterface.OnClickListener() { diff --git a/base/VulkanTools.cpp b/base/VulkanTools.cpp index 3dd28bbf..8d43d660 100644 --- a/base/VulkanTools.cpp +++ b/base/VulkanTools.cpp @@ -273,7 +273,9 @@ namespace vks vks::android::showAlert(message.c_str()); #endif std::cerr << message << "\n"; +#if !defined(__ANDROID__) exit(exitCode); +#endif } void exitFatal(std::string message, VkResult resultCode) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index f12e533a..bb1adfa0 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -333,6 +333,7 @@ void VulkanExampleBase::renderLoop() // Exit loop, example will be destroyed in application main if (destroy) { + ANativeActivity_finish(androidApp->activity); break; } @@ -555,8 +556,10 @@ void VulkanExampleBase::renderLoop() updateOverlay(); } #endif - // Flush device to make sure all resources can be freed - vkDeviceWaitIdle(device); + // Flush device to make sure all resources can be freed + if (device != VK_NULL_HANDLE) { + vkDeviceWaitIdle(device); + } } void VulkanExampleBase::updateOverlay() @@ -830,7 +833,7 @@ VulkanExampleBase::~VulkanExampleBase() #endif } -void VulkanExampleBase::initVulkan() +bool VulkanExampleBase::initVulkan() { VkResult err; @@ -838,6 +841,7 @@ void VulkanExampleBase::initVulkan() err = createInstance(settings.validation); if (err) { vks::tools::exitFatal("Could not create Vulkan instance : \n" + vks::tools::errorString(err), err); + return false; } #if defined(VK_USE_PLATFORM_ANDROID_KHR) @@ -864,6 +868,7 @@ void VulkanExampleBase::initVulkan() err = vkEnumeratePhysicalDevices(instance, &gpuCount, physicalDevices.data()); if (err) { vks::tools::exitFatal("Could not enumerate physical devices : \n" + vks::tools::errorString(err), err); + return false; } // GPU selection @@ -939,6 +944,7 @@ void VulkanExampleBase::initVulkan() VkResult res = vulkanDevice->createLogicalDevice(enabledFeatures, enabledDeviceExtensions); if (res != VK_SUCCESS) { vks::tools::exitFatal("Could not create Vulkan device: \n" + vks::tools::errorString(res), res); + return false; } device = vulkanDevice->logicalDevice; @@ -988,6 +994,8 @@ void VulkanExampleBase::initVulkan() }; LOGD("androidProduct = %s", androidProduct.c_str()); #endif + + return true; } #if defined(_WIN32) @@ -1399,9 +1407,14 @@ void VulkanExampleBase::handleAppCommand(android_app * app, int32_t cmd) LOGD("APP_CMD_INIT_WINDOW"); if (androidApp->window != NULL) { - vulkanExample->initVulkan(); - vulkanExample->prepare(); - assert(vulkanExample->prepared); + if (vulkanExample->initVulkan()) { + vulkanExample->prepare(); + assert(vulkanExample->prepared); + } + else { + LOGE("Could not initialize Vulkan, exiting!"); + androidApp->destroyRequested = 1; + } } else { @@ -1419,7 +1432,9 @@ void VulkanExampleBase::handleAppCommand(android_app * app, int32_t cmd) case APP_CMD_TERM_WINDOW: // Window is hidden or closed, clean up resources LOGD("APP_CMD_TERM_WINDOW"); - vulkanExample->swapChain.cleanup(); + if (vulkanExample->prepared) { + vulkanExample->swapChain.cleanup(); + } break; } } diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index cd157389..76e8c464 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -250,7 +250,7 @@ public: virtual ~VulkanExampleBase(); // Setup the vulkan instance, enable required extensions and connect to the physical device (GPU) - void initVulkan(); + bool initVulkan(); #if defined(_WIN32) void setupConsole(std::string title); From 20367d512a2ff02a4cba0cbb95184d156357b29a Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 1 May 2018 14:01:02 +0200 Subject: [PATCH 07/24] Single gradle asset copy task --- android/examples/triangle/build.gradle | 38 +++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/android/examples/triangle/build.gradle b/android/examples/triangle/build.gradle index 3d36cbc6..70ec5fe0 100644 --- a/android/examples/triangle/build.gradle +++ b/android/examples/triangle/build.gradle @@ -36,24 +36,24 @@ android { } } -task copyRes(type: Copy) { - from '../../common/res/drawable' - into "src/main/res/drawable" - include 'icon.png' +task copyTask << { + copy { + from '../../common/res/drawable' + into "src/main/res/drawable" + include 'icon.png' + } + + copy { + from '../../../data/shaders/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/triangle' + into "assets/shaders/triangle" + include '*.spv' + } } -task copyBaseShaders(type: Copy) { - from '../../../data/shaders/base' - into "assets/shaders/base" - include '*.spv' -} - -task copyShaders(type: Copy) { - from '../../../data/shaders/triangle' - into "assets/shaders/triangle" - include '*.spv' -} - -preBuild.dependsOn copyRes -preBuild.dependsOn copyBaseShaders -preBuild.dependsOn copyShaders \ No newline at end of file +preBuild.dependsOn copyTask \ No newline at end of file From c515cf35580eab63b72e74920324847fe2011eae Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 4 May 2018 21:17:54 +0200 Subject: [PATCH 08/24] Added android example template --- android/examples/_template/CMakeLists.txt | 45 ++++++++++++++ android/examples/_template/build.gradle | 55 ++++++++++++++++++ android/examples/_template/proguard-rules.pro | 25 ++++++++ .../_template/src/main/AndroidManifest.xml | 24 ++++++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++++++++++ 5 files changed, 207 insertions(+) create mode 100644 android/examples/_template/CMakeLists.txt create mode 100644 android/examples/_template/build.gradle create mode 100644 android/examples/_template/proguard-rules.pro create mode 100644 android/examples/_template/src/main/AndroidManifest.xml create mode 100644 android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java diff --git a/android/examples/_template/CMakeLists.txt b/android/examples/_template/CMakeLists.txt new file mode 100644 index 00000000..9118badc --- /dev/null +++ b/android/examples/_template/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME %EXAMPLE_FOLDER%) + +set(SRC_DIR ../../../examples/${NAME}) +set(BASE_DIR ../../../base) +set(EXTERNAL_DIR ../../../external) +set(LIB_DIR ../../../libs) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -DVK_USE_PLATFORM_ANDROID_KHR -DVK_NO_PROTOTYPES") +#set(CMAKE_SHARED_LINKER_FLAGS "--no-fatal-warnings") + +file(GLOB EXAMPLE_SRC "${SRC_DIR}/*.cpp") +file(GLOB BASE_SRC "${BASE_DIR}/*.cpp") + +add_library( + native-lib SHARED + ${EXAMPLE_SRC} + ${BASE_SRC} + ${EXTERNAL_DIR}/imgui/imgui.cpp + ${EXTERNAL_DIR}/imgui/imgui_draw.cpp +) + +add_library(native-app-glue STATIC ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) + +add_library(libassimp STATIC IMPORTED) +set_target_properties(libassimp PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/../../../libs/assimp/${ANDROID_ABI}/libassimp.a) + +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate") + +include_directories(${BASE_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 + android + log + z + libassimp +) diff --git a/android/examples/_template/build.gradle b/android/examples/_template/build.gradle new file mode 100644 index 00000000..7e447817 --- /dev/null +++ b/android/examples/_template/build.gradle @@ -0,0 +1,55 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.%PACKAGE_NAME%" + minSdkVersion 19 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + ndk { + abiFilters "armeabi-v7a" + } + externalNativeBuild { + cmake { + cppFlags "-std=c++11" + arguments "-DANDROID_STL=c++_static" + } + } + } + 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/base' + into "assets/shaders/base" + include '*.spv' + } + +%ASSET_COPY% +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/_template/proguard-rules.pro b/android/examples/_template/proguard-rules.pro new file mode 100644 index 00000000..93aade8d --- /dev/null +++ b/android/examples/_template/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /home/SERILOCAL/l.west/Android/Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android/examples/_template/src/main/AndroidManifest.xml b/android/examples/_template/src/main/AndroidManifest.xml new file mode 100644 index 00000000..911142b2 --- /dev/null +++ b/android/examples/_template/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..b8825637 --- /dev/null +++ b/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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, AlertDialog.THEME_HOLO_DARK); + 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) { } + } +} From f8fc3e8b8e41189cb1cc28d9e89dc15c978f80ad Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sat, 5 May 2018 11:51:28 +0200 Subject: [PATCH 09/24] Updated android example template --- android/examples/_template/CMakeLists.txt | 1 - android/examples/_template/build.gradle | 5 ++-- android/examples/_template/proguard-rules.pro | 25 ------------------- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 android/examples/_template/proguard-rules.pro diff --git a/android/examples/_template/CMakeLists.txt b/android/examples/_template/CMakeLists.txt index 9118badc..3e379c32 100644 --- a/android/examples/_template/CMakeLists.txt +++ b/android/examples/_template/CMakeLists.txt @@ -8,7 +8,6 @@ set(EXTERNAL_DIR ../../../external) set(LIB_DIR ../../../libs) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -DVK_USE_PLATFORM_ANDROID_KHR -DVK_NO_PROTOTYPES") -#set(CMAKE_SHARED_LINKER_FLAGS "--no-fatal-warnings") file(GLOB EXAMPLE_SRC "${SRC_DIR}/*.cpp") file(GLOB BASE_SRC "${BASE_DIR}/*.cpp") diff --git a/android/examples/_template/build.gradle b/android/examples/_template/build.gradle index 7e447817..3aceaeb1 100644 --- a/android/examples/_template/build.gradle +++ b/android/examples/_template/build.gradle @@ -9,14 +9,13 @@ android { targetSdkVersion 26 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { abiFilters "armeabi-v7a" } externalNativeBuild { cmake { - cppFlags "-std=c++11" - arguments "-DANDROID_STL=c++_static" + cppFlags "-std=c++14" + arguments "-DANDROID_STL=c++_shared", '-DANDROID_TOOLCHAIN=clang' } } } diff --git a/android/examples/_template/proguard-rules.pro b/android/examples/_template/proguard-rules.pro deleted file mode 100644 index 93aade8d..00000000 --- a/android/examples/_template/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /home/SERILOCAL/l.west/Android/Sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile From 8924ce733e3d85e44df4ac972eb0cd5b97cba714 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 8 May 2018 07:10:30 +0200 Subject: [PATCH 10/24] android example template, base as shared library --- android/examples/_template/CMakeLists.txt | 15 +++------------ android/examples/base/CMakeLists.txt | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 android/examples/base/CMakeLists.txt diff --git a/android/examples/_template/CMakeLists.txt b/android/examples/_template/CMakeLists.txt index 3e379c32..864494d7 100644 --- a/android/examples/_template/CMakeLists.txt +++ b/android/examples/_template/CMakeLists.txt @@ -5,25 +5,16 @@ set(NAME %EXAMPLE_FOLDER%) set(SRC_DIR ../../../examples/${NAME}) set(BASE_DIR ../../../base) set(EXTERNAL_DIR ../../../external) -set(LIB_DIR ../../../libs) 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") -file(GLOB BASE_SRC "${BASE_DIR}/*.cpp") -add_library( - native-lib SHARED - ${EXAMPLE_SRC} - ${BASE_SRC} - ${EXTERNAL_DIR}/imgui/imgui.cpp - ${EXTERNAL_DIR}/imgui/imgui_draw.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_library(libassimp STATIC IMPORTED) -set_target_properties(libassimp PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/../../../libs/assimp/${ANDROID_ABI}/libassimp.a) +add_subdirectory(../base ${CMAKE_SOURCE_DIR}/../base) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate") @@ -37,8 +28,8 @@ include_directories(${ANDROID_NDK}/sources/android/native_app_glue) target_link_libraries( native-lib native-app-glue + libbase android log z - libassimp ) diff --git a/android/examples/base/CMakeLists.txt b/android/examples/base/CMakeLists.txt new file mode 100644 index 00000000..4cc3c629 --- /dev/null +++ b/android/examples/base/CMakeLists.txt @@ -0,0 +1,21 @@ +file(GLOB BASE_SRC "../../../base/*.cpp" "../../../external/imgui/imgui.cpp" "../../../external/imgui/imgui_draw.cpp") + +add_library(libbase SHARED ${BASE_SRC}) + +add_library(libassimp STATIC IMPORTED) +set_target_properties(libassimp PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/../../../libs/assimp/${ANDROID_ABI}/libassimp.a) + +include_directories(${BASE_DIR}) +include_directories(../../../external/glm) +include_directories(../../../external/gli) +include_directories(../../../external/imgui) +include_directories(../../../external/assimp) +include_directories(${ANDROID_NDK}/sources/android/native_app_glue) + +target_link_libraries( + libbase + android + log + z + libassimp +) From df2b619a75c43ef448877b8a182e87684c33727b Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 8 May 2018 07:11:32 +0200 Subject: [PATCH 11/24] Move output apk to bin directory --- android/examples/gradle/outputfilename.gradle | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 android/examples/gradle/outputfilename.gradle diff --git a/android/examples/gradle/outputfilename.gradle b/android/examples/gradle/outputfilename.gradle new file mode 100644 index 00000000..e71624b3 --- /dev/null +++ b/android/examples/gradle/outputfilename.gradle @@ -0,0 +1,7 @@ +android { + applicationVariants.all { variant -> + variant.outputs.all { + outputFileName = "../../../../../bin/" + outputFileName + } + } +} \ No newline at end of file From cc8ea13f8d0c1cf4529494d6bac58d21bed640a6 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Wed, 9 May 2018 23:28:58 +0200 Subject: [PATCH 12/24] Replace deprecated holo dark theme with material theme --- .../main/java/de/saschawillems/vulkanSample/VulkanActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java index b8825637..12e14fc6 100644 --- a/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java +++ b/android/examples/_template/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -37,7 +37,7 @@ public class VulkanActivity extends NativeActivity { this.runOnUiThread(new Runnable() { public void run() { - AlertDialog.Builder builder = new AlertDialog.Builder(activity, AlertDialog.THEME_HOLO_DARK); + 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() { From 46795c4b6ba1db67a8c2597a7e32e202fc170a3f Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 13:17:11 +0200 Subject: [PATCH 13/24] Include example repository vulkan headers NDK headers lag behind and miss certain functions --- android/examples/_template/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/examples/_template/CMakeLists.txt b/android/examples/_template/CMakeLists.txt index 864494d7..055eaf34 100644 --- a/android/examples/_template/CMakeLists.txt +++ b/android/examples/_template/CMakeLists.txt @@ -19,6 +19,7 @@ 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) From fad4f256767438d7fb680e92aa7a3afed6a2dd36 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 17:22:01 +0200 Subject: [PATCH 14/24] Updated triangle build files --- android/examples/triangle/CMakeLists.txt | 15 ++++++----- android/examples/triangle/build.gradle | 15 +++++------ android/examples/triangle/proguard-rules.pro | 25 ------------------- .../triangle/src/main/AndroidManifest.xml | 2 +- .../vulkanSample/VulkanActivity.java | 2 +- 5 files changed, 17 insertions(+), 42 deletions(-) delete mode 100644 android/examples/triangle/proguard-rules.pro diff --git a/android/examples/triangle/CMakeLists.txt b/android/examples/triangle/CMakeLists.txt index c92c2114..2faa4ed6 100644 --- a/android/examples/triangle/CMakeLists.txt +++ b/android/examples/triangle/CMakeLists.txt @@ -9,29 +9,28 @@ 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") -file(GLOB BASE_SRC "${BASE_DIR}/*.cpp") -add_library( - native-lib SHARED - ${EXAMPLE_SRC} - ${BASE_SRC} - ${EXTERNAL_DIR}/imgui/imgui.cpp - ${EXTERNAL_DIR}/imgui/imgui_draw.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/triangle/build.gradle b/android/examples/triangle/build.gradle index 70ec5fe0..7c3fd7b0 100644 --- a/android/examples/triangle/build.gradle +++ b/android/examples/triangle/build.gradle @@ -4,19 +4,18 @@ apply from: '../gradle/outputfilename.gradle' android { compileSdkVersion 26 defaultConfig { - applicationId "de.saschawillems.VulkanTriangle" + applicationId "de.saschawillems.vulkanTriangle" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { abiFilters "armeabi-v7a" } externalNativeBuild { cmake { - cppFlags "-std=c++11" - arguments "-DANDROID_STL=c++_static" + cppFlags "-std=c++14" + arguments "-DANDROID_STL=c++_shared", '-DANDROID_TOOLCHAIN=clang' } } } @@ -50,10 +49,12 @@ task copyTask << { } copy { - from '../../../data/shaders/triangle' - into "assets/shaders/triangle" - include '*.spv' + from '../../../data/shaders/triangle' + into 'assets/shaders/triangle' + include '*.*' } + + } preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/triangle/proguard-rules.pro b/android/examples/triangle/proguard-rules.pro deleted file mode 100644 index 93aade8d..00000000 --- a/android/examples/triangle/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /home/SERILOCAL/l.west/Android/Sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/android/examples/triangle/src/main/AndroidManifest.xml b/android/examples/triangle/src/main/AndroidManifest.xml index f0852aea..3dd53b0b 100644 --- a/android/examples/triangle/src/main/AndroidManifest.xml +++ b/android/examples/triangle/src/main/AndroidManifest.xml @@ -3,7 +3,7 @@ package="de.saschawillems.vulkanTriangle"> Date: Thu, 10 May 2018 17:22:42 +0200 Subject: [PATCH 15/24] Use unformated text functions --- examples/imgui/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/imgui/main.cpp b/examples/imgui/main.cpp index 158b675c..572516df 100644 --- a/examples/imgui/main.cpp +++ b/examples/imgui/main.cpp @@ -343,8 +343,8 @@ public: ImVec4 clear_color = ImColor(114, 144, 154); static float f = 0.0f; - ImGui::Text(example->title.c_str()); - ImGui::Text(device->properties.deviceName); + ImGui::TextUnformatted(example->title.c_str()); + ImGui::TextUnformatted(device->properties.deviceName); // Update frame time display if (updateFrameGraph) { From 00f9728cef99bc3865d8c8a8120a19fb5a28c5af Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 17:22:58 +0200 Subject: [PATCH 16/24] Removed unused enabled feature --- examples/offscreen/offscreen.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/offscreen/offscreen.cpp b/examples/offscreen/offscreen.cpp index 73f7ad58..a7887677 100644 --- a/examples/offscreen/offscreen.cpp +++ b/examples/offscreen/offscreen.cpp @@ -125,7 +125,6 @@ public: timerSpeed *= 0.25f; title = "Offscreen rendering"; settings.overlay = true; - enabledFeatures.shaderClipDistance = VK_TRUE; } ~VulkanExample() From b4fccbd3d2eabab88d896f361df869fd139fb9c7 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 17:26:03 +0200 Subject: [PATCH 17/24] Added ImGui example android gradle build files Fixes #457 --- android/examples/imgui/CMakeLists.txt | 37 +++++++++ android/examples/imgui/build.gradle | 78 +++++++++++++++++++ .../imgui/src/main/AndroidManifest.xml | 24 ++++++ .../vulkanSample/VulkanActivity.java | 58 ++++++++++++++ android/settings.gradle | 1 + 5 files changed, 198 insertions(+) create mode 100644 android/examples/imgui/CMakeLists.txt create mode 100644 android/examples/imgui/build.gradle create mode 100644 android/examples/imgui/src/main/AndroidManifest.xml create mode 100644 android/examples/imgui/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java diff --git a/android/examples/imgui/CMakeLists.txt b/android/examples/imgui/CMakeLists.txt new file mode 100644 index 00000000..5d74847c --- /dev/null +++ b/android/examples/imgui/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME imgui) + +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") +file(GLOB ADD_SOURCE "${EXTERNAL_DIR}/imgui/*.cpp") + +add_library(native-lib SHARED ${EXAMPLE_SRC} ${ADD_SOURCE}) + +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/imgui/build.gradle b/android/examples/imgui/build.gradle new file mode 100644 index 00000000..dda8ad55 --- /dev/null +++ b/android/examples/imgui/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanImGui" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/imgui' + into 'assets/shaders/imgui' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenemodels.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenebackground.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenelogos.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/imgui/src/main/AndroidManifest.xml b/android/examples/imgui/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4941885f --- /dev/null +++ b/android/examples/imgui/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/imgui/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/imgui/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/imgui/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/settings.gradle b/android/settings.gradle index 85c5327f..9c0507b8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1 +1,2 @@ +include 'examples/:imgui' include 'examples/:triangle' From f23b1892bcbbbae3371a0dbb0ab3603dc1eeaf03 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 17:31:30 +0200 Subject: [PATCH 18/24] Moved to android gradle build system Fixes #309 Fixes #384 --- android/examples/bloom/CMakeLists.txt | 36 +++++++ android/examples/bloom/build.gradle | 84 ++++++++++++++++ .../bloom/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/computecloth/CMakeLists.txt | 36 +++++++ android/examples/computecloth/build.gradle | 72 ++++++++++++++ .../computecloth/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/computecullandlod/CMakeLists.txt | 36 +++++++ .../examples/computecullandlod/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/computeheadless/CMakeLists.txt | 36 +++++++ android/examples/computeheadless/build.gradle | 60 ++++++++++++ .../src/main/AndroidManifest.xml | 26 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/computenbody/CMakeLists.txt | 36 +++++++ android/examples/computenbody/build.gradle | 72 ++++++++++++++ .../computenbody/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/computeparticles/CMakeLists.txt | 36 +++++++ .../examples/computeparticles/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/computeshader/CMakeLists.txt | 36 +++++++ android/examples/computeshader/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../conservativeraster/CMakeLists.txt | 36 +++++++ .../examples/conservativeraster/build.gradle | 60 ++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/debugmarker/CMakeLists.txt | 36 +++++++ android/examples/debugmarker/build.gradle | 72 ++++++++++++++ .../debugmarker/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/deferred/CMakeLists.txt | 36 +++++++ android/examples/deferred/build.gradle | 84 ++++++++++++++++ .../deferred/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../deferredmultisampling/CMakeLists.txt | 36 +++++++ .../deferredmultisampling/build.gradle | 84 ++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/deferredshadows/CMakeLists.txt | 36 +++++++ android/examples/deferredshadows/build.gradle | 84 ++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/descriptorsets/CMakeLists.txt | 36 +++++++ android/examples/descriptorsets/build.gradle | 78 +++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/displacement/CMakeLists.txt | 36 +++++++ android/examples/displacement/build.gradle | 72 ++++++++++++++ .../displacement/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../distancefieldfonts/CMakeLists.txt | 36 +++++++ .../examples/distancefieldfonts/build.gradle | 78 +++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../dynamicuniformbuffer/CMakeLists.txt | 36 +++++++ .../dynamicuniformbuffer/build.gradle | 60 ++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/gears/CMakeLists.txt | 36 +++++++ android/examples/gears/build.gradle | 60 ++++++++++++ .../gears/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/geometryshader/CMakeLists.txt | 36 +++++++ android/examples/geometryshader/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/hdr/CMakeLists.txt | 36 +++++++ android/examples/hdr/build.gradle | 96 +++++++++++++++++++ .../examples/hdr/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/indirectdraw/CMakeLists.txt | 36 +++++++ android/examples/indirectdraw/build.gradle | 90 +++++++++++++++++ .../indirectdraw/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/instancing/CMakeLists.txt | 36 +++++++ android/examples/instancing/build.gradle | 90 +++++++++++++++++ .../instancing/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/mesh/CMakeLists.txt | 36 +++++++ android/examples/mesh/build.gradle | 66 +++++++++++++ .../mesh/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/multisampling/CMakeLists.txt | 36 +++++++ android/examples/multisampling/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/multithreading/CMakeLists.txt | 36 +++++++ android/examples/multithreading/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/occlusionquery/CMakeLists.txt | 36 +++++++ android/examples/occlusionquery/build.gradle | 78 +++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/offscreen/CMakeLists.txt | 36 +++++++ android/examples/offscreen/build.gradle | 78 +++++++++++++++ .../offscreen/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/parallaxmapping/CMakeLists.txt | 36 +++++++ android/examples/parallaxmapping/build.gradle | 78 +++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/particlefire/CMakeLists.txt | 36 +++++++ android/examples/particlefire/build.gradle | 90 +++++++++++++++++ .../particlefire/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/pbrbasic/CMakeLists.txt | 36 +++++++ android/examples/pbrbasic/build.gradle | 84 ++++++++++++++++ .../pbrbasic/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/pbribl/CMakeLists.txt | 36 +++++++ android/examples/pbribl/build.gradle | 96 +++++++++++++++++++ .../pbribl/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/pbrtexture/CMakeLists.txt | 36 +++++++ android/examples/pbrtexture/build.gradle | 78 +++++++++++++++ .../pbrtexture/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/pipelines/CMakeLists.txt | 36 +++++++ android/examples/pipelines/build.gradle | 66 +++++++++++++ .../pipelines/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../pipelinestatistics/CMakeLists.txt | 36 +++++++ .../examples/pipelinestatistics/build.gradle | 90 +++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/pushconstants/CMakeLists.txt | 36 +++++++ android/examples/pushconstants/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/pushdescriptors/CMakeLists.txt | 36 +++++++ android/examples/pushdescriptors/build.gradle | 78 +++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/radialblur/CMakeLists.txt | 36 +++++++ android/examples/radialblur/build.gradle | 72 ++++++++++++++ .../radialblur/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/raytracing/CMakeLists.txt | 36 +++++++ android/examples/raytracing/build.gradle | 60 ++++++++++++ .../raytracing/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/renderheadless/CMakeLists.txt | 36 +++++++ android/examples/renderheadless/build.gradle | 60 ++++++++++++ .../src/main/AndroidManifest.xml | 26 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/scenerendering/CMakeLists.txt | 36 +++++++ android/examples/scenerendering/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/screenshot/CMakeLists.txt | 36 +++++++ android/examples/screenshot/build.gradle | 66 +++++++++++++ .../screenshot/src/main/AndroidManifest.xml | 26 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/shadowmapping/CMakeLists.txt | 36 +++++++ android/examples/shadowmapping/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../shadowmappingcascade/CMakeLists.txt | 36 +++++++ .../shadowmappingcascade/build.gradle | 84 ++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/shadowmappingomni/CMakeLists.txt | 36 +++++++ .../examples/shadowmappingomni/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/skeletalanimation/CMakeLists.txt | 36 +++++++ .../examples/skeletalanimation/build.gradle | 84 ++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../specializationconstants/CMakeLists.txt | 36 +++++++ .../specializationconstants/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../sphericalenvmapping/CMakeLists.txt | 36 +++++++ .../examples/sphericalenvmapping/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/ssao/CMakeLists.txt | 36 +++++++ android/examples/ssao/build.gradle | 66 +++++++++++++ .../ssao/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/stencilbuffer/CMakeLists.txt | 36 +++++++ android/examples/stencilbuffer/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/subpasses/CMakeLists.txt | 36 +++++++ android/examples/subpasses/build.gradle | 78 +++++++++++++++ .../subpasses/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../terraintessellation/CMakeLists.txt | 36 +++++++ .../examples/terraintessellation/build.gradle | 84 ++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/tessellation/CMakeLists.txt | 36 +++++++ android/examples/tessellation/build.gradle | 78 +++++++++++++++ .../tessellation/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/textoverlay/CMakeLists.txt | 36 +++++++ android/examples/textoverlay/build.gradle | 66 +++++++++++++ .../textoverlay/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/texture/CMakeLists.txt | 36 +++++++ android/examples/texture/build.gradle | 66 +++++++++++++ .../texture/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/texture3d/CMakeLists.txt | 36 +++++++ android/examples/texture3d/build.gradle | 60 ++++++++++++ .../texture3d/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/texturearray/CMakeLists.txt | 36 +++++++ android/examples/texturearray/build.gradle | 66 +++++++++++++ .../texturearray/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/texturecubemap/CMakeLists.txt | 36 +++++++ android/examples/texturecubemap/build.gradle | 90 +++++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ .../examples/texturemipmapgen/CMakeLists.txt | 36 +++++++ .../examples/texturemipmapgen/build.gradle | 72 ++++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/viewportarray/CMakeLists.txt | 36 +++++++ android/examples/viewportarray/build.gradle | 66 +++++++++++++ .../src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/examples/vulkanscene/CMakeLists.txt | 36 +++++++ android/examples/vulkanscene/build.gradle | 90 +++++++++++++++++ .../vulkanscene/src/main/AndroidManifest.xml | 24 +++++ .../vulkanSample/VulkanActivity.java | 58 +++++++++++ android/settings.gradle | 59 ++++++++++++ 237 files changed, 11401 insertions(+) create mode 100644 android/examples/bloom/CMakeLists.txt create mode 100644 android/examples/bloom/build.gradle create mode 100644 android/examples/bloom/src/main/AndroidManifest.xml create mode 100644 android/examples/bloom/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computecloth/CMakeLists.txt create mode 100644 android/examples/computecloth/build.gradle create mode 100644 android/examples/computecloth/src/main/AndroidManifest.xml create mode 100644 android/examples/computecloth/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computecullandlod/CMakeLists.txt create mode 100644 android/examples/computecullandlod/build.gradle create mode 100644 android/examples/computecullandlod/src/main/AndroidManifest.xml create mode 100644 android/examples/computecullandlod/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computeheadless/CMakeLists.txt create mode 100644 android/examples/computeheadless/build.gradle create mode 100644 android/examples/computeheadless/src/main/AndroidManifest.xml create mode 100644 android/examples/computeheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computenbody/CMakeLists.txt create mode 100644 android/examples/computenbody/build.gradle create mode 100644 android/examples/computenbody/src/main/AndroidManifest.xml create mode 100644 android/examples/computenbody/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computeparticles/CMakeLists.txt create mode 100644 android/examples/computeparticles/build.gradle create mode 100644 android/examples/computeparticles/src/main/AndroidManifest.xml create mode 100644 android/examples/computeparticles/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/computeshader/CMakeLists.txt create mode 100644 android/examples/computeshader/build.gradle create mode 100644 android/examples/computeshader/src/main/AndroidManifest.xml create mode 100644 android/examples/computeshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/conservativeraster/CMakeLists.txt create mode 100644 android/examples/conservativeraster/build.gradle create mode 100644 android/examples/conservativeraster/src/main/AndroidManifest.xml create mode 100644 android/examples/conservativeraster/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/debugmarker/CMakeLists.txt create mode 100644 android/examples/debugmarker/build.gradle create mode 100644 android/examples/debugmarker/src/main/AndroidManifest.xml create mode 100644 android/examples/debugmarker/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/deferred/CMakeLists.txt create mode 100644 android/examples/deferred/build.gradle create mode 100644 android/examples/deferred/src/main/AndroidManifest.xml create mode 100644 android/examples/deferred/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/deferredmultisampling/CMakeLists.txt create mode 100644 android/examples/deferredmultisampling/build.gradle create mode 100644 android/examples/deferredmultisampling/src/main/AndroidManifest.xml create mode 100644 android/examples/deferredmultisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/deferredshadows/CMakeLists.txt create mode 100644 android/examples/deferredshadows/build.gradle create mode 100644 android/examples/deferredshadows/src/main/AndroidManifest.xml create mode 100644 android/examples/deferredshadows/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/descriptorsets/CMakeLists.txt create mode 100644 android/examples/descriptorsets/build.gradle create mode 100644 android/examples/descriptorsets/src/main/AndroidManifest.xml create mode 100644 android/examples/descriptorsets/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/displacement/CMakeLists.txt create mode 100644 android/examples/displacement/build.gradle create mode 100644 android/examples/displacement/src/main/AndroidManifest.xml create mode 100644 android/examples/displacement/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/distancefieldfonts/CMakeLists.txt create mode 100644 android/examples/distancefieldfonts/build.gradle create mode 100644 android/examples/distancefieldfonts/src/main/AndroidManifest.xml create mode 100644 android/examples/distancefieldfonts/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/dynamicuniformbuffer/CMakeLists.txt create mode 100644 android/examples/dynamicuniformbuffer/build.gradle create mode 100644 android/examples/dynamicuniformbuffer/src/main/AndroidManifest.xml create mode 100644 android/examples/dynamicuniformbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/gears/CMakeLists.txt create mode 100644 android/examples/gears/build.gradle create mode 100644 android/examples/gears/src/main/AndroidManifest.xml create mode 100644 android/examples/gears/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/geometryshader/CMakeLists.txt create mode 100644 android/examples/geometryshader/build.gradle create mode 100644 android/examples/geometryshader/src/main/AndroidManifest.xml create mode 100644 android/examples/geometryshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/hdr/CMakeLists.txt create mode 100644 android/examples/hdr/build.gradle create mode 100644 android/examples/hdr/src/main/AndroidManifest.xml create mode 100644 android/examples/hdr/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/indirectdraw/CMakeLists.txt create mode 100644 android/examples/indirectdraw/build.gradle create mode 100644 android/examples/indirectdraw/src/main/AndroidManifest.xml create mode 100644 android/examples/indirectdraw/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/instancing/CMakeLists.txt create mode 100644 android/examples/instancing/build.gradle create mode 100644 android/examples/instancing/src/main/AndroidManifest.xml create mode 100644 android/examples/instancing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/mesh/CMakeLists.txt create mode 100644 android/examples/mesh/build.gradle create mode 100644 android/examples/mesh/src/main/AndroidManifest.xml create mode 100644 android/examples/mesh/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/multisampling/CMakeLists.txt create mode 100644 android/examples/multisampling/build.gradle create mode 100644 android/examples/multisampling/src/main/AndroidManifest.xml create mode 100644 android/examples/multisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/multithreading/CMakeLists.txt create mode 100644 android/examples/multithreading/build.gradle create mode 100644 android/examples/multithreading/src/main/AndroidManifest.xml create mode 100644 android/examples/multithreading/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/occlusionquery/CMakeLists.txt create mode 100644 android/examples/occlusionquery/build.gradle create mode 100644 android/examples/occlusionquery/src/main/AndroidManifest.xml create mode 100644 android/examples/occlusionquery/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/offscreen/CMakeLists.txt create mode 100644 android/examples/offscreen/build.gradle create mode 100644 android/examples/offscreen/src/main/AndroidManifest.xml create mode 100644 android/examples/offscreen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/parallaxmapping/CMakeLists.txt create mode 100644 android/examples/parallaxmapping/build.gradle create mode 100644 android/examples/parallaxmapping/src/main/AndroidManifest.xml create mode 100644 android/examples/parallaxmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/particlefire/CMakeLists.txt create mode 100644 android/examples/particlefire/build.gradle create mode 100644 android/examples/particlefire/src/main/AndroidManifest.xml create mode 100644 android/examples/particlefire/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pbrbasic/CMakeLists.txt create mode 100644 android/examples/pbrbasic/build.gradle create mode 100644 android/examples/pbrbasic/src/main/AndroidManifest.xml create mode 100644 android/examples/pbrbasic/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pbribl/CMakeLists.txt create mode 100644 android/examples/pbribl/build.gradle create mode 100644 android/examples/pbribl/src/main/AndroidManifest.xml create mode 100644 android/examples/pbribl/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pbrtexture/CMakeLists.txt create mode 100644 android/examples/pbrtexture/build.gradle create mode 100644 android/examples/pbrtexture/src/main/AndroidManifest.xml create mode 100644 android/examples/pbrtexture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pipelines/CMakeLists.txt create mode 100644 android/examples/pipelines/build.gradle create mode 100644 android/examples/pipelines/src/main/AndroidManifest.xml create mode 100644 android/examples/pipelines/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pipelinestatistics/CMakeLists.txt create mode 100644 android/examples/pipelinestatistics/build.gradle create mode 100644 android/examples/pipelinestatistics/src/main/AndroidManifest.xml create mode 100644 android/examples/pipelinestatistics/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pushconstants/CMakeLists.txt create mode 100644 android/examples/pushconstants/build.gradle create mode 100644 android/examples/pushconstants/src/main/AndroidManifest.xml create mode 100644 android/examples/pushconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/pushdescriptors/CMakeLists.txt create mode 100644 android/examples/pushdescriptors/build.gradle create mode 100644 android/examples/pushdescriptors/src/main/AndroidManifest.xml create mode 100644 android/examples/pushdescriptors/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/radialblur/CMakeLists.txt create mode 100644 android/examples/radialblur/build.gradle create mode 100644 android/examples/radialblur/src/main/AndroidManifest.xml create mode 100644 android/examples/radialblur/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/raytracing/CMakeLists.txt create mode 100644 android/examples/raytracing/build.gradle create mode 100644 android/examples/raytracing/src/main/AndroidManifest.xml create mode 100644 android/examples/raytracing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/renderheadless/CMakeLists.txt create mode 100644 android/examples/renderheadless/build.gradle create mode 100644 android/examples/renderheadless/src/main/AndroidManifest.xml create mode 100644 android/examples/renderheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/scenerendering/CMakeLists.txt create mode 100644 android/examples/scenerendering/build.gradle create mode 100644 android/examples/scenerendering/src/main/AndroidManifest.xml create mode 100644 android/examples/scenerendering/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/screenshot/CMakeLists.txt create mode 100644 android/examples/screenshot/build.gradle create mode 100644 android/examples/screenshot/src/main/AndroidManifest.xml create mode 100644 android/examples/screenshot/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/shadowmapping/CMakeLists.txt create mode 100644 android/examples/shadowmapping/build.gradle create mode 100644 android/examples/shadowmapping/src/main/AndroidManifest.xml create mode 100644 android/examples/shadowmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/shadowmappingcascade/CMakeLists.txt create mode 100644 android/examples/shadowmappingcascade/build.gradle create mode 100644 android/examples/shadowmappingcascade/src/main/AndroidManifest.xml create mode 100644 android/examples/shadowmappingcascade/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/shadowmappingomni/CMakeLists.txt create mode 100644 android/examples/shadowmappingomni/build.gradle create mode 100644 android/examples/shadowmappingomni/src/main/AndroidManifest.xml create mode 100644 android/examples/shadowmappingomni/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/skeletalanimation/CMakeLists.txt create mode 100644 android/examples/skeletalanimation/build.gradle create mode 100644 android/examples/skeletalanimation/src/main/AndroidManifest.xml create mode 100644 android/examples/skeletalanimation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/specializationconstants/CMakeLists.txt create mode 100644 android/examples/specializationconstants/build.gradle create mode 100644 android/examples/specializationconstants/src/main/AndroidManifest.xml create mode 100644 android/examples/specializationconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/sphericalenvmapping/CMakeLists.txt create mode 100644 android/examples/sphericalenvmapping/build.gradle create mode 100644 android/examples/sphericalenvmapping/src/main/AndroidManifest.xml create mode 100644 android/examples/sphericalenvmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/ssao/CMakeLists.txt create mode 100644 android/examples/ssao/build.gradle create mode 100644 android/examples/ssao/src/main/AndroidManifest.xml create mode 100644 android/examples/ssao/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/stencilbuffer/CMakeLists.txt create mode 100644 android/examples/stencilbuffer/build.gradle create mode 100644 android/examples/stencilbuffer/src/main/AndroidManifest.xml create mode 100644 android/examples/stencilbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/subpasses/CMakeLists.txt create mode 100644 android/examples/subpasses/build.gradle create mode 100644 android/examples/subpasses/src/main/AndroidManifest.xml create mode 100644 android/examples/subpasses/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/terraintessellation/CMakeLists.txt create mode 100644 android/examples/terraintessellation/build.gradle create mode 100644 android/examples/terraintessellation/src/main/AndroidManifest.xml create mode 100644 android/examples/terraintessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/tessellation/CMakeLists.txt create mode 100644 android/examples/tessellation/build.gradle create mode 100644 android/examples/tessellation/src/main/AndroidManifest.xml create mode 100644 android/examples/tessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/textoverlay/CMakeLists.txt create mode 100644 android/examples/textoverlay/build.gradle create mode 100644 android/examples/textoverlay/src/main/AndroidManifest.xml create mode 100644 android/examples/textoverlay/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/texture/CMakeLists.txt create mode 100644 android/examples/texture/build.gradle create mode 100644 android/examples/texture/src/main/AndroidManifest.xml create mode 100644 android/examples/texture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/texture3d/CMakeLists.txt create mode 100644 android/examples/texture3d/build.gradle create mode 100644 android/examples/texture3d/src/main/AndroidManifest.xml create mode 100644 android/examples/texture3d/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/texturearray/CMakeLists.txt create mode 100644 android/examples/texturearray/build.gradle create mode 100644 android/examples/texturearray/src/main/AndroidManifest.xml create mode 100644 android/examples/texturearray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/texturecubemap/CMakeLists.txt create mode 100644 android/examples/texturecubemap/build.gradle create mode 100644 android/examples/texturecubemap/src/main/AndroidManifest.xml create mode 100644 android/examples/texturecubemap/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/texturemipmapgen/CMakeLists.txt create mode 100644 android/examples/texturemipmapgen/build.gradle create mode 100644 android/examples/texturemipmapgen/src/main/AndroidManifest.xml create mode 100644 android/examples/texturemipmapgen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/viewportarray/CMakeLists.txt create mode 100644 android/examples/viewportarray/build.gradle create mode 100644 android/examples/viewportarray/src/main/AndroidManifest.xml create mode 100644 android/examples/viewportarray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java create mode 100644 android/examples/vulkanscene/CMakeLists.txt create mode 100644 android/examples/vulkanscene/build.gradle create mode 100644 android/examples/vulkanscene/src/main/AndroidManifest.xml create mode 100644 android/examples/vulkanscene/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java diff --git a/android/examples/bloom/CMakeLists.txt b/android/examples/bloom/CMakeLists.txt new file mode 100644 index 00000000..433796d3 --- /dev/null +++ b/android/examples/bloom/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME bloom) + +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/bloom/build.gradle b/android/examples/bloom/build.gradle new file mode 100644 index 00000000..57fa4a5e --- /dev/null +++ b/android/examples/bloom/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanBloom" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/bloom' + into 'assets/shaders/bloom' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'retroufo.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'retroufo_glow.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'cubemap_space.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/bloom/src/main/AndroidManifest.xml b/android/examples/bloom/src/main/AndroidManifest.xml new file mode 100644 index 00000000..07962bd4 --- /dev/null +++ b/android/examples/bloom/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/bloom/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/bloom/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/bloom/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computecloth/CMakeLists.txt b/android/examples/computecloth/CMakeLists.txt new file mode 100644 index 00000000..bf8ade81 --- /dev/null +++ b/android/examples/computecloth/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computecloth) + +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/computecloth/build.gradle b/android/examples/computecloth/build.gradle new file mode 100644 index 00000000..56238abc --- /dev/null +++ b/android/examples/computecloth/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputecloth" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computecloth' + into 'assets/shaders/computecloth' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'vulkan_cloth_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computecloth/src/main/AndroidManifest.xml b/android/examples/computecloth/src/main/AndroidManifest.xml new file mode 100644 index 00000000..77117b52 --- /dev/null +++ b/android/examples/computecloth/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/computecloth/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computecloth/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computecloth/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computecullandlod/CMakeLists.txt b/android/examples/computecullandlod/CMakeLists.txt new file mode 100644 index 00000000..df02a19d --- /dev/null +++ b/android/examples/computecullandlod/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computecullandlod) + +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/computecullandlod/build.gradle b/android/examples/computecullandlod/build.gradle new file mode 100644 index 00000000..e36c94f8 --- /dev/null +++ b/android/examples/computecullandlod/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputecullandlod" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computecullandlod' + into 'assets/shaders/computecullandlod' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'suzanne_lods.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computecullandlod/src/main/AndroidManifest.xml b/android/examples/computecullandlod/src/main/AndroidManifest.xml new file mode 100644 index 00000000..3d8f09f9 --- /dev/null +++ b/android/examples/computecullandlod/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/computecullandlod/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computecullandlod/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computecullandlod/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computeheadless/CMakeLists.txt b/android/examples/computeheadless/CMakeLists.txt new file mode 100644 index 00000000..1b4d90ff --- /dev/null +++ b/android/examples/computeheadless/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computeheadless) + +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/computeheadless/build.gradle b/android/examples/computeheadless/build.gradle new file mode 100644 index 00000000..3c60fad8 --- /dev/null +++ b/android/examples/computeheadless/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputeheadless" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computeheadless' + into 'assets/shaders/computeheadless' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computeheadless/src/main/AndroidManifest.xml b/android/examples/computeheadless/src/main/AndroidManifest.xml new file mode 100644 index 00000000..ff289197 --- /dev/null +++ b/android/examples/computeheadless/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/computeheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computeheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computeheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computenbody/CMakeLists.txt b/android/examples/computenbody/CMakeLists.txt new file mode 100644 index 00000000..39edb7eb --- /dev/null +++ b/android/examples/computenbody/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computenbody) + +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/computenbody/build.gradle b/android/examples/computenbody/build.gradle new file mode 100644 index 00000000..bc76a50c --- /dev/null +++ b/android/examples/computenbody/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputenbody" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computenbody' + into 'assets/shaders/computenbody' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle01_rgba.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle_gradient_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computenbody/src/main/AndroidManifest.xml b/android/examples/computenbody/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d6a1348a --- /dev/null +++ b/android/examples/computenbody/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/computenbody/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computenbody/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computenbody/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computeparticles/CMakeLists.txt b/android/examples/computeparticles/CMakeLists.txt new file mode 100644 index 00000000..f4f5f624 --- /dev/null +++ b/android/examples/computeparticles/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computeparticles) + +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/computeparticles/build.gradle b/android/examples/computeparticles/build.gradle new file mode 100644 index 00000000..66cb4419 --- /dev/null +++ b/android/examples/computeparticles/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputeparticles" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computeparticles' + into 'assets/shaders/computeparticles' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle01_rgba.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle_gradient_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computeparticles/src/main/AndroidManifest.xml b/android/examples/computeparticles/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a8c15e55 --- /dev/null +++ b/android/examples/computeparticles/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/computeparticles/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computeparticles/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computeparticles/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/computeshader/CMakeLists.txt b/android/examples/computeshader/CMakeLists.txt new file mode 100644 index 00000000..2e7916b6 --- /dev/null +++ b/android/examples/computeshader/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME computeshader) + +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/computeshader/build.gradle b/android/examples/computeshader/build.gradle new file mode 100644 index 00000000..d443b92f --- /dev/null +++ b/android/examples/computeshader/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanComputeshader" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/computeshader' + into 'assets/shaders/computeshader' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'vulkan_11_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/computeshader/src/main/AndroidManifest.xml b/android/examples/computeshader/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2f1fe254 --- /dev/null +++ b/android/examples/computeshader/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/computeshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/computeshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/computeshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/conservativeraster/CMakeLists.txt b/android/examples/conservativeraster/CMakeLists.txt new file mode 100644 index 00000000..50e23771 --- /dev/null +++ b/android/examples/conservativeraster/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME conservativeraster) + +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/conservativeraster/build.gradle b/android/examples/conservativeraster/build.gradle new file mode 100644 index 00000000..cd03506d --- /dev/null +++ b/android/examples/conservativeraster/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanConservativeraster" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/conservativeraster' + into 'assets/shaders/conservativeraster' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/conservativeraster/src/main/AndroidManifest.xml b/android/examples/conservativeraster/src/main/AndroidManifest.xml new file mode 100644 index 00000000..16854713 --- /dev/null +++ b/android/examples/conservativeraster/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/conservativeraster/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/conservativeraster/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/conservativeraster/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/debugmarker/CMakeLists.txt b/android/examples/debugmarker/CMakeLists.txt new file mode 100644 index 00000000..bb48c2d2 --- /dev/null +++ b/android/examples/debugmarker/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME debugmarker) + +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/debugmarker/build.gradle b/android/examples/debugmarker/build.gradle new file mode 100644 index 00000000..eb9576a9 --- /dev/null +++ b/android/examples/debugmarker/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDebugmarker" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/debugmarker' + into 'assets/shaders/debugmarker' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'treasure_smooth.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'treasure_glow.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/debugmarker/src/main/AndroidManifest.xml b/android/examples/debugmarker/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8dd2194a --- /dev/null +++ b/android/examples/debugmarker/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/debugmarker/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/debugmarker/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/debugmarker/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/deferred/CMakeLists.txt b/android/examples/deferred/CMakeLists.txt new file mode 100644 index 00000000..0d05931c --- /dev/null +++ b/android/examples/deferred/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME deferred) + +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/deferred/build.gradle b/android/examples/deferred/build.gradle new file mode 100644 index 00000000..6a784086 --- /dev/null +++ b/android/examples/deferred/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDeferred" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/deferred' + into 'assets/shaders/deferred' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor01_color_*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor01_normal_*.ktx' + } + + copy { + from '../../../data/models/armor' + into 'assets/models/armor' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/deferred/src/main/AndroidManifest.xml b/android/examples/deferred/src/main/AndroidManifest.xml new file mode 100644 index 00000000..b5890663 --- /dev/null +++ b/android/examples/deferred/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/deferred/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/deferred/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/deferred/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/deferredmultisampling/CMakeLists.txt b/android/examples/deferredmultisampling/CMakeLists.txt new file mode 100644 index 00000000..7cd822b8 --- /dev/null +++ b/android/examples/deferredmultisampling/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME deferredmultisampling) + +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/deferredmultisampling/build.gradle b/android/examples/deferredmultisampling/build.gradle new file mode 100644 index 00000000..4ffabaa5 --- /dev/null +++ b/android/examples/deferredmultisampling/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDeferredmulitsampling" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/deferredmultisampling' + into 'assets/shaders/deferredmultisampling' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'openbox.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor02_color_*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor02_normal_*.ktx' + } + + copy { + from '../../../data/models/armor' + into 'assets/models/armor' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/deferredmultisampling/src/main/AndroidManifest.xml b/android/examples/deferredmultisampling/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a763ef48 --- /dev/null +++ b/android/examples/deferredmultisampling/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/deferredmultisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/deferredmultisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/deferredmultisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/deferredshadows/CMakeLists.txt b/android/examples/deferredshadows/CMakeLists.txt new file mode 100644 index 00000000..bf6b4254 --- /dev/null +++ b/android/examples/deferredshadows/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME deferredshadows) + +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/deferredshadows/build.gradle b/android/examples/deferredshadows/build.gradle new file mode 100644 index 00000000..da900f64 --- /dev/null +++ b/android/examples/deferredshadows/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDeferredshadows" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/deferredshadows' + into 'assets/shaders/deferredshadows' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'openbox.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor02_color_*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor02_normal_*.ktx' + } + + copy { + from '../../../data/models/armor' + into 'assets/models/armor' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/deferredshadows/src/main/AndroidManifest.xml b/android/examples/deferredshadows/src/main/AndroidManifest.xml new file mode 100644 index 00000000..504245db --- /dev/null +++ b/android/examples/deferredshadows/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/deferredshadows/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/deferredshadows/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/deferredshadows/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/descriptorsets/CMakeLists.txt b/android/examples/descriptorsets/CMakeLists.txt new file mode 100644 index 00000000..c0238824 --- /dev/null +++ b/android/examples/descriptorsets/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME descriptorsets) + +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/descriptorsets/build.gradle b/android/examples/descriptorsets/build.gradle new file mode 100644 index 00000000..ae61d21e --- /dev/null +++ b/android/examples/descriptorsets/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDescriptorsets" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/descriptorsets' + into 'assets/shaders/descriptorsets' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'crate01_color_height_rgba.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'crate02_color_height_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/descriptorsets/src/main/AndroidManifest.xml b/android/examples/descriptorsets/src/main/AndroidManifest.xml new file mode 100644 index 00000000..7f04a3e3 --- /dev/null +++ b/android/examples/descriptorsets/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/descriptorsets/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/descriptorsets/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/descriptorsets/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/displacement/CMakeLists.txt b/android/examples/displacement/CMakeLists.txt new file mode 100644 index 00000000..7653875e --- /dev/null +++ b/android/examples/displacement/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME displacement) + +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/displacement/build.gradle b/android/examples/displacement/build.gradle new file mode 100644 index 00000000..a8fe4945 --- /dev/null +++ b/android/examples/displacement/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDisplacement" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/displacement' + into 'assets/shaders/displacement' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'stonefloor03_color*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/displacement/src/main/AndroidManifest.xml b/android/examples/displacement/src/main/AndroidManifest.xml new file mode 100644 index 00000000..edf236b9 --- /dev/null +++ b/android/examples/displacement/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/displacement/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/displacement/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/displacement/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/distancefieldfonts/CMakeLists.txt b/android/examples/distancefieldfonts/CMakeLists.txt new file mode 100644 index 00000000..c0939b32 --- /dev/null +++ b/android/examples/distancefieldfonts/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME distancefieldfonts) + +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/distancefieldfonts/build.gradle b/android/examples/distancefieldfonts/build.gradle new file mode 100644 index 00000000..8f61c00a --- /dev/null +++ b/android/examples/distancefieldfonts/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDistancefieldfonts" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/distancefieldfonts' + into 'assets/shaders/distancefieldfonts' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'font_sdf_rgba.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'font_bitmap_rgba.ktx' + } + + copy { + from '../../../data/./' + into 'assets/./' + include 'font.fnt' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/distancefieldfonts/src/main/AndroidManifest.xml b/android/examples/distancefieldfonts/src/main/AndroidManifest.xml new file mode 100644 index 00000000..070a14d7 --- /dev/null +++ b/android/examples/distancefieldfonts/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/distancefieldfonts/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/distancefieldfonts/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/distancefieldfonts/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/dynamicuniformbuffer/CMakeLists.txt b/android/examples/dynamicuniformbuffer/CMakeLists.txt new file mode 100644 index 00000000..ccb9dee6 --- /dev/null +++ b/android/examples/dynamicuniformbuffer/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME dynamicuniformbuffer) + +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/dynamicuniformbuffer/build.gradle b/android/examples/dynamicuniformbuffer/build.gradle new file mode 100644 index 00000000..e49f6d5a --- /dev/null +++ b/android/examples/dynamicuniformbuffer/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanDynamicuniformbuffer" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/dynamicuniformbuffer' + into 'assets/shaders/dynamicuniformbuffer' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/dynamicuniformbuffer/src/main/AndroidManifest.xml b/android/examples/dynamicuniformbuffer/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f6ed456f --- /dev/null +++ b/android/examples/dynamicuniformbuffer/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/dynamicuniformbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/dynamicuniformbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/dynamicuniformbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/gears/CMakeLists.txt b/android/examples/gears/CMakeLists.txt new file mode 100644 index 00000000..f40e2bdf --- /dev/null +++ b/android/examples/gears/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME gears) + +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/gears/build.gradle b/android/examples/gears/build.gradle new file mode 100644 index 00000000..f39d5ad4 --- /dev/null +++ b/android/examples/gears/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanGears" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/gears' + into 'assets/shaders/gears' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/gears/src/main/AndroidManifest.xml b/android/examples/gears/src/main/AndroidManifest.xml new file mode 100644 index 00000000..c8338ffc --- /dev/null +++ b/android/examples/gears/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/gears/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/gears/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/gears/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/geometryshader/CMakeLists.txt b/android/examples/geometryshader/CMakeLists.txt new file mode 100644 index 00000000..480f2169 --- /dev/null +++ b/android/examples/geometryshader/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME geometryshader) + +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/geometryshader/build.gradle b/android/examples/geometryshader/build.gradle new file mode 100644 index 00000000..ff5e40c5 --- /dev/null +++ b/android/examples/geometryshader/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanGeometryshader" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/geometryshader' + into 'assets/shaders/geometryshader' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'suzanne.obj' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/geometryshader/src/main/AndroidManifest.xml b/android/examples/geometryshader/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a975812f --- /dev/null +++ b/android/examples/geometryshader/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/geometryshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/geometryshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/geometryshader/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/hdr/CMakeLists.txt b/android/examples/hdr/CMakeLists.txt new file mode 100644 index 00000000..468a5e42 --- /dev/null +++ b/android/examples/hdr/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME hdr) + +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/hdr/build.gradle b/android/examples/hdr/build.gradle new file mode 100644 index 00000000..ae38c9b0 --- /dev/null +++ b/android/examples/hdr/build.gradle @@ -0,0 +1,96 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanHDR" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/hdr' + into 'assets/shaders/hdr' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'torusknot.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'venus.fbx' + } + + copy { + from '../../../data/textures/hdr' + into 'assets/textures/hdr' + include 'uffizi_cube.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/hdr/src/main/AndroidManifest.xml b/android/examples/hdr/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2ec30ec5 --- /dev/null +++ b/android/examples/hdr/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/hdr/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/hdr/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/hdr/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/indirectdraw/CMakeLists.txt b/android/examples/indirectdraw/CMakeLists.txt new file mode 100644 index 00000000..77318ca3 --- /dev/null +++ b/android/examples/indirectdraw/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME indirectdraw) + +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/indirectdraw/build.gradle b/android/examples/indirectdraw/build.gradle new file mode 100644 index 00000000..19ac498f --- /dev/null +++ b/android/examples/indirectdraw/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanIndirectdraw" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/indirectdraw' + into 'assets/shaders/indirectdraw' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plants.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane_circle.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'skysphere.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'texturearray_plants*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'ground_dry*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/indirectdraw/src/main/AndroidManifest.xml b/android/examples/indirectdraw/src/main/AndroidManifest.xml new file mode 100644 index 00000000..6ae1ef86 --- /dev/null +++ b/android/examples/indirectdraw/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/indirectdraw/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/indirectdraw/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/indirectdraw/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/instancing/CMakeLists.txt b/android/examples/instancing/CMakeLists.txt new file mode 100644 index 00000000..1a120fc7 --- /dev/null +++ b/android/examples/instancing/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME instancing) + +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/instancing/build.gradle b/android/examples/instancing/build.gradle new file mode 100644 index 00000000..25984d8a --- /dev/null +++ b/android/examples/instancing/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanInstancing" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/instancing' + into 'assets/shaders/instancing' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'rock01.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'sphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'texturearray_rocks*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'lavaplanet*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/instancing/src/main/AndroidManifest.xml b/android/examples/instancing/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2d98c6e3 --- /dev/null +++ b/android/examples/instancing/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/instancing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/instancing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/instancing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/mesh/CMakeLists.txt b/android/examples/mesh/CMakeLists.txt new file mode 100644 index 00000000..d90f4fb8 --- /dev/null +++ b/android/examples/mesh/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME mesh) + +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/mesh/build.gradle b/android/examples/mesh/build.gradle new file mode 100644 index 00000000..80d87db9 --- /dev/null +++ b/android/examples/mesh/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanMesh" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/mesh' + into 'assets/shaders/mesh' + include '*.*' + } + + copy { + from '../../../data/models/voyager' + into 'assets/models/voyager' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/mesh/src/main/AndroidManifest.xml b/android/examples/mesh/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4e24788b --- /dev/null +++ b/android/examples/mesh/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/mesh/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/mesh/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/mesh/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/multisampling/CMakeLists.txt b/android/examples/multisampling/CMakeLists.txt new file mode 100644 index 00000000..b6aa7a64 --- /dev/null +++ b/android/examples/multisampling/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME multisampling) + +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/multisampling/build.gradle b/android/examples/multisampling/build.gradle new file mode 100644 index 00000000..7de52a38 --- /dev/null +++ b/android/examples/multisampling/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanMultisampling" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/mesh' + into 'assets/shaders/mesh' + include '*.*' + } + + copy { + from '../../../data/models/voyager' + into 'assets/models/voyager' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/multisampling/src/main/AndroidManifest.xml b/android/examples/multisampling/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5ae16c0c --- /dev/null +++ b/android/examples/multisampling/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/multisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/multisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/multisampling/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/multithreading/CMakeLists.txt b/android/examples/multithreading/CMakeLists.txt new file mode 100644 index 00000000..8014732e --- /dev/null +++ b/android/examples/multithreading/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME multithreading) + +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/multithreading/build.gradle b/android/examples/multithreading/build.gradle new file mode 100644 index 00000000..bd627539 --- /dev/null +++ b/android/examples/multithreading/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanMultithreading" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/multithreading' + into 'assets/shaders/multithreading' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'retroufo_red_lowpoly.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'sphere.obj' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/multithreading/src/main/AndroidManifest.xml b/android/examples/multithreading/src/main/AndroidManifest.xml new file mode 100644 index 00000000..fac79734 --- /dev/null +++ b/android/examples/multithreading/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/multithreading/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/multithreading/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/multithreading/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/occlusionquery/CMakeLists.txt b/android/examples/occlusionquery/CMakeLists.txt new file mode 100644 index 00000000..4ac9ceb7 --- /dev/null +++ b/android/examples/occlusionquery/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME occlusionquery) + +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/occlusionquery/build.gradle b/android/examples/occlusionquery/build.gradle new file mode 100644 index 00000000..297d6837 --- /dev/null +++ b/android/examples/occlusionquery/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanOcclusionquery" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/occlusionquery' + into 'assets/shaders/occlusionquery' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane_z.3ds' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.3ds' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'sphere.3ds' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/occlusionquery/src/main/AndroidManifest.xml b/android/examples/occlusionquery/src/main/AndroidManifest.xml new file mode 100644 index 00000000..1e50e184 --- /dev/null +++ b/android/examples/occlusionquery/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/occlusionquery/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/occlusionquery/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/occlusionquery/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/offscreen/CMakeLists.txt b/android/examples/offscreen/CMakeLists.txt new file mode 100644 index 00000000..3ea0ac38 --- /dev/null +++ b/android/examples/offscreen/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME offscreen) + +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/offscreen/build.gradle b/android/examples/offscreen/build.gradle new file mode 100644 index 00000000..da5feee4 --- /dev/null +++ b/android/examples/offscreen/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanOffscreen" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/offscreen' + into 'assets/shaders/offscreen' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'chinesedragon.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'darkmetal_*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/offscreen/src/main/AndroidManifest.xml b/android/examples/offscreen/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5572e30a --- /dev/null +++ b/android/examples/offscreen/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/offscreen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/offscreen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/offscreen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/parallaxmapping/CMakeLists.txt b/android/examples/parallaxmapping/CMakeLists.txt new file mode 100644 index 00000000..8e87f03a --- /dev/null +++ b/android/examples/parallaxmapping/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME parallaxmapping) + +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/parallaxmapping/build.gradle b/android/examples/parallaxmapping/build.gradle new file mode 100644 index 00000000..7c0c3b82 --- /dev/null +++ b/android/examples/parallaxmapping/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanParallaxmapping" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/parallaxmapping' + into 'assets/shaders/parallaxmapping' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'plane_z.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'rocks_normal_height_rgba.dds' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'rocks_color*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/parallaxmapping/src/main/AndroidManifest.xml b/android/examples/parallaxmapping/src/main/AndroidManifest.xml new file mode 100644 index 00000000..e40d99da --- /dev/null +++ b/android/examples/parallaxmapping/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/parallaxmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/parallaxmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/parallaxmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/particlefire/CMakeLists.txt b/android/examples/particlefire/CMakeLists.txt new file mode 100644 index 00000000..5a181c69 --- /dev/null +++ b/android/examples/particlefire/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME particlefire) + +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/particlefire/build.gradle b/android/examples/particlefire/build.gradle new file mode 100644 index 00000000..17306247 --- /dev/null +++ b/android/examples/particlefire/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanParticlefire" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/particlefire' + into 'assets/shaders/particlefire' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'fireplace.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle_fire.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle_smoke.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'fireplace_normalmap*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'fireplace_colormap*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/particlefire/src/main/AndroidManifest.xml b/android/examples/particlefire/src/main/AndroidManifest.xml new file mode 100644 index 00000000..c8f97268 --- /dev/null +++ b/android/examples/particlefire/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/particlefire/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/particlefire/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/particlefire/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pbrbasic/CMakeLists.txt b/android/examples/pbrbasic/CMakeLists.txt new file mode 100644 index 00000000..163901ab --- /dev/null +++ b/android/examples/pbrbasic/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pbrbasic) + +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/pbrbasic/build.gradle b/android/examples/pbrbasic/build.gradle new file mode 100644 index 00000000..312a84df --- /dev/null +++ b/android/examples/pbrbasic/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPBRBasic" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pbrbasic' + into 'assets/shaders/pbrbasic' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'torusknot.objdae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'venus.fbx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pbrbasic/src/main/AndroidManifest.xml b/android/examples/pbrbasic/src/main/AndroidManifest.xml new file mode 100644 index 00000000..ed399c39 --- /dev/null +++ b/android/examples/pbrbasic/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pbrbasic/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pbrbasic/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pbrbasic/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pbribl/CMakeLists.txt b/android/examples/pbribl/CMakeLists.txt new file mode 100644 index 00000000..c7e25e66 --- /dev/null +++ b/android/examples/pbribl/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pbribl) + +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/pbribl/build.gradle b/android/examples/pbribl/build.gradle new file mode 100644 index 00000000..03733d6d --- /dev/null +++ b/android/examples/pbribl/build.gradle @@ -0,0 +1,96 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPBRIBL" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pbribl' + into 'assets/shaders/pbribl' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'torusknot.objdae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'venus.fbx' + } + + copy { + from '../../../data/textures/hdr' + into 'assets/textures/hdr' + include 'pisa_cube.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pbribl/src/main/AndroidManifest.xml b/android/examples/pbribl/src/main/AndroidManifest.xml new file mode 100644 index 00000000..e3288148 --- /dev/null +++ b/android/examples/pbribl/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pbribl/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pbribl/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pbribl/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pbrtexture/CMakeLists.txt b/android/examples/pbrtexture/CMakeLists.txt new file mode 100644 index 00000000..b7907bfc --- /dev/null +++ b/android/examples/pbrtexture/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pbrtexture) + +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/pbrtexture/build.gradle b/android/examples/pbrtexture/build.gradle new file mode 100644 index 00000000..7988fb29 --- /dev/null +++ b/android/examples/pbrtexture/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPBRTexture" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pbrtexture' + into 'assets/shaders/pbrtexture' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/textures/hdr' + into 'assets/textures/hdr' + include 'gcanyon_cube.ktx' + } + + copy { + from '../../../data/models/cerberus' + into 'assets/models/cerberus' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pbrtexture/src/main/AndroidManifest.xml b/android/examples/pbrtexture/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8ed371b9 --- /dev/null +++ b/android/examples/pbrtexture/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pbrtexture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pbrtexture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pbrtexture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pipelines/CMakeLists.txt b/android/examples/pipelines/CMakeLists.txt new file mode 100644 index 00000000..ecfbf208 --- /dev/null +++ b/android/examples/pipelines/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pipelines) + +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/pipelines/build.gradle b/android/examples/pipelines/build.gradle new file mode 100644 index 00000000..dff91b29 --- /dev/null +++ b/android/examples/pipelines/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPipelines" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pipelines' + into 'assets/shaders/pipelines' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'treasure_smooth.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pipelines/src/main/AndroidManifest.xml b/android/examples/pipelines/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a6e7bc8a --- /dev/null +++ b/android/examples/pipelines/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pipelines/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pipelines/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pipelines/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pipelinestatistics/CMakeLists.txt b/android/examples/pipelinestatistics/CMakeLists.txt new file mode 100644 index 00000000..5938fdb0 --- /dev/null +++ b/android/examples/pipelinestatistics/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pipelinestatistics) + +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/pipelinestatistics/build.gradle b/android/examples/pipelinestatistics/build.gradle new file mode 100644 index 00000000..4552acea --- /dev/null +++ b/android/examples/pipelinestatistics/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPipelinestatistics" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pipelinestatistics' + into 'assets/shaders/pipelinestatistics' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'torusknot.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'venus.fbx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pipelinestatistics/src/main/AndroidManifest.xml b/android/examples/pipelinestatistics/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a26c688c --- /dev/null +++ b/android/examples/pipelinestatistics/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pipelinestatistics/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pipelinestatistics/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pipelinestatistics/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pushconstants/CMakeLists.txt b/android/examples/pushconstants/CMakeLists.txt new file mode 100644 index 00000000..bdcaf273 --- /dev/null +++ b/android/examples/pushconstants/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pushconstants) + +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/pushconstants/build.gradle b/android/examples/pushconstants/build.gradle new file mode 100644 index 00000000..4b177b84 --- /dev/null +++ b/android/examples/pushconstants/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPushconstants" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pushconstants' + into 'assets/shaders/pushconstants' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'samplescene.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pushconstants/src/main/AndroidManifest.xml b/android/examples/pushconstants/src/main/AndroidManifest.xml new file mode 100644 index 00000000..da183bf2 --- /dev/null +++ b/android/examples/pushconstants/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pushconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pushconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pushconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/pushdescriptors/CMakeLists.txt b/android/examples/pushdescriptors/CMakeLists.txt new file mode 100644 index 00000000..20c83bb7 --- /dev/null +++ b/android/examples/pushdescriptors/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME pushdescriptors) + +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/pushdescriptors/build.gradle b/android/examples/pushdescriptors/build.gradle new file mode 100644 index 00000000..b90091aa --- /dev/null +++ b/android/examples/pushdescriptors/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanPushdescriptors" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/pushdescriptors' + into 'assets/shaders/pushdescriptors' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'crate01_color_height_rgba.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'crate02_color_height_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/pushdescriptors/src/main/AndroidManifest.xml b/android/examples/pushdescriptors/src/main/AndroidManifest.xml new file mode 100644 index 00000000..66b5cbbe --- /dev/null +++ b/android/examples/pushdescriptors/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/pushdescriptors/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/pushdescriptors/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/pushdescriptors/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/radialblur/CMakeLists.txt b/android/examples/radialblur/CMakeLists.txt new file mode 100644 index 00000000..231874d8 --- /dev/null +++ b/android/examples/radialblur/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME radialblur) + +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/radialblur/build.gradle b/android/examples/radialblur/build.gradle new file mode 100644 index 00000000..9d48447c --- /dev/null +++ b/android/examples/radialblur/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanRadialblur" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/radialblur' + into 'assets/shaders/radialblur' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'glowsphere.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'particle_gradient_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/radialblur/src/main/AndroidManifest.xml b/android/examples/radialblur/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f0ee4f17 --- /dev/null +++ b/android/examples/radialblur/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/radialblur/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/radialblur/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/radialblur/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/raytracing/CMakeLists.txt b/android/examples/raytracing/CMakeLists.txt new file mode 100644 index 00000000..49af10e2 --- /dev/null +++ b/android/examples/raytracing/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME raytracing) + +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/raytracing/build.gradle b/android/examples/raytracing/build.gradle new file mode 100644 index 00000000..9289e4b6 --- /dev/null +++ b/android/examples/raytracing/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanRaytracing" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/raytracing' + into 'assets/shaders/raytracing' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/raytracing/src/main/AndroidManifest.xml b/android/examples/raytracing/src/main/AndroidManifest.xml new file mode 100644 index 00000000..710c4237 --- /dev/null +++ b/android/examples/raytracing/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/raytracing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/raytracing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/raytracing/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/renderheadless/CMakeLists.txt b/android/examples/renderheadless/CMakeLists.txt new file mode 100644 index 00000000..b5b60f37 --- /dev/null +++ b/android/examples/renderheadless/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME renderheadless) + +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/renderheadless/build.gradle b/android/examples/renderheadless/build.gradle new file mode 100644 index 00000000..be0dc864 --- /dev/null +++ b/android/examples/renderheadless/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanRenderheadless" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/renderheadless' + into 'assets/shaders/renderheadless' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/renderheadless/src/main/AndroidManifest.xml b/android/examples/renderheadless/src/main/AndroidManifest.xml new file mode 100644 index 00000000..6dd6b227 --- /dev/null +++ b/android/examples/renderheadless/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/renderheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/renderheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/renderheadless/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/scenerendering/CMakeLists.txt b/android/examples/scenerendering/CMakeLists.txt new file mode 100644 index 00000000..343a518c --- /dev/null +++ b/android/examples/scenerendering/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME scenerendering) + +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/scenerendering/build.gradle b/android/examples/scenerendering/build.gradle new file mode 100644 index 00000000..e413f590 --- /dev/null +++ b/android/examples/scenerendering/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanScenerendering" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/scenerendering' + into 'assets/shaders/scenerendering' + include '*.*' + } + + copy { + from '../../../data/models/sibenik' + into 'assets/models/sibenik' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/scenerendering/src/main/AndroidManifest.xml b/android/examples/scenerendering/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a12e04f2 --- /dev/null +++ b/android/examples/scenerendering/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/scenerendering/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/scenerendering/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/scenerendering/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/screenshot/CMakeLists.txt b/android/examples/screenshot/CMakeLists.txt new file mode 100644 index 00000000..295a1e32 --- /dev/null +++ b/android/examples/screenshot/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME screenshot) + +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/screenshot/build.gradle b/android/examples/screenshot/build.gradle new file mode 100644 index 00000000..2b3896cc --- /dev/null +++ b/android/examples/screenshot/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanScreenshot" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/screenshot' + into 'assets/shaders/screenshot' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'chinesedragon.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/screenshot/src/main/AndroidManifest.xml b/android/examples/screenshot/src/main/AndroidManifest.xml new file mode 100644 index 00000000..e2d9fd33 --- /dev/null +++ b/android/examples/screenshot/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/screenshot/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/screenshot/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/screenshot/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/shadowmapping/CMakeLists.txt b/android/examples/shadowmapping/CMakeLists.txt new file mode 100644 index 00000000..d82a20ad --- /dev/null +++ b/android/examples/shadowmapping/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME shadowmapping) + +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/shadowmapping/build.gradle b/android/examples/shadowmapping/build.gradle new file mode 100644 index 00000000..7b7c55db --- /dev/null +++ b/android/examples/shadowmapping/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanShadowmapping" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/shadowmapping' + into 'assets/shaders/shadowmapping' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscene_shadow.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/shadowmapping/src/main/AndroidManifest.xml b/android/examples/shadowmapping/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2f98411a --- /dev/null +++ b/android/examples/shadowmapping/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/shadowmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/shadowmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/shadowmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/shadowmappingcascade/CMakeLists.txt b/android/examples/shadowmappingcascade/CMakeLists.txt new file mode 100644 index 00000000..ca55209f --- /dev/null +++ b/android/examples/shadowmappingcascade/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME shadowmappingcascade) + +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/shadowmappingcascade/build.gradle b/android/examples/shadowmappingcascade/build.gradle new file mode 100644 index 00000000..9869f4ea --- /dev/null +++ b/android/examples/shadowmappingcascade/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanShadowmappingcascade" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/shadowmappingcascade' + into 'assets/shaders/shadowmappingcascade' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'terrain_simple.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'oak_*.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'gridlines.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'oak*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/shadowmappingcascade/src/main/AndroidManifest.xml b/android/examples/shadowmappingcascade/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5306205 --- /dev/null +++ b/android/examples/shadowmappingcascade/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/shadowmappingcascade/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/shadowmappingcascade/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/shadowmappingcascade/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/shadowmappingomni/CMakeLists.txt b/android/examples/shadowmappingomni/CMakeLists.txt new file mode 100644 index 00000000..41e5045f --- /dev/null +++ b/android/examples/shadowmappingomni/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME shadowmappingomni) + +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/shadowmappingomni/build.gradle b/android/examples/shadowmappingomni/build.gradle new file mode 100644 index 00000000..39776996 --- /dev/null +++ b/android/examples/shadowmappingomni/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanShadowmappingomni" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/shadowmapomni' + into 'assets/shaders/shadowmapomni' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'shadowscene_fire.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/shadowmappingomni/src/main/AndroidManifest.xml b/android/examples/shadowmappingomni/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bf397dc --- /dev/null +++ b/android/examples/shadowmappingomni/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/shadowmappingomni/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/shadowmappingomni/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/shadowmappingomni/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/skeletalanimation/CMakeLists.txt b/android/examples/skeletalanimation/CMakeLists.txt new file mode 100644 index 00000000..53af56a8 --- /dev/null +++ b/android/examples/skeletalanimation/CMakeLists.txt @@ -0,0 +1,36 @@ +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 new file mode 100644 index 00000000..03a26fb1 --- /dev/null +++ b/android/examples/skeletalanimation/build.gradle @@ -0,0 +1,84 @@ +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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/skeletalanimation' + into 'assets/shaders/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 new file mode 100644 index 00000000..95e4a668 --- /dev/null +++ b/android/examples/skeletalanimation/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/skeletalanimation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/specializationconstants/CMakeLists.txt b/android/examples/specializationconstants/CMakeLists.txt new file mode 100644 index 00000000..7812d01d --- /dev/null +++ b/android/examples/specializationconstants/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME specializationconstants) + +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/specializationconstants/build.gradle b/android/examples/specializationconstants/build.gradle new file mode 100644 index 00000000..01ab4439 --- /dev/null +++ b/android/examples/specializationconstants/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanSpecializationconstants" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/specializationconstants' + into 'assets/shaders/specializationconstants' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'color_teapot_spheres.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'metalplate_nomips_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/specializationconstants/src/main/AndroidManifest.xml b/android/examples/specializationconstants/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f51c7827 --- /dev/null +++ b/android/examples/specializationconstants/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/specializationconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/specializationconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/specializationconstants/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/sphericalenvmapping/CMakeLists.txt b/android/examples/sphericalenvmapping/CMakeLists.txt new file mode 100644 index 00000000..d8c309c5 --- /dev/null +++ b/android/examples/sphericalenvmapping/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME sphericalenvmapping) + +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/sphericalenvmapping/build.gradle b/android/examples/sphericalenvmapping/build.gradle new file mode 100644 index 00000000..b47d8973 --- /dev/null +++ b/android/examples/sphericalenvmapping/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanSphericalenvmapping" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/sphericalenvmapping' + into 'assets/shaders/sphericalenvmapping' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'chinesedragon.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'matcap_array_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/sphericalenvmapping/src/main/AndroidManifest.xml b/android/examples/sphericalenvmapping/src/main/AndroidManifest.xml new file mode 100644 index 00000000..3b6be14b --- /dev/null +++ b/android/examples/sphericalenvmapping/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/sphericalenvmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/sphericalenvmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/sphericalenvmapping/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/ssao/CMakeLists.txt b/android/examples/ssao/CMakeLists.txt new file mode 100644 index 00000000..604ef625 --- /dev/null +++ b/android/examples/ssao/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME ssao) + +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/ssao/build.gradle b/android/examples/ssao/build.gradle new file mode 100644 index 00000000..a3c8e473 --- /dev/null +++ b/android/examples/ssao/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanSSAO" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/ssao' + into 'assets/shaders/ssao' + include '*.*' + } + + copy { + from '../../../data/models/sibenik' + into 'assets/models/sibenik' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/ssao/src/main/AndroidManifest.xml b/android/examples/ssao/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8f5a7639 --- /dev/null +++ b/android/examples/ssao/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/ssao/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/ssao/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/ssao/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/stencilbuffer/CMakeLists.txt b/android/examples/stencilbuffer/CMakeLists.txt new file mode 100644 index 00000000..e6158903 --- /dev/null +++ b/android/examples/stencilbuffer/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME stencilbuffer) + +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/stencilbuffer/build.gradle b/android/examples/stencilbuffer/build.gradle new file mode 100644 index 00000000..4dba45c6 --- /dev/null +++ b/android/examples/stencilbuffer/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanStencilbuffer" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/stencilbuffer' + into 'assets/shaders/stencilbuffer' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'venus.fbx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/stencilbuffer/src/main/AndroidManifest.xml b/android/examples/stencilbuffer/src/main/AndroidManifest.xml new file mode 100644 index 00000000..42e98050 --- /dev/null +++ b/android/examples/stencilbuffer/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/stencilbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/stencilbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/stencilbuffer/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/subpasses/CMakeLists.txt b/android/examples/subpasses/CMakeLists.txt new file mode 100644 index 00000000..2eb057ae --- /dev/null +++ b/android/examples/subpasses/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME subpasses) + +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/subpasses/build.gradle b/android/examples/subpasses/build.gradle new file mode 100644 index 00000000..aaafe4ed --- /dev/null +++ b/android/examples/subpasses/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanSubpasses" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/subpasses' + into 'assets/shaders/subpasses' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'samplebuilding.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'samplebuilding_glass.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'colored_glass_*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/subpasses/src/main/AndroidManifest.xml b/android/examples/subpasses/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8c6043de --- /dev/null +++ b/android/examples/subpasses/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/subpasses/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/subpasses/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/subpasses/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/terraintessellation/CMakeLists.txt b/android/examples/terraintessellation/CMakeLists.txt new file mode 100644 index 00000000..1204c7df --- /dev/null +++ b/android/examples/terraintessellation/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME terraintessellation) + +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/terraintessellation/build.gradle b/android/examples/terraintessellation/build.gradle new file mode 100644 index 00000000..535482a3 --- /dev/null +++ b/android/examples/terraintessellation/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTerraintessellation" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/terraintessellation' + into 'assets/shaders/terraintessellation' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'geosphere.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'skysphere*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'terrain_texturearray*.ktx' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'terrain_heightmap_r16.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/terraintessellation/src/main/AndroidManifest.xml b/android/examples/terraintessellation/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4723f70f --- /dev/null +++ b/android/examples/terraintessellation/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/terraintessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/terraintessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/terraintessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/tessellation/CMakeLists.txt b/android/examples/tessellation/CMakeLists.txt new file mode 100644 index 00000000..f9dc03f6 --- /dev/null +++ b/android/examples/tessellation/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME tessellation) + +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/tessellation/build.gradle b/android/examples/tessellation/build.gradle new file mode 100644 index 00000000..99a88354 --- /dev/null +++ b/android/examples/tessellation/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTessellation" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/tessellation' + into 'assets/shaders/tessellation' + include '*.*' + } + + copy { + from '../../../data/models/lowpoly' + into 'assets/models/lowpoly' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'retroufo_glow.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'deer*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/tessellation/src/main/AndroidManifest.xml b/android/examples/tessellation/src/main/AndroidManifest.xml new file mode 100644 index 00000000..6f7c645c --- /dev/null +++ b/android/examples/tessellation/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/tessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/tessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/tessellation/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/textoverlay/CMakeLists.txt b/android/examples/textoverlay/CMakeLists.txt new file mode 100644 index 00000000..7107d8c3 --- /dev/null +++ b/android/examples/textoverlay/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME textoverlay) + +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/textoverlay/build.gradle b/android/examples/textoverlay/build.gradle new file mode 100644 index 00000000..b24ffbf2 --- /dev/null +++ b/android/examples/textoverlay/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTextoverlay" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/textoverlay' + into 'assets/shaders/textoverlay' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/textoverlay/src/main/AndroidManifest.xml b/android/examples/textoverlay/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f3a05228 --- /dev/null +++ b/android/examples/textoverlay/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/textoverlay/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/textoverlay/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/textoverlay/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/texture/CMakeLists.txt b/android/examples/texture/CMakeLists.txt new file mode 100644 index 00000000..b4f5c875 --- /dev/null +++ b/android/examples/texture/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME texture) + +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/texture/build.gradle b/android/examples/texture/build.gradle new file mode 100644 index 00000000..4e2a2164 --- /dev/null +++ b/android/examples/texture/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTexture" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/texture' + into 'assets/shaders/texture' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'metalplate01_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/texture/src/main/AndroidManifest.xml b/android/examples/texture/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5482b681 --- /dev/null +++ b/android/examples/texture/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/texture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/texture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/texture/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/texture3d/CMakeLists.txt b/android/examples/texture3d/CMakeLists.txt new file mode 100644 index 00000000..82f56cf5 --- /dev/null +++ b/android/examples/texture3d/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME texture3d) + +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/texture3d/build.gradle b/android/examples/texture3d/build.gradle new file mode 100644 index 00000000..2f40d229 --- /dev/null +++ b/android/examples/texture3d/build.gradle @@ -0,0 +1,60 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTexture3d" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/texture3d' + into 'assets/shaders/texture3d' + include '*.*' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/texture3d/src/main/AndroidManifest.xml b/android/examples/texture3d/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5ba25310 --- /dev/null +++ b/android/examples/texture3d/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/texture3d/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/texture3d/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/texture3d/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/texturearray/CMakeLists.txt b/android/examples/texturearray/CMakeLists.txt new file mode 100644 index 00000000..1afb3b78 --- /dev/null +++ b/android/examples/texturearray/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME texturearray) + +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/texturearray/build.gradle b/android/examples/texturearray/build.gradle new file mode 100644 index 00000000..3e8232b3 --- /dev/null +++ b/android/examples/texturearray/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTexturearray" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/texturearray' + into 'assets/shaders/texturearray' + include '*.*' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'texturearray*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/texturearray/src/main/AndroidManifest.xml b/android/examples/texturearray/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a466469a --- /dev/null +++ b/android/examples/texturearray/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/texturearray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/texturearray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/texturearray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/texturecubemap/CMakeLists.txt b/android/examples/texturecubemap/CMakeLists.txt new file mode 100644 index 00000000..31c350e2 --- /dev/null +++ b/android/examples/texturecubemap/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME texturecubemap) + +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/texturecubemap/build.gradle b/android/examples/texturecubemap/build.gradle new file mode 100644 index 00000000..e9deaa48 --- /dev/null +++ b/android/examples/texturecubemap/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTexturecubemap" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/texturecubemap' + into 'assets/shaders/texturecubemap' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'sphere.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'teapot.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'torusknot.obj' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'cubemap_yokohama*.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/texturecubemap/src/main/AndroidManifest.xml b/android/examples/texturecubemap/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a1e81a20 --- /dev/null +++ b/android/examples/texturecubemap/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/texturecubemap/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/texturecubemap/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/texturecubemap/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/texturemipmapgen/CMakeLists.txt b/android/examples/texturemipmapgen/CMakeLists.txt new file mode 100644 index 00000000..f9f6af6b --- /dev/null +++ b/android/examples/texturemipmapgen/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME texturemipmapgen) + +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/texturemipmapgen/build.gradle b/android/examples/texturemipmapgen/build.gradle new file mode 100644 index 00000000..1913bc41 --- /dev/null +++ b/android/examples/texturemipmapgen/build.gradle @@ -0,0 +1,72 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanTexturemipmapgen" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/texturemipmapgen' + into 'assets/shaders/texturemipmapgen' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'tunnel_cylinder.dae' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'metalplate_nomips_rgba.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/texturemipmapgen/src/main/AndroidManifest.xml b/android/examples/texturemipmapgen/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d197eef0 --- /dev/null +++ b/android/examples/texturemipmapgen/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/texturemipmapgen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/texturemipmapgen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/texturemipmapgen/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/viewportarray/CMakeLists.txt b/android/examples/viewportarray/CMakeLists.txt new file mode 100644 index 00000000..9afd51b5 --- /dev/null +++ b/android/examples/viewportarray/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME viewportarray) + +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/viewportarray/build.gradle b/android/examples/viewportarray/build.gradle new file mode 100644 index 00000000..316137e6 --- /dev/null +++ b/android/examples/viewportarray/build.gradle @@ -0,0 +1,66 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanViewportarray" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/viewportarray' + into 'assets/shaders/viewportarray' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'sampleroom.dae' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/viewportarray/src/main/AndroidManifest.xml b/android/examples/viewportarray/src/main/AndroidManifest.xml new file mode 100644 index 00000000..edbb29de --- /dev/null +++ b/android/examples/viewportarray/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/viewportarray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/viewportarray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/viewportarray/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/examples/vulkanscene/CMakeLists.txt b/android/examples/vulkanscene/CMakeLists.txt new file mode 100644 index 00000000..7735add3 --- /dev/null +++ b/android/examples/vulkanscene/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) + +set(NAME vulkanscene) + +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/vulkanscene/build.gradle b/android/examples/vulkanscene/build.gradle new file mode 100644 index 00000000..1ad6fe37 --- /dev/null +++ b/android/examples/vulkanscene/build.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' +apply from: '../gradle/outputfilename.gradle' + +android { + compileSdkVersion 26 + defaultConfig { + applicationId "de.saschawillems.vulkanVulkanscene" + 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/base' + into "assets/shaders/base" + include '*.spv' + } + + copy { + from '../../../data/shaders/vulkanscene' + into 'assets/shaders/vulkanscene' + include '*.*' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenelogos.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenebackground.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'vulkanscenemodels.dae' + } + + copy { + from '../../../data/models' + into 'assets/models' + include 'cube.obj' + } + + copy { + from '../../../data/textures' + into 'assets/textures' + include 'cubemap_vulkan.ktx' + } + + +} + +preBuild.dependsOn copyTask \ No newline at end of file diff --git a/android/examples/vulkanscene/src/main/AndroidManifest.xml b/android/examples/vulkanscene/src/main/AndroidManifest.xml new file mode 100644 index 00000000..6005450d --- /dev/null +++ b/android/examples/vulkanscene/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/android/examples/vulkanscene/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java b/android/examples/vulkanscene/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java new file mode 100644 index 00000000..12e14fc6 --- /dev/null +++ b/android/examples/vulkanscene/src/main/java/de/saschawillems/vulkanSample/VulkanActivity.java @@ -0,0 +1,58 @@ +/* + * 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) { } + } +} diff --git a/android/settings.gradle b/android/settings.gradle index 9c0507b8..89a5af44 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,2 +1,61 @@ +include 'examples/:bloom' +include 'examples/:computecloth' +include 'examples/:computecullandlod' +include 'examples/:computeheadless' +include 'examples/:computenbody' +include 'examples/:computeparticles' +include 'examples/:computeshader' +include 'examples/:conservativeraster' +include 'examples/:debugmarker' +include 'examples/:deferred' +include 'examples/:deferredmultisampling' +include 'examples/:deferredshadows' +include 'examples/:descriptorsets' +include 'examples/:displacement' +include 'examples/:distancefieldfonts' +include 'examples/:dynamicuniformbuffer' +include 'examples/:gears' +include 'examples/:geometryshader' +include 'examples/:hdr' include 'examples/:imgui' +include 'examples/:indirectdraw' +include 'examples/:instancing' +include 'examples/:mesh' +include 'examples/:multisampling' +include 'examples/:multithreading' +include 'examples/:occlusionquery' +include 'examples/:offscreen' +include 'examples/:parallaxmapping' +include 'examples/:particlefire' +include 'examples/:pbrbasic' +include 'examples/:pbribl' +include 'examples/:pbrtexture' +include 'examples/:pipelines' +include 'examples/:pipelinestatistics' +include 'examples/:pushconstants' +include 'examples/:pushdescriptors' +include 'examples/:radialblur' +include 'examples/:raytracing' +include 'examples/:renderheadless' +include 'examples/:scenerendering' +include 'examples/:screenshot' +include 'examples/:shadowmapping' +include 'examples/:shadowmappingcascade' +include 'examples/:shadowmappingomni' +include 'examples/:skeletalanimation' +include 'examples/:specializationconstants' +include 'examples/:sphericalenvmapping' +include 'examples/:ssao' +include 'examples/:stencilbuffer' +include 'examples/:subpasses' +include 'examples/:terraintessellation' +include 'examples/:tessellation' +include 'examples/:textoverlay' +include 'examples/:texture' +include 'examples/:texture3d' +include 'examples/:texturearray' +include 'examples/:texturecubemap' +include 'examples/:texturemipmapgen' include 'examples/:triangle' +include 'examples/:viewportarray' +include 'examples/:vulkanscene' From b7a1aee5df0347b02c6a7c759b45884e74398c83 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 18:42:03 +0200 Subject: [PATCH 19/24] Updated android readme (using Android Studio) --- android/README.md | 83 ++++++++---------------------------- android/androidstudio01.jpg | Bin 0 -> 27897 bytes android/androidstudio02.jpg | Bin 0 -> 39919 bytes 3 files changed, 17 insertions(+), 66 deletions(-) create mode 100644 android/androidstudio01.jpg create mode 100644 android/androidstudio02.jpg diff --git a/android/README.md b/android/README.md index 7463ec2b..1142f93f 100644 --- a/android/README.md +++ b/android/README.md @@ -2,87 +2,38 @@ ## Vulkan on Android -Since Vulkan is not yet part of the Android OS (like OpenGL ES) the library and function pointers need to be dynamically loaded before using any of the Vulkan functions. See the **vulkanandroid.h** and **vulkanandroid.cpp** files in the base folder of the repositoy root for how this is done. - ## Device support - **To run these examples you need a device with an Android image that suports Vulkan** -- Builds currently only support arm-v7, x86 may follow at a later point -- Android TV leanback launcher is supported, so the examples will show up on the launcher +- Builds currently only support arm-v7, other architectures may be added later - Basic gamepad support is available too (zoom and rotate) - Basic touch control support (zoom, move, rotate, look) ## Building ### Requirements -- [Android NDK r11b](http://developer.android.com/ndk/downloads/index.html) (or newer) - Somewhere in your search path -- Examples are built against API level 23 (requires the SDK Platform installed) -- Python 3.x + +- [Android Studio](https://developer.android.com/studio/) +- [Android NDK](https://developer.android.com/ndk/downloads/) (r11b or higher) +- [Android SDK](https://developer.android.com/studio/index.html) + +### Update the asset pack + +During the Android build process, assets are copied over from the data folder, so it's important to make sure that a current version of the [asset pack](../data/README.md) has been downloaded and extracted. ### Building the Examples -### Grab Externals +Select **Import project** from the welcome screen (or from inside Android via **File->New**): -Make sure all submodules have been cloned using the [steps from main README](../README.md#cloning). + -### Complete set +Navigate to the **android** subfolder of this repository (should be higlighted with a gadle symbol): -**Please note that building (and deploying) all examples may take a while** + -#### Build only +Select OK to start the import. -``` -build-all.py -``` +**Note:** Initial import will take a while due to the number of examples. -This will build all apks and puts them into the **bin** folder. +Once the import is done, the samples can be build, debugged and run from inside Android Studio just like any other Android project. -#### Build and deploy - -``` -build-all.py -deploy -``` - -This will build all apks and deploys them to the currently attached android device. - -### Single examples - -These are for building and/or deploying a single example. - -#### Build only - -Call build(.bat) with the name of the example to build, e.g. : - -``` -build.py pbrtexture -``` - -This will build the apk for the triangle example and puts it into the **bin** folder. - -#### Build and deploy - -``` -build.py pbrtexture -deploy -``` - -This will build the apk for the triangle example and deploys it to the currently attached android device. - -#### Validation layers - -``` -build.py pbrtexture -validation (-deploy) -``` - -Builds the apk, adds the validation layer libraries and enables validation via a compiler define. - -**Note**: You need to manually build the validation layers and put them in the [proper folder](layers/). If the libaries are not present they won't be included with the apk and running the app will fail. - -## Removing - -A single file for removing all installed examples is provided in case you installed all of them and don't want to remove them by hand (which is especially tedious on Android TV). - - -``` -uninstall-all.py -``` - -This will remove any installed Android example from this repository from the attached device. +**Note:** If you update the repository at a later point you may have to resync to have additional examples added to the Android Studio project (**File->Sync Project with Gradle files**). diff --git a/android/androidstudio01.jpg b/android/androidstudio01.j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i%(+BuNB)*;FRCfU4QplextK0nM)fI3gGH{BmHq}`#sWn7Ij&~?`_G3dhipZQ9 zsG)ENb0phP*Ivki3Kk1ovRW$ywh34Q@IG@j^h%SIR7f=oVAY85ltuBG?QTXNR}PK zqFz!ulGyfgb@8fy8b8`_;}9VF;TZ3F=ly#qSq%X>nQqRB$g`(3*>K*^+gswRv@3xt z;iZvaQxEZgIL-UmbbS1<{<$L^20R6iYDsa$X)*j<>M5TKy)Oi=U`g4LJ^>=4dRLvX88KfY;#J-xBaAXg|u?5iWNwbCluR66*__%XAko%;|2zRK^lVV>iM8C@KPoL*JhQ31aC=EH>%0MldU3 f`s4AD?;im*#NX5Yy$GMb1PahJ$!9+C&z^q(rSWE1 literal 0 HcmV?d00001 diff --git a/android/androidstudio02.jpg b/android/androidstudio02.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fe0b4e804b61575aaa249afb239f92d8b11d22dc GIT binary patch literal 39919 zcmeFa1yq&W)-e1aAfQNhD-8mobZrqS5h>}EkY>{fb&Q~S^_{qLIU)_f57D| za9iBj^f>^?$^t9^0HA}vaROJsZ`Z(w4154dTO%VYI}@lqa5)Z$0jMb82l?CItEi|~ z(QlxmqoJYWT*t(?fsaFgkB5VYM?g$TNo`0#Z6gIvNH_nwvD= z20=o-dKDcF9UC1Tn}!gNkmi5j)q9ctW1IS3XfGfC2$hb(C4FEL&AfbY|eM9fJ z57HH66x6F|=or_ogD({009TNZk*|R8g9w0cyMw<2D7dJ2H#tSG;wwBuyJbUg*E8f3 zI_-n}T0+I%ZMu8o?v$Z{PWbhJ{B&M!o+KotTuIlA4yDky%h!R9pftEi139 zZ)j|4ZfR}n>mL{#8Xg%Po1L3q_`0~Xyt2BpySIOEcyxSn`VB865YOK~|3vH$c;SM0 zT>+N`1??MNNLQS|2N@Ry^(N<4JW&O-XEyk^?s}pVJP7%eUyDI|PjQ=2-?sM}5gpeo z{mwVk{(;$l4>7O*Bh3DV*mu0f08C^gaPg3F0SIuaRHuWtozv~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rgl2Mz0EulxvN`liZvsseNPB`Jrr>)L)I{W%*MP zI-c3L9_RT1qvjDhvM`}6e_M8X$`-ogy=E0(;pYB@7P0yWfxJX}KUdex~D0BM8-LaNKJ9w(vCh|nB0{sq2i(>-#CF!yzT-V?c=V^(OVW`)R} zkp3Pcl3|DxgFfa_)bXfnw%3Gw-^YDwU$2iWgKlFi8P zH_AVQ_E5ZM$G{|{v#bCz9P+^*0Y>lqYns^ub9JZ$FR53o>dvK1b8jv!mOA3yBFhi; zCe1|EElA16Mk&|z#v=3oZm=o&=iky~v)i=QcGLiiZgla0eaoTU&rKM@LalS1q{BKd zW+GTJ8Izf;sbQolmbx~&C2sQzzKLafVSuLTp!C@@ojO#ey+HG3gQS5+nmbL%83$sV z8<@7dXWP=P#X=I~^#hJ>6Gr|@$}sOu@>Zx(OKCW9i5;*!dacN3`=?L{d@8 z!0{~q)m<)uZln#dsSI?1+I*^MadtM4KO=!4rX*)|JYgel(xmtN1~;{$vo%?*oiU#z zRkFoNr8vU)Q<41UCEx)jp%3X6|H|b250(`fq%A z6cim6givY?2S$+j5ikGmqsiV>&+E!C=Uc%G6g=t^c>E8fG^c;3>X+^tg{=BgziYj$ zytWNVr({bEEi@3oy1apfZ>i~s{Rj@};f7=1&mbs}>CSuhqiEpWBhgdL?iJvRu_#A0 zkk!7}ur2%7nZNGAUv}` Date: Thu, 10 May 2018 18:48:15 +0200 Subject: [PATCH 20/24] Removed outdated android debug layer information (needs to be reworked for gradle) --- android/layers/README.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 android/layers/README.md diff --git a/android/layers/README.md b/android/layers/README.md deleted file mode 100644 index 94d8bcea..00000000 --- a/android/layers/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Android validation layers - -Put the pre-built validation layers into the folder for the architecture you're targeting. - -E.g. for armeabi-v7a: - -- ./armeabi-v7a/libVkLayer_core_validation.so -- ./armeabi-v7a/libVkLayer_object_tracker.so -- ... - -After this, build the example you want validation to be enabled for with the "-validation" flag, e.g.: - -``` -build pbrtexture -validation -``` \ No newline at end of file From ab6fc5e842a7831164343b29e8644bcf35562eed Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 10 May 2018 20:04:30 +0200 Subject: [PATCH 21/24] Android build instructions --- BUILD.md | 2 +- android/README.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/BUILD.md b/BUILD.md index cd6afe19..69870638 100644 --- a/BUILD.md +++ b/BUILD.md @@ -26,7 +26,7 @@ Note that you need [assimp](https://github.com/assimp/assimp) in order to compil ## [Android](android/) -Building on Android is done using the [Android NDK](http://developer.android.com/tools/sdk/ndk/index.html) and requires a device that supports Vulkan. Please see the [Android readme](./android/README.md) on how to build and deploy the examples. +Building on Android is done using [Android Studio](https://developer.android.com/studio/) (Google's own and free Android IDE) and requires a device that supports Vulkan. Please see the [Android readme](./android/README.md) for details on how to build and run the samples. ## [iOS and macOS](xcode/) diff --git a/android/README.md b/android/README.md index 1142f93f..a9eb997d 100644 --- a/android/README.md +++ b/android/README.md @@ -1,6 +1,4 @@ -# Vulkan examples on Android - -## Vulkan on Android +# Vulkan examples on Android ## Device support - **To run these examples you need a device with an Android image that suports Vulkan** From be78fd04749563401f76361cbba529762d144f67 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 11 May 2018 08:31:26 +0200 Subject: [PATCH 22/24] Removed deprecated app_dummy call --- examples/computeheadless/computeheadless.cpp | 1 - examples/renderheadless/renderheadless.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/examples/computeheadless/computeheadless.cpp b/examples/computeheadless/computeheadless.cpp index cda2deb1..c941f6e6 100644 --- a/examples/computeheadless/computeheadless.cpp +++ b/examples/computeheadless/computeheadless.cpp @@ -509,7 +509,6 @@ void handleAppCommand(android_app * app, int32_t cmd) { } } void android_main(android_app* state) { - app_dummy(); androidapp = state; androidapp->onAppCmd = handleAppCommand; int ident, events; diff --git a/examples/renderheadless/renderheadless.cpp b/examples/renderheadless/renderheadless.cpp index cfd18369..78eed7f8 100644 --- a/examples/renderheadless/renderheadless.cpp +++ b/examples/renderheadless/renderheadless.cpp @@ -844,7 +844,6 @@ void handleAppCommand(android_app * app, int32_t cmd) { } } void android_main(android_app* state) { - app_dummy(); androidapp = state; androidapp->onAppCmd = handleAppCommand; int ident, events; From 79ac92bc3b7ee24b1981a4c0e2e94df1e50003a2 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 11 May 2018 08:43:20 +0200 Subject: [PATCH 23/24] Validation layer present check --- examples/computeheadless/computeheadless.cpp | 65 ++++++++++++++------ examples/renderheadless/renderheadless.cpp | 65 ++++++++++++++------ 2 files changed, 92 insertions(+), 38 deletions(-) diff --git a/examples/computeheadless/computeheadless.cpp b/examples/computeheadless/computeheadless.cpp index c941f6e6..9e6b13f3 100644 --- a/examples/computeheadless/computeheadless.cpp +++ b/examples/computeheadless/computeheadless.cpp @@ -76,7 +76,7 @@ public: VkPipeline pipeline; VkShaderModule shaderModule; - VkDebugReportCallbackEXT debugReportCallback; + VkDebugReportCallbackEXT debugReportCallback{}; VkResult createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, VkBuffer *buffer, VkDeviceMemory *memory, VkDeviceSize size, void *data = nullptr) { @@ -142,18 +142,41 @@ public: uint32_t layerCount = 0; #if defined(VK_USE_PLATFORM_ANDROID_KHR) - const char* validationlayers[] = { "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker","VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects" }; + const char* validationLayers[] = { "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker","VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects" }; layerCount = 6; #else - const char* validationlayers[] = { "VK_LAYER_LUNARG_standard_validation" }; + const char* validationLayers[] = { "VK_LAYER_LUNARG_standard_validation" }; layerCount = 1; #endif #if DEBUG - instanceCreateInfo.ppEnabledLayerNames = validationlayers; - const char* validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - instanceCreateInfo.enabledLayerCount = layerCount; - instanceCreateInfo.enabledExtensionCount = 1; - instanceCreateInfo.ppEnabledExtensionNames = &validationExt; + // Check if layers are available + uint32_t instanceLayerCount; + vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); + std::vector instanceLayers(instanceLayerCount); + vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); + + bool layersAvailable = true; + for (auto layerName : validationLayers) { + bool layerAvailable = false; + for (auto instanceLayer : instanceLayers) { + if (strcmp(instanceLayer.layerName, layerName) == 0) { + layerAvailable = true; + break; + } + } + if (!layerAvailable) { + layersAvailable = false; + break; + } + } + + if (layersAvailable) { + instanceCreateInfo.ppEnabledLayerNames = validationLayers; + const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + instanceCreateInfo.enabledLayerCount = layerCount; + instanceCreateInfo.enabledExtensionCount = 1; + instanceCreateInfo.ppEnabledExtensionNames = &validationExt; + } #endif VK_CHECK_RESULT(vkCreateInstance(&instanceCreateInfo, nullptr, &instance)); @@ -161,15 +184,17 @@ public: vks::android::loadVulkanFunctions(instance); #endif #if DEBUG - VkDebugReportCallbackCreateInfoEXT debugReportCreateInfo = {}; - debugReportCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; - debugReportCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; - debugReportCreateInfo.pfnCallback = (PFN_vkDebugReportCallbackEXT)debugMessageCallback; + if (layersAvailable) { + VkDebugReportCallbackCreateInfoEXT debugReportCreateInfo = {}; + debugReportCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + debugReportCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; + debugReportCreateInfo.pfnCallback = (PFN_vkDebugReportCallbackEXT)debugMessageCallback; - // We have to explicitly load this function. - PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT")); - assert(vkCreateDebugReportCallbackEXT); - VK_CHECK_RESULT(vkCreateDebugReportCallbackEXT(instance, &debugReportCreateInfo, nullptr, &debugReportCallback)); + // We have to explicitly load this function. + PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT")); + assert(vkCreateDebugReportCallbackEXT); + VK_CHECK_RESULT(vkCreateDebugReportCallbackEXT(instance, &debugReportCreateInfo, nullptr, &debugReportCallback)); + } #endif /* @@ -492,9 +517,11 @@ public: vkDestroyShaderModule(device, shaderModule, nullptr); vkDestroyDevice(device, nullptr); #if DEBUG - PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT")); - assert(vkDestroyDebugReportCallback); - vkDestroyDebugReportCallback(instance, debugReportCallback, nullptr); + if (debugReportCallback) { + PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT")); + assert(vkDestroyDebugReportCallback); + vkDestroyDebugReportCallback(instance, debugReportCallback, nullptr); + } #endif vkDestroyInstance(instance, nullptr); } diff --git a/examples/renderheadless/renderheadless.cpp b/examples/renderheadless/renderheadless.cpp index 78eed7f8..a9fb704a 100644 --- a/examples/renderheadless/renderheadless.cpp +++ b/examples/renderheadless/renderheadless.cpp @@ -89,7 +89,7 @@ public: FrameBufferAttachment colorAttachment, depthAttachment; VkRenderPass renderPass; - VkDebugReportCallbackEXT debugReportCallback; + VkDebugReportCallbackEXT debugReportCallback{}; uint32_t getMemoryTypeIndex(uint32_t typeBits, VkMemoryPropertyFlags properties) { VkPhysicalDeviceMemoryProperties deviceMemoryProperties; @@ -172,18 +172,41 @@ public: uint32_t layerCount = 0; #if defined(VK_USE_PLATFORM_ANDROID_KHR) - const char* validationlayers[] = { "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker","VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects" }; + const char* validationLayers[] = { "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker","VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects" }; layerCount = 6; #else - const char* validationlayers[] = { "VK_LAYER_LUNARG_standard_validation" }; + const char* validationLayers[] = { "VK_LAYER_LUNARG_standard_validation" }; layerCount = 1; #endif #if DEBUG - instanceCreateInfo.ppEnabledLayerNames = validationlayers; - const char* validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - instanceCreateInfo.enabledLayerCount = layerCount; - instanceCreateInfo.enabledExtensionCount = 1; - instanceCreateInfo.ppEnabledExtensionNames = &validationExt; + // Check if layers are available + uint32_t instanceLayerCount; + vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); + std::vector instanceLayers(instanceLayerCount); + vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); + + bool layersAvailable = true; + for (auto layerName : validationLayers) { + bool layerAvailable = false; + for (auto instanceLayer : instanceLayers) { + if (strcmp(instanceLayer.layerName, layerName) == 0) { + layerAvailable = true; + break; + } + } + if (!layerAvailable) { + layersAvailable = false; + break; + } + } + + if (layersAvailable) { + instanceCreateInfo.ppEnabledLayerNames = validationLayers; + const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + instanceCreateInfo.enabledLayerCount = layerCount; + instanceCreateInfo.enabledExtensionCount = 1; + instanceCreateInfo.ppEnabledExtensionNames = &validationExt; + } #endif VK_CHECK_RESULT(vkCreateInstance(&instanceCreateInfo, nullptr, &instance)); @@ -191,15 +214,17 @@ public: vks::android::loadVulkanFunctions(instance); #endif #if DEBUG - VkDebugReportCallbackCreateInfoEXT debugReportCreateInfo = {}; - debugReportCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; - debugReportCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; - debugReportCreateInfo.pfnCallback = (PFN_vkDebugReportCallbackEXT)debugMessageCallback; + if (layersAvailable) { + VkDebugReportCallbackCreateInfoEXT debugReportCreateInfo = {}; + debugReportCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + debugReportCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; + debugReportCreateInfo.pfnCallback = (PFN_vkDebugReportCallbackEXT)debugMessageCallback; - // We have to explicitly load this function. - PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT")); - assert(vkCreateDebugReportCallbackEXT); - VK_CHECK_RESULT(vkCreateDebugReportCallbackEXT(instance, &debugReportCreateInfo, nullptr, &debugReportCallback)); + // We have to explicitly load this function. + PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT")); + assert(vkCreateDebugReportCallbackEXT); + VK_CHECK_RESULT(vkCreateDebugReportCallbackEXT(instance, &debugReportCreateInfo, nullptr, &debugReportCallback)); + } #endif /* @@ -824,9 +849,11 @@ public: } vkDestroyDevice(device, nullptr); #if DEBUG - PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT")); - assert(vkDestroyDebugReportCallback); - vkDestroyDebugReportCallback(instance, debugReportCallback, nullptr); + if (debugReportCallback) { + PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback = reinterpret_cast(vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT")); + assert(vkDestroyDebugReportCallback); + vkDestroyDebugReportCallback(instance, debugReportCallback, nullptr); + } #endif vkDestroyInstance(instance, nullptr); #if defined(VK_USE_PLATFORM_ANDROID_KHR) From 565d8f91c5e0157915cedc2ef5b008987e7f5796 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 11 May 2018 08:44:18 +0200 Subject: [PATCH 24/24] Lower instance count on android --- examples/instancing/instancing.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/instancing/instancing.cpp b/examples/instancing/instancing.cpp index 6d87ef99..6e0122a9 100644 --- a/examples/instancing/instancing.cpp +++ b/examples/instancing/instancing.cpp @@ -28,7 +28,11 @@ #define VERTEX_BUFFER_BIND_ID 0 #define INSTANCE_BUFFER_BIND_ID 1 #define ENABLE_VALIDATION false +#if defined(__ANDROID__) +#define INSTANCE_COUNT 4096 +#else #define INSTANCE_COUNT 8192 +#endif class VulkanExample : public VulkanExampleBase {