Merge 'remotes/trunk'
[0ad.git] / source / renderer / backend / CompareOp.h
blob53f35f28c823ca29db15a9c24260e4d9804ff446
1 /* Copyright (C) 2022 Wildfire Games.
2 * This file is part of 0 A.D.
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.
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.
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/>.
18 #ifndef INCLUDED_RENDERER_BACKEND_COMPAREOP
19 #define INCLUDED_RENDERER_BACKEND_COMPAREOP
21 #include "graphics/Color.h"
23 class CStr;
25 namespace Renderer
28 namespace Backend
31 enum class CompareOp
33 // Never passes the comparison.
34 NEVER,
35 // Passes if the source value is less than the destination value.
36 LESS,
37 // Passes if the source depth value is equal to the destination value.
38 EQUAL,
39 // Passes if the source depth value is less than or equal to the destination value.
40 LESS_OR_EQUAL,
41 // Passes if the source depth value is greater than the destination value.
42 GREATER,
43 // Passes if the source depth value is not equal to the destination value.
44 NOT_EQUAL,
45 // Passes if the source depth value is greater than or equal to the destination value.
46 GREATER_OR_EQUAL,
47 // Always passes the comparison.
48 ALWAYS
51 CompareOp ParseCompareOp(const CStr& str);
53 } // namespace Backend
55 } // namespace Renderer
57 #endif // INCLUDED_RENDERER_BACKEND_COMPAREOP