Vulkan-Hpp generator fork
The fork introduces a few configuration options in order to simplify generator usage in cases where inputs other that vulkan specs are used.
All the options are designed as preprocessor macros. It's recommended to set them using your preferred build system for the whole project.
INPUT_FILENAME
: the path to the input file.- Default value:
VK_SPEC
, if it's defined,"vk.xml"
otherwise.
- Default value:
OUTPUT_FILENAME
: the path to the output file.- Default value:
VULKAN_HPP_FILE
, if it's defined,"vulkan.hpp"
otherwise.
- Default value:
INCLUDED_FILENAME
: the include location of the file the bindings are designed for.- The value of the macro results in a line similar to
#include INCLUDED_FILENAME
near the top of an output file, for example#include "vulkan/vulkan.h"
. - This is only applicable if
INCLUDED_BINDINGS
is not defined. If there are manual bindings, they are responsible for including any dependencies needed. - Default value:
"vulkan/vulkan.h"
.
- The value of the macro results in a line similar to
INCLUDED_BINDINGS
: the path to a file to be included near the top of an output file.- Optional. If it is defined and specified file exists, the contents of the file is copied into the output file as is, without any additional processing.
COMMAND_PREFIX
: the command (function) prefix used in the API the bindings are designed for.- Default value:
"vk"
(e. g. every command (function) is expected to be namedvk*
.
- Default value:
MACRO_PREFIX
: the macro prefix used in the API the bindings are designed for.- Default value:
"VK"
(e. g. every macro is expected to be namedVK_*
.
- Default value:
STRUCT_PREFIX
: the struct prefix used in the API the bindings are designed for.- Default value:
"Vk"
(e. g. every struct is expected to be namedVk*
.
- Default value:
CUSTOM_ENUM_PREFIX
: the enum prefix used in the API the bindings are designed for.- Default value:
MACRO_PREFIX
(e. g. every enum is expected to be namedVK_*
.
- Default value:
CUSTOM_RESULT_ENUM_PREFIX
: the prefix used for a specialResult
enum values.- Default value:
CUSTOM_ENUM_PREFIX
(e. g. every enum is expected to be namedVK_*
.
- Default value:
DEFAULT_NAMESPACE
: the default namespace name.- Default value:
"vk"
. - This can later be changed by defining
#define HEADER_MACRO "_NAMESPACE"
before including the output header, see here.
- Default value:
INSTANCE_HANDLE_NAME
: the name of the 'root' object of the API, an object responcible for creation/deletion of any other object.- Default value:
Instance
. - Notice:
STRUCT_PREFIX
is included automatically, soInstance
becomesVkInstance
in default configuration.
- Default value:
SPEC_API_NAME
: the name corresponding toapi
attribute of thefeature
tag of the inputxml
file.- Default value:
"vulkan"
.
- Default value:
HEADER_NAME
: human readable output header name, used for error messages etc.- Default value:
"vulkan.hpp"
.
- Default value:
HEADER_MACRO
: the prefix for all the configuration macros defined by the header.- Default value:
"VULKAN_HPP"
, available configuration macros are described here.
- Default value:
NO_DISPATCH
: removes everything related to dynamic function loading and dispatch from the output header.NO_ALLOCATION_CALLBACKS
: removes everything related to allocation callback command parameter automation from the output header.NO_VERSION_CHECK
: removes explicit header version check from the output header.- Version check is, essentially, a single line of code equivalent to
static_assert( MACRO_PREFIX "_HEADER_VERSION" == VERSION, "Wrong header version!);
- Version check is, essentially, a single line of code equivalent to
NO_STRUCTURE_CHAIN
: removes everything related to vulkan structure chaining from the output header.NO_OBJECT_TYPE_ENUM
: removesObjectType
enumeration and everything related to it from the output header.NO_DEBUG_REPORT_OBJECT_TYPE_ENUM
: removesDebugReportObjectType
enumeration and everything related to it from the output header.NO_STRUCTURE_TYPE_ENUM
: removesStructureType
enumeration and everything related to it from the output header.NO_INDEX_TYPE_TRAITS
: removes index type traits from the output header.ENABLE_OBJECT_END_DELETER
: enables commands namedCOMMAND_PREFIX "End*"
to be parsed similarly toCOMMAND_PREFIX "Free*"
.- Warning: this option breaks compilation of vulkan spec as commads like
vkEndCommandBuffer
are not intended to be processed in this way.
- Warning: this option breaks compilation of vulkan spec as commads like