Added Android build files for dynamic uniform buffer example
This commit is contained in:
parent
6985eab017
commit
d89b45eaf2
8 changed files with 113 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ set(EXAMPLES
|
|||
deferredshadows
|
||||
displacement
|
||||
distancefieldfonts
|
||||
dynamicuniformbuffer
|
||||
gears
|
||||
geometryshader
|
||||
indirectdraw
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ call _build computeparticles %1
|
|||
call _build computenbody %1
|
||||
call _build computeshader %1
|
||||
call _build computecullandlod %1
|
||||
call _build dynamicuniformbuffer %1
|
||||
call _build parallaxmapping %1
|
||||
call _build bloom %1
|
||||
call _build gears %1
|
||||
|
|
|
|||
10
android/dynamicuniformbuffer/.gitignore
vendored
Normal file
10
android/dynamicuniformbuffer/.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/dynamicuniformbuffer/AndroidManifest.xml
Normal file
27
android/dynamicuniformbuffer/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.vulkanDynamicuniformbuffer"
|
||||
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="vulkanDynamicuniformbuffer" android:icon="@drawable/icon" android:hasCode="false">
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="Dynamic uniform buffers"
|
||||
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="vulkanDynamicuniformbuffer" />
|
||||
<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>
|
||||
19
android/dynamicuniformbuffer/build.bat
Normal file
19
android/dynamicuniformbuffer/build.bat
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
cd jni
|
||||
call ndk-build
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
cd..
|
||||
|
||||
mkdir "assets\shaders\base"
|
||||
xcopy "..\..\data\shaders\base\*.spv" "assets\shaders\base" /Y
|
||||
|
||||
mkdir "assets\shaders\dynamicuniformbuffer"
|
||||
xcopy "..\..\data\shaders\dynamicuniformbuffer\*.spv" "assets\shaders\dynamicuniformbuffer" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
||||
call ant debug -Dout.final.file=vulkanDynamicuniformbuffer.apk
|
||||
) ELSE (
|
||||
echo error : ndk-build failed with errors!
|
||||
cd..
|
||||
)
|
||||
48
android/dynamicuniformbuffer/jni/Android.mk
Normal file
48
android/dynamicuniformbuffer/jni/Android.mk
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../dynamicuniformbuffer
|
||||
|
||||
# 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 := vulkanDynamicuniformbuffer
|
||||
|
||||
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../dynamicuniformbuffer/*.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_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)
|
||||
6
android/dynamicuniformbuffer/jni/Application.mk
Normal file
6
android/dynamicuniformbuffer/jni/Application.mk
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
APP_PLATFORM := android-19
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -std=c++11
|
||||
APP_CPPFLAGS += -fexceptions
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
|
|
@ -9,6 +9,7 @@ adb uninstall de.saschawillems.vulkanGeometryshader
|
|||
adb uninstall de.saschawillems.vulkanComputeparticles
|
||||
adb uninstall de.saschawillems.vulkanComputenbody
|
||||
adb uninstall de.saschawillems.vulkanComputeshader
|
||||
adb uninstall de.saschawillems.vulkanDynamicuniformbuffer
|
||||
adb uninstall de.saschawillems.vulkanParallaxmapping
|
||||
adb uninstall de.saschawillems.vulkanBloom
|
||||
adb uninstall de.saschawillems.vulkanGears
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue