Pyrogenesis
HEAD
Pyrogenesis, a RTS Engine
Format.h
Go to the documentation of this file.
1
/* Copyright (C) 2026 Wildfire Games.
2
* This file is part of 0 A.D.
3
*
4
* 0 A.D. is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* 0 A.D. is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef INCLUDED_RENDERER_BACKEND_FORMAT
19
#define INCLUDED_RENDERER_BACKEND_FORMAT
20
21
namespace
Renderer
22
{
23
24
namespace
Backend
25
{
26
27
enum class
Format
28
{
29
UNDEFINED
,
30
R8_UNORM
,
31
R8G8_UNORM
,
32
R8G8_UINT
,
33
R8G8B8_UNORM
,
34
R8G8B8A8_UNORM
,
35
R8G8B8A8_SRGB
,
36
R8G8B8A8_UINT
,
37
B8G8R8A8_UNORM
,
38
B8G8R8A8_SRGB
,
39
40
// TODO: we need to drop legacy A8 and L8 formats as soon as we have proper
41
// channel swizzling.
42
A8_UNORM
,
43
L8_UNORM
,
44
45
R16_UNORM
,
46
R16_UINT
,
47
R16_SINT
,
48
R16_SFLOAT
,
49
R16G16_UNORM
,
50
R16G16_UINT
,
51
R16G16_SINT
,
52
R16G16_SFLOAT
,
53
R16G16B16_SFLOAT
,
54
R16G16B16A16_SFLOAT
,
55
56
R32_SFLOAT
,
57
R32G32_SFLOAT
,
58
R32G32B32_SFLOAT
,
59
R32G32B32A32_SFLOAT
,
60
61
B10G11R11_UFLOAT
,
62
63
D16_UNORM
,
64
D24_UNORM
,
65
D24_UNORM_S8_UINT
,
66
D32_SFLOAT
,
67
D32_SFLOAT_S8_UINT
,
68
69
BC1_RGB_UNORM
,
70
BC1_RGB_SRGB
,
71
BC1_RGBA_UNORM
,
72
BC1_RGBA_SRGB
,
73
BC2_UNORM
,
74
BC2_SRGB
,
75
BC3_UNORM
,
76
BC3_SRGB
,
77
};
78
79
inline
bool
IsDepthFormat
(
const
Format
format)
80
{
81
return
82
format ==
Format::D16_UNORM
||
83
format ==
Format::D24_UNORM
||
84
format ==
Format::D24_UNORM_S8_UINT
||
85
format ==
Format::D32_SFLOAT
||
86
format ==
Format::D32_SFLOAT_S8_UINT
;
87
}
88
89
}
// namespace Backend
90
91
}
// namespace Renderer
92
93
#endif
// INCLUDED_RENDERER_BACKEND_FORMAT
Renderer::Backend::Format
Format
Definition:
Format.h:28
Renderer::Backend::Format::R16G16_UINT
@ R16G16_UINT
Renderer::Backend::Format::BC3_SRGB
@ BC3_SRGB
Renderer::Backend::Format::D16_UNORM
@ D16_UNORM
Renderer::Backend::Format::R32G32B32A32_SFLOAT
@ R32G32B32A32_SFLOAT
Renderer::Backend::Format::BC1_RGB_SRGB
@ BC1_RGB_SRGB
Renderer::Backend::Format::UNDEFINED
@ UNDEFINED
Renderer::Backend::Format::B8G8R8A8_UNORM
@ B8G8R8A8_UNORM
Renderer::Backend::Format::R16G16B16_SFLOAT
@ R16G16B16_SFLOAT
Renderer::Backend::Format::R32G32B32_SFLOAT
@ R32G32B32_SFLOAT
Renderer::Backend::Format::D32_SFLOAT
@ D32_SFLOAT
Renderer::Backend::Format::R16_SINT
@ R16_SINT
Renderer::Backend::Format::D24_UNORM
@ D24_UNORM
Renderer::Backend::Format::R32_SFLOAT
@ R32_SFLOAT
Renderer::Backend::Format::L8_UNORM
@ L8_UNORM
Renderer::Backend::Format::D32_SFLOAT_S8_UINT
@ D32_SFLOAT_S8_UINT
Renderer::Backend::Format::R16G16_SFLOAT
@ R16G16_SFLOAT
Renderer::Backend::Format::R8G8B8_UNORM
@ R8G8B8_UNORM
Renderer::Backend::Format::R8G8B8A8_SRGB
@ R8G8B8A8_SRGB
Renderer::Backend::Format::R8G8B8A8_UINT
@ R8G8B8A8_UINT
Renderer::Backend::Format::R8G8_UINT
@ R8G8_UINT
Renderer::Backend::Format::R16G16B16A16_SFLOAT
@ R16G16B16A16_SFLOAT
Renderer::Backend::Format::R8_UNORM
@ R8_UNORM
Renderer::Backend::Format::BC1_RGBA_SRGB
@ BC1_RGBA_SRGB
Renderer::Backend::Format::R8G8_UNORM
@ R8G8_UNORM
Renderer::Backend::Format::R16_UNORM
@ R16_UNORM
Renderer::Backend::Format::R16_SFLOAT
@ R16_SFLOAT
Renderer::Backend::Format::BC1_RGBA_UNORM
@ BC1_RGBA_UNORM
Renderer::Backend::Format::BC2_UNORM
@ BC2_UNORM
Renderer::Backend::Format::R16G16_UNORM
@ R16G16_UNORM
Renderer::Backend::Format::R16G16_SINT
@ R16G16_SINT
Renderer::Backend::Format::A8_UNORM
@ A8_UNORM
Renderer::Backend::Format::D24_UNORM_S8_UINT
@ D24_UNORM_S8_UINT
Renderer::Backend::Format::BC1_RGB_UNORM
@ BC1_RGB_UNORM
Renderer::Backend::Format::B10G11R11_UFLOAT
@ B10G11R11_UFLOAT
Renderer::Backend::Format::R16_UINT
@ R16_UINT
Renderer::Backend::Format::BC2_SRGB
@ BC2_SRGB
Renderer::Backend::Format::R32G32_SFLOAT
@ R32G32_SFLOAT
Renderer::Backend::Format::BC3_UNORM
@ BC3_UNORM
Renderer::Backend::Format::R8G8B8A8_UNORM
@ R8G8B8A8_UNORM
Renderer::Backend::Format::B8G8R8A8_SRGB
@ B8G8R8A8_SRGB
Renderer::Backend::Backend
Backend
Definition:
Backend.h:28
Renderer::Backend::IsDepthFormat
bool IsDepthFormat(const Format format)
Definition:
Format.h:79
Renderer
Definition:
Canvas2D.h:30
source
renderer
backend
Format.h
Generated by
1.9.4