Photon Engine
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
picture_basics.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <Common/assertion.h>
4
5
#include <cstddef>
6
7
namespace
ph
8
{
9
10
enum class
EPicturePixelComponent
11
{
12
Empty
= 0,
13
14
Int8
,
15
UInt8
,
16
Int16
,
17
UInt16
,
18
Int32
,
19
UInt32
,
20
Int64
,
21
UInt64
,
22
Float16
,
23
Float32
,
24
Float64
25
};
26
27
inline
std::size_t
num_bytes_in_component
(
const
EPicturePixelComponent
componentType)
28
{
29
switch
(componentType)
30
{
31
case
EPicturePixelComponent::Empty
:
return
0;
32
case
EPicturePixelComponent::Int8
:
return
1;
33
case
EPicturePixelComponent::UInt8
:
return
1;
34
case
EPicturePixelComponent::Int16
:
return
2;
35
case
EPicturePixelComponent::UInt16
:
return
2;
36
case
EPicturePixelComponent::Int32
:
return
4;
37
case
EPicturePixelComponent::UInt32
:
return
4;
38
case
EPicturePixelComponent::Int64
:
return
8;
39
case
EPicturePixelComponent::UInt64
:
return
8;
40
case
EPicturePixelComponent::Float16
:
return
2;
41
case
EPicturePixelComponent::Float32
:
return
4;
42
case
EPicturePixelComponent::Float64
:
return
8;
43
default
: PH_ASSERT_UNREACHABLE_SECTION();
return
0;
44
}
45
}
46
47
}
// end namespace ph
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
ph::EPicturePixelComponent
EPicturePixelComponent
Definition
picture_basics.h:11
ph::EPicturePixelComponent::Float32
@ Float32
ph::EPicturePixelComponent::Float16
@ Float16
ph::EPicturePixelComponent::Int16
@ Int16
ph::EPicturePixelComponent::Int8
@ Int8
ph::EPicturePixelComponent::UInt16
@ UInt16
ph::EPicturePixelComponent::UInt64
@ UInt64
ph::EPicturePixelComponent::UInt8
@ UInt8
ph::EPicturePixelComponent::Int32
@ Int32
ph::EPicturePixelComponent::Empty
@ Empty
ph::EPicturePixelComponent::Float64
@ Float64
ph::EPicturePixelComponent::UInt32
@ UInt32
ph::EPicturePixelComponent::Int64
@ Int64
ph::num_bytes_in_component
std::size_t num_bytes_in_component(const EPicturePixelComponent componentType)
Definition
picture_basics.h:27
ph::EPlyDataType::Int8
@ Int8
ph::EPlyDataType::UInt16
@ UInt16
ph::EPlyDataType::UInt8
@ UInt8
ph::EPlyDataType::Float64
@ Float64
ph::EPlyDataType::UInt32
@ UInt32
ph::EVertexElement::Float32
@ Float32
ph::EVertexElement::Float16
@ Float16
ph::EVertexElement::Int16
@ Int16
ph::EVertexElement::Int32
@ Int32
Source
Frame
picture_basics.h
Generated by
1.11.0