diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 068808b..e5d1e5e 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1040,10 +1040,6 @@ 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 { @@ -5127,9 +5123,20 @@ static const std::string constExpressionArrayCopy = R"( # define VULKAN_HPP_ASSERT assert #endif -#if defined(__linux__) || defined(__APPLE__) -# include +#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL) +# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 #endif + +#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 +# if defined(__linux__) || defined(__APPLE__) +# include +# endif + +# if defined(_WIN32) +# include +# endif +#endif + )"; static const std::string is_error_code_enum = R"( diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 2781d06..566a7a7 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -56,8 +56,18 @@ # define VULKAN_HPP_ASSERT assert #endif -#if defined(__linux__) || defined(__APPLE__) -# include +#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL) +# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 +#endif + +#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 +# if defined(__linux__) || defined(__APPLE__) +# include +# endif + +# if defined(_WIN32) +# include +# endif #endif static_assert( VK_HEADER_VERSION == 126 , "Wrong VK_HEADER_VERSION!" ); @@ -66834,10 +66844,6 @@ 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 {