Files
MapLibreParticleLab/include/mbgl/mtl/vertex_buffer_resource.hpp
Tim Sylvester 82ec59a2b0 Metal setup merge (#1616)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alex Cristici <alex.cristici@gmail.com>
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
Co-authored-by: Stefan Karschti <stefan.karschti@gmail.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
Co-authored-by: Alex Cristici <alex@skoon.energy>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
Co-authored-by: Wei Chen <alanchenboy@gmail.com>
Co-authored-by: Siarhei Fedartsou <siarhei.fedartsou@gmail.com>
Co-authored-by: tdcosta100 <tdcosta100@gmail.com>
2023-09-13 18:35:20 +00:00

28 lines
700 B
C++

#pragma once
#include <mbgl/mtl/buffer_resource.hpp>
namespace mbgl {
namespace mtl {
class VertexBufferResource : public gfx::VertexBufferResource {
public:
VertexBufferResource() = default;
VertexBufferResource(BufferResource&& ptr)
: buffer(std::move(ptr)) {}
VertexBufferResource(VertexBufferResource&& other)
: buffer(std::move(other.buffer)) {}
std::size_t getSizeInBytes() const { return buffer.getSizeInBytes(); }
void* contents() const { return buffer.contents(); }
BufferResource& get() { return buffer; }
const BufferResource& get() const { return buffer; }
protected:
BufferResource buffer;
};
} // namespace mtl
} // namespace mbgl