From 89c9c91efd5d04485f1cad8edcfba2ddea2bd458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Tue, 1 Oct 2019 03:14:22 +0200 Subject: [PATCH] Add define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL to allow hiding the helper class vk::DynamicLoader. (#396) --- VulkanHppGenerator.cpp | 6 ++++++ vulkan/vulkan.hpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 3a7ca08..94f53f4 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1016,6 +1016,11 @@ void VulkanHppGenerator::appendCommand(std::string & str, std::string const& ind void VulkanHppGenerator::appendDispatchLoaderDynamic(std::string & str) { str += R"( +#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL) +# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 +#endif + +#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL class DynamicLoader { public: @@ -1073,6 +1078,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic(std::string & str) #error unsupported platform #endif }; +#endif )"; str += R"( diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 5e94879..5a69121 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -71556,6 +71556,11 @@ namespace VULKAN_HPP_NAMESPACE template <> struct isStructureChainValid{ enum { value = true }; }; template <> struct isStructureChainValid{ enum { value = true }; }; +#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL) +# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 +#endif + +#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL class DynamicLoader { public: @@ -71613,6 +71618,7 @@ namespace VULKAN_HPP_NAMESPACE #error unsupported platform #endif }; +#endif class DispatchLoaderDynamic {