Skip to content

Commit

Permalink
Fix Android builds
Browse files Browse the repository at this point in the history
Recent changes to ktx integration were missing
Fixes #1168
  • Loading branch information
SaschaWillems committed Nov 22, 2024
1 parent d184cf6 commit 2871b76
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions android/examples/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(KTX_SOURCES
${KTX_DIR}/lib/swap.c
${KTX_DIR}/lib/memstream.c
${KTX_DIR}/lib/filestream.c
${KTX_DIR}/lib/vkloader.c
)
set(KTX_INCLUDE
${KTX_DIR}/include
Expand Down
Binary file removed android/examples/base/liblibktx.a
Binary file not shown.
6 changes: 5 additions & 1 deletion base/VulkanAndroid.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Android Vulkan function pointer loader
*
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -142,6 +142,8 @@ PFN_vkQueuePresentKHR vkQueuePresentKHR;

PFN_vkResetCommandBuffer vkResetCommandBuffer;

PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties;

int32_t vks::android::screenDensity;

void *libVulkan;
Expand Down Expand Up @@ -325,6 +327,8 @@ namespace vks
vkQueuePresentKHR = reinterpret_cast<PFN_vkQueuePresentKHR>(vkGetInstanceProcAddr(instance, "vkQueuePresentKHR"));

vkResetCommandBuffer = reinterpret_cast<PFN_vkResetCommandBuffer>(vkGetInstanceProcAddr(instance, "vkResetCommandBuffer"));

vkGetPhysicalDeviceImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties"));
}

void freeVulkanLibrary()
Expand Down
4 changes: 3 additions & 1 deletion base/VulkanAndroid.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Android Vulkan function pointer prototypes
*
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -176,6 +176,8 @@ extern PFN_vkQueuePresentKHR vkQueuePresentKHR;

extern PFN_vkResetCommandBuffer vkResetCommandBuffer;

extern PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties;

namespace vks
{
namespace android
Expand Down

0 comments on commit 2871b76

Please sign in to comment.