Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
Shader.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <Common/primitive_type.h>
6
7#include <string>
8#include <string_view>
9#include <variant>
10#include <memory>
11
12namespace ph::editor::ghi
13{
14
15class Shader
16{
17public:
18 using NativeHandle = std::variant<
19 std::monostate,
20 uint64>;
21
22 Shader(std::string name, EShadingStage shadingStage);
23 virtual ~Shader();
24
26
27 std::string_view getName() const;
29
30private:
31 std::string m_name;
32 EShadingStage m_shadingStage;
33};
34
37{
38 return std::monostate();
39}
40
41inline std::string_view Shader::getName() const
42{
43 return m_name;
44}
45
47{
48 return m_shadingStage;
49}
50
51}// end namespace ph::editor::ghi
Definition Shader.h:16
std::string_view getName() const
Definition Shader.h:41
std::variant< std::monostate, uint64 > NativeHandle
Definition Shader.h:18
Shader(std::string name, EShadingStage shadingStage)
Definition Shader.cpp:8
EShadingStage getShadingStage() const
Definition Shader.h:46
virtual NativeHandle getNativeHandle()
Definition Shader.h:35
Definition PlatformDisplay.h:13
EShadingStage
Definition ghi_enums.h:104