Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OpenglVertexStorage.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "ThirdParty/glad2.h"
6
7#include <cstddef>
8
9namespace ph::editor::ghi
10{
11
13{
14public:
16 const VertexGroupFormatInfo& format,
17 std::size_t numVertices,
18 EStorageUsage usage);
19
20 ~OpenglVertexStorage() override;
21
22 std::size_t numVertices() const override;
23
24 void upload(
25 const std::byte* rawVertexData,
26 std::size_t numBytes) override;
27
29
30 std::size_t numBytes() const;
31
32private:
33 GLuint m_vboID;
34 std::size_t m_numVertices;
35};
36
37inline std::size_t OpenglVertexStorage::numVertices() const
38{
39 return m_numVertices;
40}
41
42}// end namespace ph::editor::ghi
Definition OpenglVertexStorage.h:13
OpenglVertexStorage(const VertexGroupFormatInfo &format, std::size_t numVertices, EStorageUsage usage)
Definition OpenglVertexStorage.cpp:41
std::size_t numBytes() const
Definition OpenglVertexStorage.cpp:100
~OpenglVertexStorage() override
Definition OpenglVertexStorage.cpp:54
NativeHandle getNativeHandle() override
Definition OpenglVertexStorage.cpp:87
std::size_t numVertices() const override
Definition OpenglVertexStorage.h:37
void upload(const std::byte *rawVertexData, std::size_t numBytes) override
Definition OpenglVertexStorage.cpp:59
std::variant< std::monostate, uint64 > NativeHandle
Definition Storage.h:16
Definition VertexStorage.h:13
Definition PlatformDisplay.h:13
EStorageUsage
Definition ghi_enums.h:86