SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
IndexBuffer.h
1#pragma once
2
3#include "spark/render/Export.h"
4#include "spark/render/Buffer.h"
5
6namespace spark::render
7{
11 enum class IndexType
12 {
14 UInt16 = 0x00000010,
15
17 UInt32 = 0x00000020
18 };
19
23 class SPARK_RENDER_EXPORT IIndexBufferLayout : public IBufferLayout
24 {
25 public:
26 ~IIndexBufferLayout() noexcept override = default;
27
32 [[nodiscard]] virtual IndexType indexType() const noexcept = 0;
33 };
34
38 class SPARK_RENDER_EXPORT IIndexBuffer : public virtual IBuffer
39 {
40 public:
41 ~IIndexBuffer() noexcept override = default;
42
47 [[nodiscard]] virtual const IIndexBufferLayout& layout() const noexcept = 0;
48 };
49}
Describes the layout of a buffer.
Definition Buffer.h:166
Base interface for all buffers.
Definition Buffer.h:151
Describes the layout of an index buffer.
Definition IndexBuffer.h:24
virtual IndexType indexType() const noexcept=0
Gets the index type of the buffer.
Describes an index buffer.
Definition IndexBuffer.h:39
virtual const IIndexBufferLayout & layout() const noexcept=0
Gets the layout of the buffer.