Commit Graph

269 Commits

Author SHA1 Message Date
Markus Tavenrath
a31b910628 Fix gcc/clang includes and warnings 2016-07-26 16:16:45 +02:00
jeaye
6740df4faf Change readme example to catch std::exception (#4)
There are two reasons for this change.

1) The C++ mantra "throw by value, catch by reference" still applies,
even when you're only specifically throwing std::system_error at this
time
2) Vulkan-Hpp is using C++ stdlib containers, such as std::string and
std::vector, which have their own exception specifications to consider.
The example provided may throw various exceptions, all of which derive
from std::exception, and many will not be std::system_error.

This is a serious issue in the readme simply because that snippet of
code will be the copy/pasted foundation of many projects which adopt
Vulkan-Hpp. We might as well try to avoid some common pitfalls of
exception handling.
2016-07-25 20:40:22 +02:00
Markus Tavenrath
e1703832d8 Merge pull request #8 from mtavenrath/operator_equal
Introduce operator== and operator!=() on structs
2016-07-25 20:34:45 +02:00
Andreas Süßenbach
54eab5414c Introduce operator== and operator!=() on structs 2016-07-25 20:31:10 +02:00
Markus Tavenrath
5c5a00110e Merge pull request #7 from asuessenbach/extentArrayProxy
Add member functions begin(), end(), front(), back(), and empty() to vk::ArrayProxy to make it a better container.
2016-07-25 10:30:40 +02:00
Andreas Süßenbach
c0fb89411e Add member functions begin(), end(), front(), back(), and empty() to vk::ArrayProxy to make it a better container. 2016-07-25 06:04:56 +02:00
Markus Tavenrath
65a7d2f644 Update to Vulkan 1.0.17, Switch to Apache 2.0 license 2016-07-14 10:29:16 +02:00
Markus Tavenrath
28890d7bc4 Merge pull request #2 from asuessenbach/SingularFunctions
Added singular version of some functions.

For functions that would return a vector of stuff, where the number of stuff is determined by the size of an input array, a singular version is introduced returning just on stuff.
2016-06-30 09:17:14 +02:00
Andreas Süßenbach
be9beb84ac Added singular version of some functions
For functions that would return a vector of stuff, a singular version is introduced returning just on stuff.
Currently, that's just createGraphicsPipeline, createComputePipeline, and createSharedSwapchainKHR.
2016-06-22 14:06:14 +02:00
Markus Tavenrath
8e66e869df Merge pull request #1 from asuessenbach/RenameToVulkanHpp
Renamed from VkCpp to VulkanHpp
2016-06-21 13:35:24 +02:00
Andreas Süßenbach
d2aea04b6c Renamed from VkCpp to VulkanHpp 2016-06-21 10:35:47 +02:00
Markus Tavenrath
3b96c38a41 Merge pull request #123 from asuessenbach/DefaultOnEmptyFlagAsLastArgument
Introduced default for last argument of functions when that argument is a Flag whose corresponding FlagBits has no values.

Currently, it's just Device::mapMemory() and Device::resetDescriptorPool()
2016-06-20 22:34:55 +02:00
Andreas Süßenbach
400c51216f Introduced default for last argument of functions when that argument is a Flag whose corresponding FlagBits has no values.
Currently, it's just Device::mapMemory() and Device::resetDescriptorPool()
2016-06-20 11:15:07 +02:00
Markus Tavenrath
3c045ecaa7 Merge pull request #122 from asuessenbach/Version13
Update to Version 1.0.13
2016-06-17 01:55:30 +02:00
Andreas Süßenbach
9aadad05c0 Update to Version 1.0.13 2016-06-16 16:30:27 +02:00
Markus Tavenrath
af6d55398d Merge pull request #121 from asuessenbach/PrivateSType
Made StructureType sType private, as nobody should need to access that.
2016-06-16 03:00:15 +02:00
Markus Tavenrath
cf0f082f36 Merge pull request #120 from asuessenbach/ConstructorWithDefaults
Changed from two constructors for structures to just one with some default for each element
2016-06-16 02:59:33 +02:00
Andreas Süßenbach
c27468dc4e Changed from two constructors for structures to just one with some default for each element 2016-06-15 17:50:06 +02:00
Andreas Süßenbach
6056e66a77 Made StructureType sType private, as nobody should need to access that. 2016-06-15 15:22:09 +02:00
Markus Tavenrath
82841a9751 Add reference to Sascha Willems samples port from Brad Davis. 2016-06-07 08:04:07 +02:00
Markus Tavenrath
73a3833628 Merge pull request #110 from asuessenbach/DataResult
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 15:14:54 +02:00
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
Markus Tavenrath
4bf660700d Merge pull request #108 from asuessenbach/Allocator
Added allocator as template argument for functions returning an std::vector.
2016-05-12 12:05:44 +02:00
Andreas Süßenbach
dc0354bdc6 Extended functions returning a std::vector to get the allocator for that vector as a template argument. 2016-05-11 18:08:46 +02:00
Markus Tavenrath
954bc6a34e Merge pull request #107 from asuessenbach/FixOptional
Added nullptr_t-constructor to ArrayProxy, simplifying handling of empty arrays.
2016-05-11 14:24:25 +02:00
Andreas Süßenbach
9fe6b2384e Added nullptr_t-constructor to ArrayProxy, simplifying handling of empty arrays. 2016-05-11 11:07:04 +02:00
Markus Tavenrath
9c55803341 Merge pull request #106 from asuessenbach/DirectAccess
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-10 16:14:33 +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
Markus Tavenrath
59416fdffa Merge pull request #105 from asuessenbach/ArrayProxy
Introduce helper class vk::ArrayProxy.

