diff --git a/snippets/defines.hpp b/snippets/defines.hpp index 276272d..b680d1e 100644 --- a/snippets/defines.hpp +++ b/snippets/defines.hpp @@ -14,6 +14,17 @@ # undef MemoryBarrier #endif +// XLib.h defines True/False, which collides with our vk::True/vk::False +// -> undef them and provide some namepace-secure constexpr +#if defined( True ) +# undef True +constexpr int True = 1; +#endif +#if defined( False ) +# undef False +constexpr int False = 0; +#endif + #if defined(__GNUC__) # define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) #endif diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 9272162..f0fd72b 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -140,6 +140,17 @@ static_assert( VK_HEADER_VERSION == 256, "Wrong VK_HEADER_VERSION!" ); # undef MemoryBarrier #endif +// XLib.h defines True/False, which collides with our vk::True/vk::False +// -> undef them and provide some namepace-secure constexpr +#if defined( True ) +# undef True +constexpr int True = 1; +#endif +#if defined( False ) +# undef False +constexpr int False = 0; +#endif + #if defined( __GNUC__ ) # define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) #endif