lsfg-vk/framegen/include/vk/core/commandpool.hpp
PancakeTAS 7137310e53
refactor: remove default constructors
not sure if this is a good idea, but seeing how I've messed up vector allocations in the past, this might prevent bugs from happening
2025-09-10 17:53:42 +02:00

33 lines
713 B
C++

#pragma once
#include "vk/core/device.hpp"
#include <vulkan/vulkan_core.h>
#include <memory>
namespace VK::Core {
///
/// C++ wrapper class for a Vulkan command pool.
///
/// This class manages the lifetime of a Vulkan command pool.
///
class CommandPool {
public:
///
/// Create the command pool.
///
/// @param device Vulkan device
///
/// @throws VK::vulkan_error if object creation fails.
///
CommandPool(const Device& device);
/// Get the Vulkan handle.
[[nodiscard]] auto handle() const { return *this->commandPool; }
private:
std::shared_ptr<VkCommandPool> commandPool;
};
}