mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-11 22:53:35 +00:00
adding post processing
This commit is contained in:
@@ -26,6 +26,21 @@ namespace Scop
|
||||
return buffer;
|
||||
}
|
||||
|
||||
inline void Allocate(std::size_t size)
|
||||
{
|
||||
if(m_data != nullptr)
|
||||
FatalError("cannot allocate an already allocated CPU buffer");
|
||||
try
|
||||
{
|
||||
m_data = std::make_shared<std::uint8_t[]>(size);
|
||||
m_size = size;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
FatalError("memory allocation for a CPU buffer failed");
|
||||
}
|
||||
}
|
||||
|
||||
inline bool Empty() const { return m_size == 0; }
|
||||
|
||||
[[nodiscard]] inline std::size_t GetSize() const noexcept { return m_size; }
|
||||
|
||||
Reference in New Issue
Block a user