Added android support for parallax mapping, pipelines, push constants, radial blur, skeletal animation and tessellation examples (#97)
This commit is contained in:
parent
fd18bd8084
commit
3bcc162011
42 changed files with 6241 additions and 2270 deletions
10
android/parallaxmapping/.gitignore
vendored
Normal file
10
android/parallaxmapping/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/parallaxmapping/AndroidManifest.xml
Normal file
27
android/parallaxmapping/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanParallaxmapping"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanParallaxmapping" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Parallax mapping"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanParallaxmapping" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
24
android/parallaxmapping/build.bat
Normal file
24
android/parallaxmapping/build.bat
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\parallax"
|
||||
xcopy "..\..\data\shaders\parallax\*.spv" "assets\shaders\parallax" /Y
|
||||
|
||||
mkdir "assets\textures"
|
||||
xcopy "..\..\data\textures\rocks_color_bc3.dds" "assets\textures" /Y
|
||||
xcopy "..\..\data\textures\rocks_normal_height_rgba.dds" "assets\textures" /Y
|
||||
|
||||
mkdir "assets\models"
|
||||
xcopy "..\..\data\models\plane_z.obj" "assets\models" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanParallaxmapping.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/parallaxmapping/jni/Android.mk
Normal file
47
android/parallaxmapping/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../parallaxmapping
|
||||
|
||||
# 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 := vulkanParallaxmapping
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../parallaxmapping/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/parallaxmapping/jni/Application.mk
Normal file
5
android/parallaxmapping/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
10
android/pipelines/.gitignore
vendored
Normal file
10
android/pipelines/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/pipelines/AndroidManifest.xml
Normal file
27
android/pipelines/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanPipelines"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanPipelines" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Pipelines"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanPipelines" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
20
android/pipelines/build.bat
Normal file
20
android/pipelines/build.bat
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\pipelines"
|
||||
xcopy "..\..\data\shaders\pipelines\*.spv" "assets\shaders\pipelines" /Y
|
||||
|
||||
mkdir "assets\textures"
|
||||
xcopy "..\..\data\textures\crate_bc3.ktx" "assets\textures" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanPipelines.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/pipelines/jni/Android.mk
Normal file
47
android/pipelines/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../pipelines
|
||||
|
||||
# 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 := vulkanPipelines
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../pipelines/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/pipelines/jni/Application.mk
Normal file
5
android/pipelines/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
10
android/pushconstants/.gitignore
vendored
Normal file
10
android/pushconstants/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/pushconstants/AndroidManifest.xml
Normal file
27
android/pushconstants/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanPushconstants"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanPushconstants" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Push Constants"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanPushconstants" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
20
android/pushconstants/build.bat
Normal file
20
android/pushconstants/build.bat
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\pushconstants"
|
||||
xcopy "..\..\data\shaders\pushconstants\*.spv" "assets\shaders\pushconstants" /Y
|
||||
|
||||
mkdir "assets\models"
|
||||
xcopy "..\..\data\models\samplescene.obj" "assets\models" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanPushconstants.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/pushconstants/jni/Android.mk
Normal file
47
android/pushconstants/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../pushconstants
|
||||
|
||||
# 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 := vulkanPushconstants
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../pushconstants/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/pushconstants/jni/Application.mk
Normal file
5
android/pushconstants/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
10
android/radialblur/.gitignore
vendored
Normal file
10
android/radialblur/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/radialblur/AndroidManifest.xml
Normal file
27
android/radialblur/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanRadialblur"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanRadialblur" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Radial Blur"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanRadialblur" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
20
android/radialblur/build.bat
Normal file
20
android/radialblur/build.bat
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\radialblur"
|
||||
xcopy "..\..\data\shaders\radialblur\*.spv" "assets\shaders\radialblur" /Y
|
||||
|
||||
mkdir "assets\models"
|
||||
xcopy "..\..\data\models\glowsphere.dae" "assets\models" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanRadialblur.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/radialblur/jni/Android.mk
Normal file
47
android/radialblur/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../radialblur
|
||||
|
||||
# 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 := vulkanRadialblur
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../radialblur/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/radialblur/jni/Application.mk
Normal file
5
android/radialblur/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
10
android/skeletalanimation/.gitignore
vendored
Normal file
10
android/skeletalanimation/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/skeletalanimation/AndroidManifest.xml
Normal file
27
android/skeletalanimation/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanSkeletalanimation"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanSkeletalanimation" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Skeletal Animation"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanSkeletalanimation" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
20
android/skeletalanimation/build.bat
Normal file
20
android/skeletalanimation/build.bat
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\skeletalanimation"
|
||||
xcopy "..\..\data\shaders\skeletalanimation\*.spv" "assets\shaders\skeletalanimation" /Y
|
||||
|
||||
mkdir "assets\models\astroboy"
|
||||
xcopy "..\..\data\models\astroboy\*.*" "assets\models\astroboy" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanSkeletalanimation.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/skeletalanimation/jni/Android.mk
Normal file
47
android/skeletalanimation/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../skeletalanimation
|
||||
|
||||
# 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 := vulkanSkeletalanimation
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../skeletalanimation/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/skeletalanimation/jni/Application.mk
Normal file
5
android/skeletalanimation/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
10
android/tessellation/.gitignore
vendored
Normal file
10
android/tessellation/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/assets/
|
||||
/res/
|
||||
/bin/
|
||||
/libs/
|
||||
/obj/
|
||||
/build.xml
|
||||
/local.properties
|
||||
/project.properties
|
||||
/proguard-project.txt
|
||||
*.apk
|
||||
27
android/tessellation/AndroidManifest.xml
Normal file
27
android/tessellation/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanTessellation"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback" android:required="false"/>
|
||||
|
||||
<application android:label="vulkanTessellation" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Tessellation"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="vulkanTessellation" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
23
android/tessellation/build.bat
Normal file
23
android/tessellation/build.bat
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo ndk-build has failed, build cancelled
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\tessellation"
|
||||
xcopy "..\..\data\shaders\tessellation\*.spv" "assets\shaders\tessellation" /Y
|
||||
|
||||
mkdir "assets\textures"
|
||||
xcopy "..\..\data\textures\bearmug.ktx" "assets\textures" /Y
|
||||
|
||||
mkdir "assets\models\lowpoly"
|
||||
xcopy "..\..\data\models\lowpoly\bearmug.dae" "assets\models\lowpoly" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanTessellation.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
47
android/tessellation/jni/Android.mk
Normal file
47
android/tessellation/jni/Android.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../tessellation
|
||||
|
||||
# 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 := vulkanTessellation
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../tessellation/*.cpp)
|
||||
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../base/*.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)/../../base/
|
||||
#LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../base/android
|
||||
|
||||
LOCAL_SRC_FILES := $(PROJECT_FILES)
|
||||
|
||||
LOCAL_LDLIBS := -landroid -llog -lz
|
||||
|
||||
LOCAL_DISABLE_FORMAT_STRING_CHECKS := 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)
|
||||
5
android/tessellation/jni/Application.mk
Normal file
5
android/tessellation/jni/Application.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
Loading…
Add table
Add a link
Reference in a new issue