Commit Graph

114 Commits

Author SHA1 Message Date
Andreas Süßenbach
b81f8ec376 Introduced define VK_CPP_NO_EXCEPTIONS, to support calling vk-functions without throwing exceptions on error conditions. Now, depending on that define, some functions can return a struct containing the vk::Result and some generated value. 2016-05-19 11:33:52 +02:00
Andreas Süßenbach
847b2eebd1 Changed struct/union wrappers from class to struct/union, directly containing the members of the native struct/union
- no accessor functions to those members any more, but just direct access to them available;
- modified "named parameter idiom" to use setter-functions with the prefix "set", continuing with an uppercase letter;
- If the C++11 feature "unrestricted unions" is not supported, unions may hold the native vulkan datatypes, instead of those from the vk-namespace (in fact, it's just the vk::ClearValue that needs handling here). For clang, gcc, and MSVC compiler, the support of/version supporting this feature is checked; for other compilers, you need to check on your own and define VK_CPP_HAS_UNRESTRICTED_UNIONS if appropriate.
2016-05-09 15:26:12 +02:00
Andreas Süßenbach
2c259237dc Introduce helper class vk::ArrayProxy.
- replaces pairs of (count, [const] T*) in the enhanced interface
- has constructor for single T, (count, [const] T*), std::array<[const]T,N>, std::vector<[const]T], and std::initializer_list<const T>.
2016-05-04 16:12:25 +02:00
Markus Tavenrath
3359b16c39 Improve usability
- Enable enhanced mode by default, use VKCPP_DISABLE_ENHANCED_MODE to disable it
- Rename vk_cpp.h to vk_cpp.hpp to be more standard-conform with regards to naming
- Automatically use vk.xml from submodule if no other file has be specified
- Generate header in vulkand folder to avoid copying the file after generating it
- Catch exceptions in generator
2016-04-12 12:19:52 +02:00
Andreas Süßenbach
54fced9dd3 changed functions with optional std::string parameters from "std::string const &" to "vk::Optional<std::string const> const &";
moved vk::Optional constructor on std::nullptr_t from private to public;
introduced vk::Optional::operator->() and explicit operator bool();
removed static operator null() on all struct-wrapper classes
2016-03-23 16:08:30 +01:00
Markus Tavenrath
eb1c207fa7 Fix issue 68, introduce vk::Optional class which to support optional references 2016-03-15 17:52:19 +01:00
Andreas Süßenbach
06649553bd Added missing </code> in README.md 2016-03-07 09:12:58 +01:00
Andreas Süßenbach
73e20c47d4 Moved vulkan functions into the wrapper class of its first handle argument, adjusted name and argument list 2016-03-02 10:01:52 +01:00
Markus Tavenrath
9c6888edf3 Fix issue #34, provide null() references for structs 2016-02-26 11:42:15 +01:00
Markus Tavenrath
66627474fe Add copy constructors, assignment operators and cast operators to go forth and back between vkcpp and native vulkan structs and handles. 2016-02-25 17:58:29 +01:00
Markus Tavenrath
fab1131447 Update README.md with tiny code samples on how to use the new C++ objects 2016-02-24 13:45:21 +01:00
Markus Tavenrath
be14a994fb Add getString(VkEnum)/getString(VKFlags) support 2016-02-18 13:55:42 +01:00
Markus Tavenrath
cd12306797 switch to TinyXML2 which is being fetches as submodule 2016-02-17 15:35:00 +01:00
Markus Tavenrath
0b8dfc3968 Initial revision for Vulkan 1.0 2016-02-16 15:07:55 +01:00