Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Buffer.hpp
1/*
2Copyright (C) 2018,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
8http://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
17#ifndef AEONGAMES_BUFFER_H
18#define AEONGAMES_BUFFER_H
20namespace AeonGames
21{
23 class Buffer
24 {
25 public:
26 virtual ~Buffer() = default;
33 virtual void WriteMemory ( size_t aOffset, size_t aSize, const void *aData = nullptr ) const = 0;
40 virtual void* Map ( size_t aOffset, size_t aSize ) const = 0;
42 virtual void Unmap() const = 0;
44 virtual size_t GetSize() const = 0;
45 };
46}
47#endif
Platform-specific macros, includes, and DLL export/import definitions.
Abstract interface for GPU/memory buffer operations.
Definition Buffer.hpp:24
virtual void * Map(size_t aOffset, size_t aSize) const =0
Map a region of the buffer into CPU-accessible memory.
virtual void Unmap() const =0
Unmap a previously mapped buffer region.
virtual void WriteMemory(size_t aOffset, size_t aSize, const void *aData=nullptr) const =0
Write data into the buffer at a given offset.
virtual size_t GetSize() const =0
Get the total size of the buffer in bytes.
<- This is here just for the literals
Definition AABB.hpp:31