SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
VertexBuffer.h
1#pragma once
2
3#include "spark/render/Buffer.h"
4#include "spark/render/Export.h"
5
6#include <vector>
7
8namespace spark::render
9{
13 class SPARK_RENDER_EXPORT IVertexBufferLayout : public IBufferLayout
14 {
15 public:
16 ~IVertexBufferLayout() noexcept override = default;
17
22 [[nodiscard]] virtual std::vector<const BufferAttribute*> attributes() const noexcept = 0;
23
28 virtual void addAttribute(BufferAttribute&& attribute) noexcept = 0;
29 };
30
34 class SPARK_RENDER_EXPORT IVertexBuffer : public virtual IBuffer
35 {
36 public:
37 ~IVertexBuffer() noexcept override = default;
38
43 [[nodiscard]] virtual const IVertexBufferLayout& layout() const noexcept = 0;
44 };
45}
Stores metadata about a buffer attribute, member or field of a descriptor or buffer.
Definition Buffer.h:193
Describes the layout of a buffer.
Definition Buffer.h:166
Base interface for all buffers.
Definition Buffer.h:151
Describes the layout of a vertex buffer.
Definition VertexBuffer.h:14
virtual std::vector< const BufferAttribute * > attributes() const noexcept=0
Gets the attributes of the vertex buffer.
Represents a vertex buffer.
Definition VertexBuffer.h:35
virtual const IVertexBufferLayout & layout() const noexcept=0
Gets the layout of the vertex buffer.