SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
Mappable.h
1#pragma once
2
3#include "spark/render/Export.h"
4
5#include <span>
6
7namespace spark::render
8{
12 class SPARK_RENDER_EXPORT IMappable
13 {
14 public:
15 virtual ~IMappable() noexcept = default;
16
23 virtual void map(const void* data, std::size_t size, unsigned int element) = 0;
24
31 virtual void map(std::span<const void*> data, std::size_t element_size, unsigned int first_element) = 0;
32
40 virtual void map(void* data, size_t size, unsigned int element = 0, bool write = true) = 0;
41
49 virtual void map(std::span<void*> data, size_t element_size, unsigned int first_element = 0, bool write = true) = 0;
50 };
51}
Interface allowing data to be mapped into the object.
Definition Mappable.h:13
virtual void map(void *data, size_t size, unsigned int element=0, bool write=true)=0
Maps the memory at data into the internal memory of the object.
virtual void map(const void *data, std::size_t size, unsigned int element)=0
Maps the memory at data into the internal memory of the object.
virtual void map(std::span< const void * > data, std::size_t element_size, unsigned int first_element)=0
Maps the memory blocks within data into the internal memory of the object.
virtual void map(std::span< void * > data, size_t element_size, unsigned int first_element=0, bool write=true)=0
Maps the memory blocks within data into the internal memory of the object.