40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
// Copyright (C) 2020 Jérôme Leclercq
|
|
// This file is part of the "Nazara Engine - Renderer module"
|
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
|
|
|
#pragma once
|
|
|
|
#ifndef NAZARA_OPENGLRENDERER_OPENGLCOMMANDBUFFER_HPP
|
|
#define NAZARA_OPENGLRENDERER_OPENGLCOMMANDBUFFER_HPP
|
|
|
|
#include <Nazara/Prerequisites.hpp>
|
|
#include <Nazara/Renderer/CommandBuffer.hpp>
|
|
#include <Nazara/OpenGLRenderer/Config.hpp>
|
|
#include <Nazara/OpenGLRenderer/Wrapper/CommandBuffer.hpp>
|
|
#include <vector>
|
|
|
|
namespace Nz
|
|
{
|
|
class NAZARA_OPENGLRENDERER_API OpenGLCommandBuffer final : public CommandBuffer
|
|
{
|
|
public:
|
|
inline OpenGLCommandBuffer(Vk::AutoCommandBuffer commandBuffer);
|
|
inline OpenGLCommandBuffer(std::vector<Vk::AutoCommandBuffer> commandBuffers);
|
|
OpenGLCommandBuffer(const OpenGLCommandBuffer&) = delete;
|
|
OpenGLCommandBuffer(OpenGLCommandBuffer&&) noexcept = default;
|
|
~OpenGLCommandBuffer() = default;
|
|
|
|
inline Vk::CommandBuffer& GetCommandBuffer(std::size_t imageIndex = 0);
|
|
|
|
OpenGLCommandBuffer& operator=(const OpenGLCommandBuffer&) = delete;
|
|
OpenGLCommandBuffer& operator=(OpenGLCommandBuffer&&) = delete;
|
|
|
|
private:
|
|
std::vector<Vk::AutoCommandBuffer> m_commandBuffers;
|
|
};
|
|
}
|
|
|
|
#include <Nazara/OpenGLRenderer/OpenGLCommandBuffer.inl>
|
|
|
|
#endif // NAZARA_OPENGLRENDERER_OPENGLCOMMANDBUFFER_HPP
|