mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-26 22:00:08 +00:00
112 lines
3.1 KiB
C++
112 lines
3.1 KiB
C++
#ifndef VULKAN_HPP
|
|
#define VULKAN_HPP
|
|
|
|
#if defined( _MSVC_LANG )
|
|
# define VULKAN_HPP_CPLUSPLUS _MSVC_LANG
|
|
#else
|
|
# define VULKAN_HPP_CPLUSPLUS __cplusplus
|
|
#endif
|
|
|
|
#if 201703L < VULKAN_HPP_CPLUSPLUS
|
|
# define VULKAN_HPP_CPP_VERSION 20
|
|
#elif 201402L < VULKAN_HPP_CPLUSPLUS
|
|
# define VULKAN_HPP_CPP_VERSION 17
|
|
#elif 201103L < VULKAN_HPP_CPLUSPLUS
|
|
# define VULKAN_HPP_CPP_VERSION 14
|
|
#elif 199711L < VULKAN_HPP_CPLUSPLUS
|
|
# define VULKAN_HPP_CPP_VERSION 11
|
|
#else
|
|
# error "vulkan.hpp needs at least c++ standard version 11"
|
|
#endif
|
|
|
|
#include <array> // ArrayWrapperND
|
|
#include <string> // std::string
|
|
#include <vulkan/vulkan.h>
|
|
#if 17 <= VULKAN_HPP_CPP_VERSION
|
|
# include <string_view> // std::string_view
|
|
#endif
|
|
|
|
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
|
# if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
|
# define VULKAN_HPP_NO_SMART_HANDLE
|
|
# endif
|
|
#else
|
|
# include <tuple> // std::tie
|
|
# include <vector> // std::vector
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_NO_EXCEPTIONS )
|
|
# include <system_error> // std::is_error_code_enum
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
|
# include <algorithm> // std::transform
|
|
#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 <cassert>
|
|
# define VULKAN_HPP_ASSERT assert
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_ASSERT_ON_RESULT )
|
|
# define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_STATIC_ASSERT )
|
|
# define VULKAN_HPP_STATIC_ASSERT static_assert
|
|
#endif
|
|
|
|
#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( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined(__Fuchsia__)
|
|
# include <dlfcn.h>
|
|
# elif defined( _WIN32 )
|
|
typedef struct HINSTANCE__ * HINSTANCE;
|
|
# if defined( _WIN64 )
|
|
typedef int64_t( __stdcall * FARPROC )();
|
|
# else
|
|
typedef int( __stdcall * FARPROC )();
|
|
# endif
|
|
extern "C" __declspec( dllimport ) HINSTANCE __stdcall LoadLibraryA( char const * lpLibFileName );
|
|
extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( HINSTANCE hLibModule );
|
|
extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE hModule, const char * lpProcName );
|
|
# endif
|
|
#endif
|
|
|
|
#if !defined( __has_include )
|
|
# define __has_include( x ) false
|
|
#endif
|
|
|
|
#if ( 201907 <= __cpp_lib_three_way_comparison ) && __has_include( <compare> ) && !defined( VULKAN_HPP_NO_SPACESHIP_OPERATOR )
|
|
# define VULKAN_HPP_HAS_SPACESHIP_OPERATOR
|
|
#endif
|
|
#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
|
|
# include <compare>
|
|
#endif
|
|
|
|
#if ( 201803 <= __cpp_lib_span )
|
|
# define VULKAN_HPP_SUPPORT_SPAN
|
|
# include <span>
|
|
#endif
|