mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
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
33 lines
713 B
C++
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;
|
|
};
|
|
|
|
}
|