Updated android example to reduce number of files

This commit is contained in:
Alejandro Saucedo 2020-10-03 16:12:17 +01:00
parent aa8a138d94
commit 0d3cb7787f
3 changed files with 3 additions and 15 deletions

View file

@ -19,12 +19,8 @@ include_directories(
${VK_ANDROID_COMMON_DIR}
${VK_ANDROID_INCLUDE_DIR}
../../../../../../../single_include/
../../../../../../../vulkan_ndk_patch_include/)
../../../../../../../vk_ndk_wrapper_include/)
# TODO: Explore:
# * -DVK_NO_PROTOTYPES
# * -DUSE_DEBUG_EXTENTIONS
# * -Wno-unused-variable
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 \
-DVK_USE_PLATFORM_ANDROID_KHR=1 -DKOMPUTE_DISABLE_VK_DEBUG_LAYERS=1")
@ -35,5 +31,5 @@ target_link_libraries(kompute_android
kompute
app-glue
log
android_vulkan_wrapper
kompute_vk_ndk_wrapper
android)

View file

@ -34,14 +34,6 @@ static const char* kTAG = "Vulkan-Tutorial01";
#define LOGE(...) \
((void)__android_log_print(ANDROID_LOG_ERROR, kTAG, __VA_ARGS__))
// Vulkan call wrapper
#define CALL_VK(func) \
if (VK_SUCCESS != (func)) { \
__android_log_print(ANDROID_LOG_ERROR, "Tutorial ", \
"Vulkan error. File[%s], line[%d]", __FILE__, \
__LINE__); \
assert(false); \
}
// We will call this function the window is opened.
// This is where we will initialise everything

View file

@ -11,7 +11,7 @@
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include <android/log.h>
#include <android_native_app_glue.h>
#include <kompute_vulkan_wrapper.hpp>
#include <kompute_vk_ndk_wrapper.hpp>
// VK_NO_PROTOTYPES required before vulkan import but after wrapper.hpp
#undef VK_NO_PROTOTYPES