CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
VKBuffer.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "VKCommon.hpp"
11
12#include "VKMemoryAllocator.hpp"
13
15
17
18namespace CeresEngine {
19
76
77} // namespace CeresEngine
#define CE_EXPLICIT_FALSE
Definition Macros.hpp:416
Definition GPUBuffer.hpp:124
static const constexpr GPUBufferSize whole
A constant the represents the whole buffer length.
Definition GPUBuffer.hpp:127
GPUDevice & device
The owning device this object was created from.
Definition Common.hpp:55
const Descriptor & descriptor
A structure that describes the object and it's properties.
Definition Common.hpp:69
Definition VKBuffer.hpp:20
VKObjectAllocator Allocator
An allocator type used to allocate new VKBuffer instances from a memory pool.
Definition VKBuffer.hpp:46
VkBuffer mBuffer
The Vulkan buffer object.
Definition VKBuffer.hpp:26
GPUBufferData map() final
void invalidate(GPUBufferSize offset=0, GPUBufferSize size=whole) final
~VKBuffer() final
Destroys the buffer object and releases the GPU memory.
static Allocator & getAllocator() noexcept
Returns the allocator for VKBuffer.
const GPUBufferDescriptor descriptorVK
A structure that describes the buffer and it's properties.
Definition VKBuffer.hpp:23
void flush(GPUBufferSize offset=0, GPUBufferSize size=whole) final
GPUBufferData mMappedMemory
The buffer mapped memory address.
Definition VKBuffer.hpp:32
VKBuffer(VKDevice &device, VKMemoryAllocator &memoryAllocator, const GPUBufferDescriptor &descriptor)
Creates a new Vulkan buffer object.
GPUBufferSize getSize() const final
VKMemoryAllocation mBufferMemory
The allocated memory.
Definition VKBuffer.hpp:29
Definition VKDevice.hpp:79
Definition VKCommon.hpp:143
Definition VKMemoryAllocator.hpp:21
Definition VKMemoryAllocator.hpp:87
Definition Application.hpp:19
GPUMemoryData GPUBufferData
A pointer type that represents the buffer raw data.
Definition GPUBuffer.hpp:89
GPUMemorySize GPUBufferSize
A type that represents a buffer size.
Definition GPUBuffer.hpp:86
ThreadSafeAllocator< MemoryPool< NodePool, AllocatorReference< VKAllocator > > > VKObjectAllocator
A pool allocator to be used for individual object pools.
Definition VKCommon.hpp:59
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition Span.hpp:668
Hardware buffer descriptor structure.
Definition GPUBuffer.hpp:92