CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
NLBuffer.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 "NLCommon.hpp"
11
13
15
16namespace CeresEngine {
17
19
21 class NLBuffer : public GPUBuffer, public NLDeviceObject<NLBuffer, GPUBuffer> {
22 private:
25
26 public:
31
33 ~NLBuffer() override;
34
35 public:
38
40 void unmap() final;
41
44
46 void flush(GPUBufferSize offset = 0, GPUBufferSize size = whole) final;
47
50 };
51
52} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
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
Null RenderAPI buffer object.
Definition NLBuffer.hpp:21
void invalidate(GPUBufferSize offset=0, GPUBufferSize size=whole) final
NLBuffer(NLDevicePtr device, const GPUBufferDescriptor &descriptor)
Creates a new Null buffer object.
const GPUBufferDescriptor mDescriptor
A structure that describes the buffer and it's properties.
Definition NLBuffer.hpp:24
GPUBufferData map() final
~NLBuffer() override
Destroys the buffer object and releases the GPU memory.
GPUBufferSize getSize() const final
void flush(GPUBufferSize offset=0, GPUBufferSize size=whole) final
Definition NLCommon.hpp:117
const Descriptor & descriptor
A structure that describes the object and it's properties.
Definition Common.hpp:69
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
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Hardware buffer descriptor structure.
Definition GPUBuffer.hpp:92