DescriptorSet related wrappers.
This commit is contained in:
48
src/vk/Wrapper.cpp
Normal file
48
src/vk/Wrapper.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright 2022 Simon Boyé
|
||||
|
||||
#include <vk/Wrapper.h>
|
||||
#include <vk/Context.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
||||
namespace vk {
|
||||
|
||||
|
||||
Wrapper::Wrapper() noexcept {
|
||||
}
|
||||
|
||||
Wrapper::Wrapper(Context& context, Flags flags) noexcept
|
||||
: m_context(&context)
|
||||
, m_flags(flags)
|
||||
{
|
||||
assert(m_context);
|
||||
}
|
||||
|
||||
Wrapper::Wrapper(const Wrapper& other) noexcept
|
||||
: m_context(other.m_context)
|
||||
{}
|
||||
|
||||
Wrapper::Wrapper(Wrapper&& other) noexcept
|
||||
{
|
||||
swap(other);
|
||||
}
|
||||
|
||||
Wrapper::~Wrapper() noexcept {
|
||||
}
|
||||
|
||||
|
||||
Wrapper& Wrapper::operator=(const Wrapper& other) noexcept {
|
||||
if (&other != this) {
|
||||
m_context = other.m_context;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Wrapper& Wrapper::operator=(Wrapper&& other) noexcept {
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user