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
21namespace Renderer
22{
23
24namespace Backend
25{
26
27enum class Format
28{
37
38 // TODO: we need to drop legacy A8 and L8 formats as soon as we have proper
39 // channel swizzling.
42
49
54
60
65};
66
67inline 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 ||
75}
76
77} // namespace Backend
78
79} // namespace Renderer
80
81#endif // INCLUDED_RENDERER_BACKEND_FORMAT
Format
Definition: Format.h:28
Backend
Definition: Backend.h:28
bool IsDepthFormat(const Format format)
Definition: Format.h:67
Definition: VideoMode.h:29