Hymn to Beauty
C++ 3D Engine
WebGPUGeometryBinding.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Interface/GeometryBinding.hpp"
4
5namespace Video {
6
7class Buffer;
8class WebGPUBuffer;
9
12 public:
14
19 WebGPUGeometryBinding(Buffer* vertexBuffer, IndexType indexType = IndexType::NONE, const Buffer* indexBuffer = nullptr);
20
23
25
29
31
34 IndexType GetIndexType() const;
35
37
40 const WebGPUBuffer* GetIndexBuffer() const;
41
42 private:
43 WebGPUGeometryBinding(const WebGPUGeometryBinding& other) = delete;
44
45 WebGPUBuffer* vertexBuffer;
46 const WebGPUBuffer* indexBuffer;
47 IndexType indexType;
48};
49
50}
A buffer containing GPU accessible data.
Definition: Buffer.hpp:8
Binds together a vertex description with buffers.
Definition: GeometryBinding.hpp:8
IndexType
The type of values in the index buffer.
Definition: GeometryBinding.hpp:11
WebGPU implementation of Buffer.
Definition: WebGPUBuffer.hpp:12
WebGPU implementation of GeometryBinding.
Definition: WebGPUGeometryBinding.hpp:11
IndexType GetIndexType() const
Get the type of values in the index buffer.
Definition: WebGPUGeometryBinding.cpp:30
const WebGPUBuffer * GetIndexBuffer() const
Get the index buffer.
Definition: WebGPUGeometryBinding.cpp:34
WebGPUGeometryBinding(Buffer *vertexBuffer, IndexType indexType=IndexType::NONE, const Buffer *indexBuffer=nullptr)
Create new WebGPU geometry binding.
Definition: WebGPUGeometryBinding.cpp:9
WebGPUBuffer * GetVertexBuffer()
Get the vertex buffer.
Definition: WebGPUGeometryBinding.cpp:26
~WebGPUGeometryBinding() final
Destructor.
Definition: WebGPUGeometryBinding.cpp:22
Definition: Editor.hpp:18