SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
DeviceMemory.h
1#pragma once
2
3#include "spark/render/Export.h"
4
5#include <cstddef>
6
7namespace spark::render
8{
12 class SPARK_RENDER_EXPORT IDeviceMemory
13 {
14 public:
15 virtual ~IDeviceMemory() noexcept = default;
16
24 [[nodiscard]] virtual unsigned int elements() const noexcept = 0;
25
34 [[nodiscard]] virtual std::size_t size() const noexcept = 0;
35
42 [[nodiscard]] virtual std::size_t elementSize() const noexcept = 0;
43
48 [[nodiscard]] virtual std::size_t elementAlignment() const = 0;
49
56 [[nodiscard]] virtual std::size_t alignedElementSize() const noexcept = 0;
57
64 [[nodiscard]] virtual bool writable() const noexcept = 0;
65 };
66}
Describes a chunk of memory on the GPU.
Definition DeviceMemory.h:13
virtual unsigned int elements() const noexcept=0
Get the number of sub-resources in the memory chunk.