Allocate command buffers from pools
This commit is contained in:
@@ -9,19 +9,36 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class CommandBuffer;
|
||||
class CommandBufferDeleter;
|
||||
|
||||
using CommandBufferPtr = std::unique_ptr<CommandBuffer, CommandBufferDeleter>;
|
||||
|
||||
class NAZARA_RENDERER_API CommandBuffer
|
||||
{
|
||||
friend CommandBufferDeleter;
|
||||
|
||||
public:
|
||||
CommandBuffer() = default;
|
||||
CommandBuffer(const CommandBuffer&) = delete;
|
||||
CommandBuffer(CommandBuffer&&) = default;
|
||||
CommandBuffer(CommandBuffer&&) = delete;
|
||||
virtual ~CommandBuffer();
|
||||
|
||||
CommandBuffer& operator=(const CommandBuffer&) = delete;
|
||||
CommandBuffer& operator=(CommandBuffer&&) = default;
|
||||
CommandBuffer& operator=(CommandBuffer&&) = delete;
|
||||
|
||||
protected:
|
||||
virtual void Release() = 0;
|
||||
};
|
||||
|
||||
class CommandBufferDeleter
|
||||
{
|
||||
public:
|
||||
inline void operator()(CommandBuffer* commandBuffer);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user