Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
MemoryPoolBuffer.hpp
1/*
2Copyright (C) 2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGAMES_MEMORYPOOLBUFFER_H
17#define AEONGAMES_MEMORYPOOLBUFFER_H
18#include <cstdint>
19#include <vector>
21#include "aeongames/BufferAccessor.hpp"
22
23namespace AeonGames
24{
25 class Buffer;
28 {
29 public:
35 virtual BufferAccessor Allocate ( size_t aSize ) = 0;
37 virtual void Reset() = 0;
38 virtual ~MemoryPoolBuffer() = default;
40 virtual const Buffer& GetBuffer() const = 0;
41 };
42}
43#endif
Platform-specific macros, includes, and DLL export/import definitions.
Provides access to a region within a memory pool buffer.
Abstract interface for GPU/memory buffer operations.
Definition Buffer.hpp:24
Abstract interface for a pool-based buffer allocator.
virtual BufferAccessor Allocate(size_t aSize)=0
Allocate a sub-region from the memory pool.
virtual const Buffer & GetBuffer() const =0
Get a reference to the underlying Buffer.
virtual void Reset()=0
Reset the pool, freeing all previous allocations.
<- This is here just for the literals
Definition AABB.hpp:31