Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OpenglIndexStorage.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 EStorageElement indexType,
17 std::size_t numIndices,
18 EStorageUsage usage);
19
20 ~OpenglIndexStorage() override;
21
22 std::size_t numIndices() const override;
23
24 void upload(
25 const std::byte* rawIndexData,
26 std::size_t numBytes) override;
27
29
30 std::size_t numBytes() const;
31
32private:
33 GLuint m_iboID;
34 std::size_t m_numIndices;
35};
36
37inline std::size_t OpenglIndexStorage::numIndices() const
38{
39 return m_numIndices;
40}
41
42}// end namespace ph::editor::ghi
Definition IndexStorage.h:11
Definition OpenglIndexStorage.h:13
NativeHandle getNativeHandle() override
Definition OpenglIndexStorage.cpp:58
void upload(const std::byte *rawIndexData, std::size_t numBytes) override
Definition OpenglIndexStorage.cpp:30
OpenglIndexStorage(EStorageElement indexType, std::size_t numIndices, EStorageUsage usage)
Definition OpenglIndexStorage.cpp:8
std::size_t numBytes() const
Definition OpenglIndexStorage.cpp:71
~OpenglIndexStorage() override
Definition OpenglIndexStorage.cpp:25
std::size_t numIndices() const override
Definition OpenglIndexStorage.h:37
std::variant< std::monostate, uint64 > NativeHandle
Definition Storage.h:16
Definition PlatformDisplay.h:13
EStorageElement
Definition ghi_enums.h:70
EStorageUsage
Definition ghi_enums.h:86