Pyrogenesis
HEAD
Pyrogenesis, a RTS Engine
Format.h
Go to the documentation of this file.
1
/* Copyright (C) 2023 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_UINT
,
36
B8G8R8A8_UNORM
,
37
38
// TODO: we need to drop legacy A8 and L8 formats as soon as we have proper
39
// channel swizzling.
40
A8_UNORM
,
41
L8_UNORM
,
42
43
R16_UNORM
,
44
R16_UINT
,
45
R16_SINT
,
46
R16G16_UNORM
,
47
R16G16_UINT
,
48
R16G16_SINT
,
49
50
R32_SFLOAT
,
51
R32G32_SFLOAT
,
52
R32G32B32_SFLOAT
,
53
R32G32B32A32_SFLOAT
,
54
55
D16_UNORM
,
56
D24_UNORM
,
57
D24_UNORM_S8_UINT
,
58
D32_SFLOAT
,
59
D32_SFLOAT_S8_UINT
,
60
61
BC1_RGB_UNORM
,
62
BC1_RGBA_UNORM
,
63
BC2_UNORM
,
64
BC3_UNORM
65
};
66
67
inline
bool
IsDepthFormat
(
const
Format
format)
68
{
69
return
70
format ==
Format::D16_UNORM
||
71
format ==
Format::D24_UNORM
||
72
format ==
Format::D24_UNORM_S8_UINT
||
73
format ==
Format::D32_SFLOAT
||
74
format ==
Format::D32_SFLOAT_S8_UINT
;
75
}
76
77
}
// namespace Backend
78
79
}
// namespace Renderer
80
81
#endif
// INCLUDED_RENDERER_BACKEND_FORMAT
Renderer::Backend::Format
Format
Definition:
Format.h:28
Renderer::Backend::Format::R16G16_UINT
@ R16G16_UINT
Renderer::Backend::Format::D16_UNORM
@ D16_UNORM
Renderer::Backend::Format::R32G32B32A32_SFLOAT
@ R32G32B32A32_SFLOAT
Renderer::Backend::Format::UNDEFINED
@ UNDEFINED
Renderer::Backend::Format::B8G8R8A8_UNORM
@ B8G8R8A8_UNORM
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::R8G8B8_UNORM
@ R8G8B8_UNORM
Renderer::Backend::Format::R8G8B8A8_UINT
@ R8G8B8A8_UINT
Renderer::Backend::Format::R8G8_UINT
@ R8G8_UINT
Renderer::Backend::Format::R8_UNORM
@ R8_UNORM
Renderer::Backend::Format::R8G8_UNORM
@ R8G8_UNORM
Renderer::Backend::Format::R16_UNORM
@ R16_UNORM
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::R16_UINT
@ R16_UINT
Renderer::Backend::Format::R32G32_SFLOAT
@ R32G32_SFLOAT
Renderer::Backend::Format::BC3_UNORM
@ BC3_UNORM
Renderer::Backend::Format::R8G8B8A8_UNORM
@ R8G8B8A8_UNORM
Renderer::Backend::Backend
Backend
Definition:
Backend.h:28
Renderer::Backend::IsDepthFormat
bool IsDepthFormat(const Format format)
Definition:
Format.h:67
Renderer
Definition:
VideoMode.h:29
source
renderer
backend
Format.h
Generated by
1.9.4