Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OpenglMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "RenderCore/Mesh.h"
4
5#include "ThirdParty/glad2.h"
6
7#include <Utility/TSpan.h>
8
9namespace ph::editor::ghi
10{
11
12class Storage;
13
14class OpenglMesh : public Mesh
15{
16public:
18 const MeshVertexLayoutInfo& layout,
19 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages);
20
22 const MeshVertexLayoutInfo& layout,
23 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages,
24 const std::shared_ptr<IndexStorage>& indexStorage);
25
26 ~OpenglMesh() override;
27
28 void bind() override;
29
30private:
31 static GLuint getOpenglHandle(Storage& storage);
32
33 GLuint m_vaoID;
34};
35
36}// end namespace ph::editor::ghi
Definition Mesh.h:42
Definition OpenglMesh.h:15
OpenglMesh(const MeshVertexLayoutInfo &layout, TSpanView< std::shared_ptr< VertexStorage > > vertexStorages)
Definition OpenglMesh.cpp:13
~OpenglMesh() override
Definition OpenglMesh.cpp:81
void bind() override
Definition OpenglMesh.cpp:86
Definition Storage.h:14
Definition PlatformDisplay.h:13