Remove Utility module and move its content to Core and TextRenderer modules
This commit is contained in:
committed by
Jérôme Leclercq
parent
965a00182c
commit
e64c2b036e
37
include/Nazara/Core/SoftwareBuffer.hpp
Normal file
37
include/Nazara/Core/SoftwareBuffer.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_CORE_SOFTWAREBUFFER_HPP
|
||||
#define NAZARA_CORE_SOFTWAREBUFFER_HPP
|
||||
|
||||
#include <NazaraUtils/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Buffer.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_CORE_API SoftwareBuffer : public Buffer
|
||||
{
|
||||
public:
|
||||
SoftwareBuffer(BufferType type, UInt64 size, BufferUsageFlags usage, const void* initialData);
|
||||
~SoftwareBuffer() = default;
|
||||
|
||||
bool Fill(const void* data, UInt64 offset, UInt64 size) override;
|
||||
|
||||
const UInt8* GetData() const;
|
||||
|
||||
void* Map(UInt64 offset = 0, UInt64 size = 0) override;
|
||||
bool Unmap() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<UInt8[]> m_buffer;
|
||||
bool m_mapped;
|
||||
};
|
||||
|
||||
NAZARA_CORE_API std::shared_ptr<Buffer> SoftwareBufferFactory(BufferType type, UInt64 size, BufferUsageFlags usage, const void* initialData = nullptr);
|
||||
}
|
||||
|
||||
#endif // NAZARA_CORE_SOFTWAREBUFFER_HPP
|
||||
Reference in New Issue
Block a user