replaces std::vector and std::initializers_list replacements of pairs of (count, [const] T*) in the enhanced interface, resulting in fewer function overloads.
has constructors for T, (count, [const] T*), std::array<[const]T,N>, std::vector<[const]T], and std::initializer_list.
2016-05-06 10:43:05 +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
ecb56f0632 Merge pull request #104 from asuessenbach/misc
some adjustments:

to_string of empty enums return "(void)", instead of empty string
to_string of undefined enum value return "invalid", instead of "unknown"
to_string of Flags of empty Enums or Flags with no bit set return "{}", instead of empty string
to_string of Flags embraces the flags with "{", "}"
all typedefs are replaced with using expressions
2016-05-02 17:25:31 +02:00
Andreas Süßenbach
4b9e1ae57e some adjustments:
- to_string of empty enums return "(void)", instead of empty string
- to_string of undefined enum value return "invalid", instead of "unknown"
- to_string of Flags of empty Enums or Flags with no bit set return "{}", instead of empty string
- to_string of Flags embraces the flags with "{", "}"
- all typedefs are replaced with using expressions
2016-05-02 15:27:38 +02:00
Markus Tavenrath
d5946f1f81 Merge pull request #103 from asuessenbach/version_1_0_11
Update to Version 1.0.11: extended writeExceptionCheck to support an arbitrary number of successCodes.
2016-05-02 14:41:13 +02:00
Andreas Süßenbach
3ba0905e26 Update to Version 1.0.11: extended writeExceptionCheck to support an arbitrary number of successCodes. 2016-04-29 15:24:27 +02:00
Markus Tavenrath
8b4b35dc09 Merge pull request #100 from asuessenbach/initializer_list
Added overload of enhanced functions using std::initializer_list inst…
2016-04-14 10:44:02 +02:00
Andreas Süßenbach
c5bcc9410c Added overload of enhanced functions using std::initializer_list instead of std::vector 2016-04-13 13:52:09 +02:00
asuessenbach
29e7f3ae6b Merge pull request #99 from mtavenrath/usability
Improve usability
2016-04-12 13:43:17 +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
asuessenbach
8f8148bfd2 Merge pull request #98 from mtavenrath/Vulkan_Docs
Add external Vulkan-Docs to get vk.xml
2016-04-12 10:42:22 +02:00
Markus Tavenrath
df1b8eb615 Add external Vulkan-Docs to get vk.xml 2016-04-12 09:32:09 +02:00
Markus Tavenrath
cdd70520bc Merge pull request #97 from asuessenbach/version_check
Updated version check to new VK_HEADER_VERSION, incompatible with ver…
2016-04-11 15:59:25 +02:00
Markus Tavenrath
757d3b7aed Merge pull request #96 from asuessenbach/singular_fix
changed enhanced version of CommandBuffer::pushConstants to be templa…
2016-04-11 15:57:35 +02:00
Andreas Süßenbach
976a980afa Updated version check to new VK_HEADER_VERSION, incompatible with version 1.0.5 and before 2016-04-11 14:14:26 +02:00
Andreas Süßenbach
4d67b6d1a5 changed enhanced version of CommandBuffer::pushConstants to be templated by value type, corrected CommandBuffer::pushConstant to be templated by value type as well 2016-04-11 11:30:23 +02:00
Markus Tavenrath
ab89b93948 Merge pull request #93 from asuessenbach/singular
Introduced version of functions handling singular element arguments i…
2016-04-05 22:24:19 -07:00
Markus Tavenrath
a287b6db68 Merge pull request #92 from asuessenbach/enumTag
Remove extension tag from extension enum values
2016-04-05 22:22:41 -07:00
Andreas Süßenbach
6a8d520ffc Introduced version of functions handling singular element arguments instead of a std::vector arguments 2016-04-01 13:45:20 +02:00
Andreas Süßenbach
9361a735ee Remove extension tag from extension enum values 2016-04-01 10:47:10 +02:00
Markus Tavenrath
eb135c594d Merge pull request #91 from asuessenbach/lastOptionalDefault
Added default argument value nullptr for last Optional arguments
made vk::Flags::operator bool() explicit
changed vk::Flags default MaskType from uint32_t to VKFlags
removed some unneeded "vk::"
2016-03-31 08:27:45 -07:00
Andreas Süßenbach
a69a47e00e Added default argument value nullptr for last Optional arguments
+ made vk::Flags::operator bool() explicit
+ changed vk::Flags default MaskType from uint32_t to VKFlags
+ removed some unneeded "vk::"
2016-03-31 12:08:15 +02:00