Vulkan: Add support for CommandPool and CommandBuffer
Former-commit-id: 0ed1e8d09300577be3d4c52b94d6a8f594178a8b
This commit is contained in:
50
include/Nazara/Vulkan/VkCommandBuffer.hpp
Normal file
50
include/Nazara/Vulkan/VkCommandBuffer.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (C) 2016 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Vulkan"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_VULKAN_VKCOMMANDBUFFER_HPP
|
||||
#define NAZARA_VULKAN_VKCOMMANDBUFFER_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Vulkan/VkCommandPool.hpp>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
namespace Vk
|
||||
{
|
||||
class NAZARA_VULKAN_API CommandBuffer
|
||||
{
|
||||
friend CommandPool;
|
||||
|
||||
public:
|
||||
CommandBuffer(const CommandBuffer&) = delete;
|
||||
CommandBuffer(CommandBuffer&& commandBuffer);
|
||||
inline ~CommandBuffer();
|
||||
|
||||
inline void Free();
|
||||
|
||||
inline VkResult GetLastErrorCode() const;
|
||||
|
||||
CommandBuffer& operator=(const CommandBuffer&) = delete;
|
||||
CommandBuffer& operator=(CommandBuffer&&) = delete;
|
||||
|
||||
inline operator VkCommandBuffer();
|
||||
|
||||
private:
|
||||
inline CommandBuffer(CommandPool& pool, VkCommandBuffer handle);
|
||||
|
||||
CommandPoolHandle m_pool;
|
||||
VkAllocationCallbacks m_allocator;
|
||||
VkCommandBuffer m_handle;
|
||||
VkResult m_lastErrorCode;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Vulkan/VkCommandBuffer.inl>
|
||||
|
||||
#endif // NAZARA_VULKAN_VKCOMMANDBUFFER_HPP
|
||||
Reference in New Issue
Block a user