Implement some classes
This commit is contained in:
@@ -9,9 +9,8 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Config.hpp>
|
||||
#include <Nazara/Renderer/UploadPool.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Buffer.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/DeviceMemory.hpp>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
@@ -20,18 +19,13 @@ namespace Nz
|
||||
class NAZARA_OPENGLRENDERER_API OpenGLUploadPool : public UploadPool
|
||||
{
|
||||
public:
|
||||
struct OpenGLAllocation : Allocation
|
||||
{
|
||||
VkBuffer buffer;
|
||||
};
|
||||
|
||||
inline OpenGLUploadPool(Vk::Device& device, UInt64 blockSize);
|
||||
inline OpenGLUploadPool(UInt64 blockSize);
|
||||
OpenGLUploadPool(const OpenGLUploadPool&) = delete;
|
||||
OpenGLUploadPool(OpenGLUploadPool&&) noexcept = default;
|
||||
~OpenGLUploadPool() = default;
|
||||
|
||||
OpenGLAllocation& Allocate(UInt64 size) override;
|
||||
OpenGLAllocation& Allocate(UInt64 size, UInt64 alignment) override;
|
||||
Allocation& Allocate(UInt64 size) override;
|
||||
Allocation& Allocate(UInt64 size, UInt64 alignment) override;
|
||||
|
||||
void Reset() override;
|
||||
|
||||
@@ -41,15 +35,11 @@ namespace Nz
|
||||
private:
|
||||
struct Block
|
||||
{
|
||||
Vk::DeviceMemory blockMemory;
|
||||
Vk::Buffer buffer;
|
||||
//< TODO
|
||||
UInt64 freeOffset;
|
||||
};
|
||||
|
||||
UInt64 m_blockSize;
|
||||
Vk::Device& m_device;
|
||||
std::vector<Block> m_blocks;
|
||||
std::vector<OpenGLAllocation> m_allocations;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user