Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ApiHelper.h
Go to the documentation of this file.
1#pragma once
2
3#include "ph_core.h"
5
6#include <Common/assertion.h>
7
8#include <iostream>
9
10namespace ph
11{
12
13class ApiHelper final
14{
15public:
16 static EAttribute toCppAttribute(PH_EATTRIBUTE attribute);
17};
18
19// In-header Implementations:
20
21inline EAttribute ApiHelper::toCppAttribute(const PH_EATTRIBUTE attribute)
22{
23 switch(attribute)
24 {
25 case PH_EATTRIBUTE::LIGHT_ENERGY:
27 break;
28
29 case PH_EATTRIBUTE::NORMAL:
30 return EAttribute::NORMAL;
31 break;
32
33 case PH_EATTRIBUTE::DEPTH:
34 return EAttribute::DEPTH;
35 break;
36
37 default:
38 std::cerr << "warning: cannot convert to cpp attribute" << std::endl;
40 break;
41 }
42
43 PH_ASSERT_UNREACHABLE_SECTION();
44}
45
46}// end namespace ph
Definition ApiHelper.h:14
static EAttribute toCppAttribute(PH_EATTRIBUTE attribute)
Definition ApiHelper.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6
EAttribute
Definition EAttribute.h:7