ManaPlus
rendererslistsdl.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2013-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef RENDER_RENDERERSLISTSDL_H
23 #define RENDER_RENDERERSLISTSDL_H
24 
25 #ifdef USE_SDL2
27 RENDER_RENDERERSLISTSDL2_H
28 
29 #else // USE_SDL2
30 
31 #include "utils/gettext.h"
32 
33 #include "render/renderers.h"
34 
35 #ifdef USE_OPENGL
36 #ifdef ANDROID
37 // defined OPENGL ANDROID
38 
39 // map for index to RenderType
40 const RenderType indexToRender[] =
41 {
44 };
45 
46 const char *OPENGL_NAME[] =
47 {
48  // TRANSLATORS: draw backend
49  N_("Software"),
50  // TRANSLATORS: draw backend
51  N_("Mobile OpenGL ES")
52 };
53 
54 const int renderModesListSize = 2;
55 
56 const int renderToIndex[] =
57 {
58  0, // RENDER_SOFTWARE
59  1, // RENDER_NORMAL_OPENGL
60  1, // RENDER_SAFE_OPENGL
61  1, // RENDER_GLES_OPENGL
62  1, // RENDER_SDL2_DEFAULT
63  1, // RENDER_MODERN_OPENGL
64  1 // RENDER_GLES2_OPENGL
65 };
66 
67 #elif defined(__native_client__)
68 // defined OPENGL nacl
69 
70 // map for index to RenderType
71 const RenderType indexToRender[] =
72 {
76 };
77 
78 const char *OPENGL_NAME[] =
79 {
80  // TRANSLATORS: draw backend
81  N_("Software"),
82  // TRANSLATORS: draw backend
83  N_("Safe OpenGL"),
84  // TRANSLATORS: draw backend
85  N_("Mobile OpenGL ES 2"),
86 };
87 
88 const int renderModesListSize = 3;
89 
90 const int renderToIndex[] =
91 {
92  0, // RENDER_SOFTWARE
93  2, // RENDER_NORMAL_OPENGL
94  1, // RENDER_SAFE_OPENGL
95  2, // RENDER_GLES_OPENGL
96  0, // RENDER_SDL2_DEFAULT
97  2, // RENDER_MODERN_OPENGL
98  2 // RENDER_GLES2_OPENGL
99 };
100 
101 #else // ANDROID or nacl
102 // defined OPENGL
103 
104 // map for index to RenderType
106 {
113 };
114 
115 const char *OPENGL_NAME[] =
116 {
117  // TRANSLATORS: draw backend
118  N_("Software"),
119  // TRANSLATORS: draw backend
120  N_("Normal OpenGL"),
121  // TRANSLATORS: draw backend
122  N_("Safe OpenGL"),
123  // TRANSLATORS: draw backend
124  N_("Mobile OpenGL ES"),
125  // TRANSLATORS: draw backend
126  N_("Modern OpenGL"),
127  // TRANSLATORS: draw backend
128  N_("Mobile OpenGL ES 2"),
129 };
130 
131 const int renderModesListSize = 6;
132 
133 const int renderToIndex[] =
134 {
135  0, // RENDER_SOFTWARE
136  1, // RENDER_NORMAL_OPENGL
137  2, // RENDER_SAFE_OPENGL
138  3, // RENDER_GLES_OPENGL
139  0, // RENDER_SDL2_DEFAULT
140  4, // RENDER_MODERN_OPENGL
141  5 // RENDER_GLES2_OPENGL
142 };
143 
144 #endif // ANDROID
145 
146 #else // USE_OPENGL
147 // no defines
148 
149 // map for index to RenderType
150 const RenderType indexToRender[] =
151 {
153 };
154 
155 const char *OPENGL_NAME[] =
156 {
157  // TRANSLATORS: draw backend
158  N_("Software")
159 };
160 
161 const int renderModesListSize = 1;
162 
163 const int renderToIndex[] =
164 {
165  0, // RENDER_SOFTWARE
166  0, // RENDER_NORMAL_OPENGL
167  0, // RENDER_SAFE_OPENGL
168  0, // RENDER_GLES_OPENGL
169  0, // RENDER_SDL2_DEFAULT
170  0, // RENDER_MODERN_OPENGL
171  0 // RENDER_GLES2_OPENGL
172 };
173 
174 #endif // USE_OPENGL
175 
176 #endif // USE_SDL2
177 #endif // RENDER_RENDERERSLISTSDL_H
#define N_(s)
Definition: gettext.h:36
const int renderToIndex[]
const int renderModesListSize
const char * OPENGL_NAME[]
const RenderType indexToRender[]
RenderType
Definition: rendertype.h:26
@ RENDER_SAFE_OPENGL
Definition: rendertype.h:29
@ RENDER_GLES2_OPENGL
Definition: rendertype.h:33
@ RENDER_GLES_OPENGL
Definition: rendertype.h:30
@ RENDER_MODERN_OPENGL
Definition: rendertype.h:32
@ RENDER_NORMAL_OPENGL
Definition: rendertype.h:28
@ RENDER_SOFTWARE
Definition: rendertype.h:27