-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathversion.cc
27 lines (23 loc) · 846 Bytes
/
version.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <vkpp/version.hh>
namespace vkpp {
Version::Version(const std::uint32_t major,
const std::uint32_t minor,
const std::uint32_t patch)
: major { major },
minor { minor },
patch { patch } { }
Version::Version(const std::uint32_t version) {
major = VK_VERSION_MAJOR(version);
minor = VK_VERSION_MINOR(version);
patch = VK_VERSION_PATCH(version);
}
Version::operator std::uint32_t() const {
return VK_MAKE_VERSION(major,
minor,
patch);
}
}
std::ostream& operator<<(std::ostream& stream, const vkpp::Version& version) {
stream << version.major << '.' << version.minor << '.' << version.patch;
return stream;
}