27#include <function2/function2.hpp>
115 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
131 using TDeviceObject::TDeviceObject;
198 virtual
void unmap() = 0;
223 template<typename Block>
void data(Block&& block) {
#define CE_FLAGS_OPERATORS(Enum)
Defines global operators for a Flags<Enum, Storage> implementation.
Definition Flags.hpp:216
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Represents a secure buffer i.e.
Definition Buffer.hpp:28
Definition GPUBuffer.hpp:124
GPUBuffer(GPUBuffer &&)=delete
Deleted move constructor.
static const constexpr GPUBufferSize whole
A constant the represents the whole buffer length.
Definition GPUBuffer.hpp:127
GPUBuffer & operator=(const GPUBuffer &)=delete
Async< ByteBuffer > read(GPUBufferSize offset=0, GPUBufferSize size=whole)
Performs an asynchronous read operation on the buffer.
Async write(ByteBuffer &&rawData, GPUBufferSize offset=0, GPUBufferSize size=whole)
Performs an asynchronous write operation on the buffer.
Async< ByteBuffer > read(GPUCommandBuffer &commandBuffer, GPUBufferSize offset=0, GPUBufferSize size=whole)
Performs an asynchronous read operation on the buffer in an specific command buffer.
virtual GPUBufferData map()=0
Maps the buffer into the computers memory.
GPUBuffer(const GPUBuffer &)=delete
Deleted copy constructor.
Async write(GPUCommandBuffer &commandBuffer, ByteBuffer &&rawData, GPUBufferSize offset=0, GPUBufferSize size=whole)
Performs an asynchronous write operation on the buffer in an specific command buffer.
GPUBuffer & operator=(GPUBuffer &&)=delete
Definition GPUCommandBuffer.hpp:77
Definition Application.hpp:19
std::uint64_t UInt64
Definition DataTypes.hpp:26
GPUMemoryData GPUBufferData
A pointer type that represents the buffer raw data.
Definition GPUBuffer.hpp:89
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
GPUMemoryProperty
Flag specifying properties for a memory type.
Definition GPUMemory.hpp:18
void * GPUMemoryData
A pointer type that represents the memory raw data.
Definition GPUMemory.hpp:61
GPUBufferUsageFlag
Definition GPUBuffer.hpp:53
@ Automatic
Automatically defines the buffer usage based on type.
@ Destination
Specifies that the buffer can be used as the destination of a transfer command.
UInt64 GPUMemorySize
A type that represents a memory size.
Definition GPUMemory.hpp:58
GPUMemorySize GPUBufferSize
A type that represents a buffer size.
Definition GPUBuffer.hpp:86
GPUBufferType
Hardware buffer type enumeration.
Definition GPUBuffer.hpp:32
@ Indirect
Indirect draw buffer type.
@ Generic
Generic buffer type. Can be used for multiple purposes.
@ Index
Index buffer type.
@ Storage
Storage buffer type (also called "Shader Storage Buffer Object" or "Read/Write Buffer").
@ Uniform
Uniform buffer type (also called "Constant Buffer Object").
@ Source
Refers to a high-level source code.
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
Definition GPUBuffer.hpp:230
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUBuffer.hpp:237
UInt64 size
Definition GPUBuffer.hpp:232
UInt64 offset
Definition GPUBuffer.hpp:231
A basic vertex type.
Definition Mesh.hpp:51