diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 4a35020..65e4fc8 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -9190,10 +9190,12 @@ void VulkanHppGenerator::appendStructure( std::string & if ( !structure.second.returnedOnly ) { // only structs that are not returnedOnly get setters! + constructorAndSetters += "\n#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )"; for ( size_t i = 0; i < structure.second.members.size(); i++ ) { appendStructSetter( constructorAndSetters, stripPrefix( structure.first, "Vk" ), structure.second.members, i ); } + constructorAndSetters += "#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/\n"; } // operator==() and operator!=() @@ -9427,8 +9429,8 @@ void VulkanHppGenerator::appendUnion( std::string & str, std::pair( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::" + @@ -9470,12 +9472,15 @@ void VulkanHppGenerator::appendUnion( std::string & str, std::pair #endif +#if defined( VULKAN_HPP_NO_CONSTRUCTORS ) +# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) +# define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS +# endif +# if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) +# define VULKAN_HPP_NO_UNION_CONSTRUCTORS +# endif +#endif + +#if defined( VULKAN_HPP_NO_SETTERS ) +# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) +# define VULKAN_HPP_NO_STRUCT_SETTERS +# endif +# if !defined( VULKAN_HPP_NO_UNION_SETTERS ) +# define VULKAN_HPP_NO_UNION_SETTERS +# endif +#endif + #if !defined( VULKAN_HPP_ASSERT ) # include # define VULKAN_HPP_ASSERT assert