1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "enumtostringmap_p.h"
5
6#ifdef VERBOSE_STATE_STORE
7
8#include <QDebug>
9
10static EnumToStringMap *theInstance = 0;
11static unsigned int theInstanceCount = 0;
12
13EnumToStringMap *EnumToStringMap::newInstance()
14{
15 if (theInstance) {
16 theInstanceCount++;
17 return theInstance;
18 }
19
20 theInstance = new EnumToStringMap();
21 theInstanceCount++;
22 return theInstance;
23}
24
25void EnumToStringMap::deleteInstance()
26{
27 theInstanceCount--;
28 if (theInstanceCount <= 0) {
29 delete theInstance;
30 theInstance = 0;
31 }
32}
33
34EnumToStringMap::EnumToStringMap() :
35 m_unknown("<unknown>")
36{
37 m_map[GL_ZERO] = "ZERO/null";
38
39 m_map[GL_DEPTH_BUFFER_BIT] = "DEPTH_BUFFER_BIT";
40 m_map[GL_STENCIL_BUFFER_BIT] = "STENCIL_BUFFER_BIT";
41 m_map[GL_COLOR_BUFFER_BIT] = "COLOR_BUFFER_BIT";
42
43 m_map[GL_STENCIL_BUFFER_BIT] = "STENCIL_BUFFER_BIT";
44 m_map[GL_COLOR_BUFFER_BIT] = "COLOR_BUFFER_BIT";
45
46 m_map[GL_POINTS] = "POINTS";
47 m_map[GL_LINES] = "LINES";
48 m_map[GL_LINE_LOOP] = "LINE_LOOP";
49 m_map[GL_LINE_STRIP] = "LINE_STRIP";
50 m_map[GL_TRIANGLES] = "TRIANGLES";
51 m_map[GL_TRIANGLE_STRIP] = "TRIANGLE_STRIP";
52 m_map[GL_TRIANGLE_FAN] = "TRIANGLE_FAN";
53
54 m_map[GL_SRC_COLOR] = "SRC_COLOR";
55 m_map[GL_ONE_MINUS_SRC_COLOR] = "ONE_MINUS_SRC_COLOR";
56 m_map[GL_SRC_ALPHA] = "SRC_ALPHA";
57 m_map[GL_ONE_MINUS_SRC_ALPHA] = "ONE_MINUS_SRC_ALPHA";
58 m_map[GL_DST_ALPHA] = "DST_ALPHA";
59 m_map[GL_ONE_MINUS_DST_ALPHA] = "ONE_MINUS_DST_ALPHA";
60
61 m_map[GL_DST_COLOR] = "DST_COLOR";
62 m_map[GL_ONE_MINUS_DST_COLOR] = "ONE_MINUS_DST_COLOR";
63 m_map[GL_SRC_ALPHA_SATURATE] = "SRC_ALPHA_SATURATE";
64
65 m_map[GL_FUNC_ADD] = "FUNC_ADD";
66 m_map[GL_BLEND_EQUATION] = "BLEND_EQUATION";
67 m_map[GL_BLEND_EQUATION_RGB] = "BLEND_EQUATION_RGB";
68 m_map[GL_BLEND_EQUATION_ALPHA] = "BLEND_EQUATION_ALPHA";
69
70 m_map[GL_FUNC_SUBTRACT] = "FUNC_SUBTRACT";
71 m_map[GL_FUNC_REVERSE_SUBTRACT] = "FUNC_REVERSE_SUBTRACT";
72
73 m_map[GL_BLEND_DST_RGB] = "BLEND_DST_RGB";
74 m_map[GL_BLEND_SRC_RGB] = "BLEND_SRC_RGB";
75 m_map[GL_BLEND_DST_ALPHA] = "BLEND_DST_ALPHA";
76 m_map[GL_BLEND_SRC_ALPHA] = "BLEND_SRC_ALPHA";
77 m_map[GL_CONSTANT_COLOR] = "CONSTANT_COLOR";
78 m_map[GL_ONE_MINUS_CONSTANT_COLOR] = "ONE_MINUS_CONSTANT_COLOR";
79 m_map[GL_CONSTANT_ALPHA] = "CONSTANT_ALPHA";
80 m_map[GL_ONE_MINUS_CONSTANT_ALPHA] = "ONE_MINUS_CONSTANT_ALPHA";
81 m_map[GL_BLEND_COLOR] = "BLEND_COLOR";
82
83 m_map[GL_ARRAY_BUFFER] = "ARRAY_BUFFER";
84 m_map[GL_ELEMENT_ARRAY_BUFFER] = "ELEMENT_ARRAY_BUFFER";
85 m_map[GL_ARRAY_BUFFER_BINDING] = "ARRAY_BUFFER_BINDING";
86 m_map[GL_ELEMENT_ARRAY_BUFFER_BINDING] = "ELEMENT_ARRAY_BUFFER_BINDING";
87
88 m_map[GL_STREAM_DRAW] = "STREAM_DRAW";
89 m_map[GL_STATIC_DRAW] = "STATIC_DRAW";
90 m_map[GL_DYNAMIC_DRAW] = "DYNAMIC_DRAW";
91
92 m_map[GL_BUFFER_SIZE] = "BUFFER_SIZE";
93 m_map[GL_BUFFER_USAGE] = "BUFFER_USAGE";
94
95 m_map[GL_CURRENT_VERTEX_ATTRIB] = "CURRENT_VERTEX_ATTRIB";
96
97 m_map[GL_FRONT] = "FRONT";
98 m_map[GL_BACK] = "BACK";
99 m_map[GL_FRONT_AND_BACK] = "FRONT_AND_BACK";
100
101 m_map[GL_CULL_FACE] = "CULL_FACE";
102 m_map[GL_BLEND] = "BLEND";
103 m_map[GL_DITHER] = "DITHER";
104 m_map[GL_STENCIL_TEST] = "STENCIL_TEST";
105 m_map[GL_DEPTH_TEST] = "DEPTH_TEST";
106 m_map[GL_SCISSOR_TEST] = "SCISSOR_TEST";
107 m_map[GL_POLYGON_OFFSET_FILL] = "POLYGON_OFFSET_FILL";
108 m_map[GL_SAMPLE_ALPHA_TO_COVERAGE] = "SAMPLE_ALPHA_TO_COVERAGE";
109 m_map[GL_SAMPLE_COVERAGE] = "SAMPLE_COVERAGE";
110
111 m_map[GL_NO_ERROR] = "NO_ERROR";
112 m_map[GL_INVALID_ENUM] = "INVALID_ENUM";
113 m_map[GL_INVALID_VALUE] = "INVALID_VALUE";
114 m_map[GL_INVALID_OPERATION] = "INVALID_OPERATION";
115 m_map[GL_OUT_OF_MEMORY] = "OUT_OF_MEMORY";
116
117 m_map[GL_CW] = "CW";
118 m_map[GL_CCW] = "CCW";
119
120 m_map[GL_LINE_WIDTH] = "LINE_WIDTH";
121 m_map[GL_ALIASED_POINT_SIZE_RANGE] = "ALIASED_POINT_SIZE_RANGE";
122 m_map[GL_ALIASED_LINE_WIDTH_RANGE] = "ALIASED_LINE_WIDTH_RANGE";
123 m_map[GL_CULL_FACE_MODE] = "CULL_FACE_MODE";
124 m_map[GL_FRONT_FACE] = "FRONT_FACE";
125 m_map[GL_DEPTH_RANGE] = "DEPTH_RANGE";
126 m_map[GL_DEPTH_WRITEMASK] = "DEPTH_WRITEMASK";
127 m_map[GL_DEPTH_CLEAR_VALUE] = "DEPTH_CLEAR_VALUE";
128 m_map[GL_DEPTH_FUNC] = "DEPTH_FUNC";
129 m_map[GL_STENCIL_CLEAR_VALUE] = "STENCIL_CLEAR_VALUE";
130 m_map[GL_STENCIL_FUNC] = "STENCIL_FUNC";
131 m_map[GL_STENCIL_FAIL] = "STENCIL_FAIL";
132 m_map[GL_STENCIL_PASS_DEPTH_FAIL] = "STENCIL_PASS_DEPTH_FAIL";
133 m_map[GL_STENCIL_PASS_DEPTH_PASS] = "STENCIL_PASS_DEPTH_PASS";
134 m_map[GL_STENCIL_REF] = "STENCIL_REF";
135 m_map[GL_STENCIL_VALUE_MASK] = "STENCIL_VALUE_MASK";
136 m_map[GL_STENCIL_WRITEMASK] = "STENCIL_WRITEMASK";
137 m_map[GL_STENCIL_BACK_FUNC] = "STENCIL_BACK_FUNC";
138 m_map[GL_STENCIL_BACK_FAIL] = "STENCIL_BACK_FAIL";
139 m_map[GL_STENCIL_BACK_PASS_DEPTH_FAIL] = "STENCIL_BACK_PASS_DEPTH_FAIL";
140 m_map[GL_STENCIL_BACK_PASS_DEPTH_PASS] = "STENCIL_BACK_PASS_DEPTH_PASS";
141 m_map[GL_STENCIL_BACK_REF] = "STENCIL_BACK_REF";
142 m_map[GL_STENCIL_BACK_VALUE_MASK] = "STENCIL_BACK_VALUE_MASK";
143 m_map[GL_STENCIL_BACK_WRITEMASK] = "STENCIL_BACK_WRITEMASK";
144 m_map[GL_VIEWPORT] = "VIEWPORT";
145 m_map[GL_SCISSOR_BOX] = "SCISSOR_BOX";
146
147 m_map[GL_COLOR_CLEAR_VALUE] = "COLOR_CLEAR_VALUE";
148 m_map[GL_COLOR_WRITEMASK] = "COLOR_WRITEMASK";
149 m_map[GL_UNPACK_ALIGNMENT] = "UNPACK_ALIGNMENT";
150 m_map[GL_PACK_ALIGNMENT] = "PACK_ALIGNMENT";
151 m_map[GL_MAX_TEXTURE_SIZE] = "MAX_TEXTURE_SIZE";
152 m_map[GL_MAX_VIEWPORT_DIMS] = "MAX_VIEWPORT_DIMS";
153 m_map[GL_SUBPIXEL_BITS] = "SUBPIXEL_BITS";
154 m_map[GL_RED_BITS] = "RED_BITS";
155 m_map[GL_GREEN_BITS] = "GREEN_BITS";
156 m_map[GL_BLUE_BITS] = "BLUE_BITS";
157 m_map[GL_ALPHA_BITS] = "ALPHA_BITS";
158 m_map[GL_DEPTH_BITS] = "DEPTH_BITS";
159 m_map[GL_STENCIL_BITS] = "STENCIL_BITS";
160 m_map[GL_POLYGON_OFFSET_UNITS] = "POLYGON_OFFSET_UNITS";
161
162 m_map[GL_POLYGON_OFFSET_FACTOR] = "POLYGON_OFFSET_FACTOR";
163 m_map[GL_TEXTURE_BINDING_2D] = "TEXTURE_BINDING_2D";
164 m_map[GL_SAMPLE_BUFFERS] = "SAMPLE_BUFFERS";
165 m_map[GL_SAMPLES] = "SAMPLES";
166 m_map[GL_SAMPLE_COVERAGE_VALUE] = "SAMPLE_COVERAGE_VALUE";
167 m_map[GL_SAMPLE_COVERAGE_INVERT] = "SAMPLE_COVERAGE_INVERT";
168
169 m_map[GL_COMPRESSED_TEXTURE_FORMATS] = "COMPRESSED_TEXTURE_FORMATS";
170
171 m_map[GL_DONT_CARE] = "DONT_CARE";
172 m_map[GL_FASTEST] = "FASTEST";
173 m_map[GL_NICEST] = "NICEST";
174
175 m_map[GL_GENERATE_MIPMAP_HINT] = "GENERATE_MIPMAP_HINT";
176
177 m_map[GL_BYTE] = "BYTE";
178 m_map[GL_UNSIGNED_BYTE] = "UNSIGNED_BYTE";
179 m_map[GL_SHORT] = "SHORT";
180 m_map[GL_UNSIGNED_SHORT] = "UNSIGNED_SHORT";
181 m_map[GL_INT] = "INT";
182 m_map[GL_UNSIGNED_INT] = "UNSIGNED_INT";
183 m_map[GL_FLOAT] = "FLOAT";
184
185 m_map[GL_DEPTH_COMPONENT] = "DEPTH_COMPONENT";
186 m_map[GL_ALPHA] = "ALPHA";
187 m_map[GL_RGB] = "RGB";
188 m_map[GL_RGBA] = "RGBA";
189 m_map[GL_LUMINANCE] = "LUMINANCE";
190 m_map[GL_LUMINANCE_ALPHA] = "LUMINANCE_ALPHA";
191
192 m_map[GL_UNSIGNED_SHORT_4_4_4_4] = "UNSIGNED_SHORT_4_4_4_4";
193 m_map[GL_UNSIGNED_SHORT_5_5_5_1] = "UNSIGNED_SHORT_5_5_5_1";
194 m_map[GL_UNSIGNED_SHORT_5_6_5] = "UNSIGNED_SHORT_5_6_5";
195
196 m_map[GL_FRAGMENT_SHADER] = "FRAGMENT_SHADER";
197 m_map[GL_VERTEX_SHADER] = "VERTEX_SHADER";
198 m_map[GL_MAX_VERTEX_ATTRIBS] = "MAX_VERTEX_ATTRIBS";
199 m_map[GL_MAX_VERTEX_UNIFORM_VECTORS] = "MAX_VERTEX_UNIFORM_VECTORS";
200 m_map[GL_MAX_VARYING_VECTORS] = "MAX_VARYING_VECTORS";
201 m_map[GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS] = "MAX_COMBINED_TEXTURE_IMAGE_UNITS";
202 m_map[GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS] = "MAX_VERTEX_TEXTURE_IMAGE_UNITS";
203 m_map[GL_MAX_TEXTURE_IMAGE_UNITS] = "MAX_TEXTURE_IMAGE_UNITS";
204 m_map[GL_MAX_FRAGMENT_UNIFORM_VECTORS] = "MAX_FRAGMENT_UNIFORM_VECTORS";
205 m_map[GL_SHADER_TYPE] = "SHADER_TYPE";
206 m_map[GL_DELETE_STATUS] = "DELETE_STATUS";
207 m_map[GL_LINK_STATUS] = "LINK_STATUS";
208 m_map[GL_VALIDATE_STATUS] = "VALIDATE_STATUS";
209 m_map[GL_ATTACHED_SHADERS] = "ATTACHED_SHADERS";
210 m_map[GL_ACTIVE_UNIFORMS] = "ACTIVE_UNIFORMS";
211 m_map[GL_ACTIVE_ATTRIBUTES] = "ACTIVE_ATTRIBUTES";
212 m_map[GL_SHADING_LANGUAGE_VERSION] = "SHADING_LANGUAGE_VERSION";
213 m_map[GL_CURRENT_PROGRAM] = "CURRENT_PROGRAM";
214
215 m_map[GL_NEVER] = "NEVER";
216 m_map[GL_LESS] = "LESS";
217 m_map[GL_EQUAL] = "EQUAL";
218 m_map[GL_LEQUAL] = "LEQUAL";
219 m_map[GL_GREATER] = "GREATER";
220 m_map[GL_NOTEQUAL] = "NOTEQUAL";
221 m_map[GL_GEQUAL] = "GEQUAL";
222 m_map[GL_ALWAYS] = "ALWAYS";
223
224 m_map[GL_KEEP] = "KEEP";
225 m_map[GL_REPLACE] = "REPLACE";
226 m_map[GL_INCR] = "INCR";
227 m_map[GL_DECR] = "DECR";
228 m_map[GL_INVERT] = "INVERT";
229 m_map[GL_INCR_WRAP] = "INCR_WRAP";
230 m_map[GL_DECR_WRAP] = "DECR_WRAP";
231
232 m_map[GL_VENDOR] = "VENDOR";
233 m_map[GL_RENDERER] = "RENDERER";
234 m_map[GL_VERSION] = "VERSION";
235
236 m_map[GL_NEAREST] = "NEAREST";
237 m_map[GL_LINEAR] = "LINEAR";
238
239 m_map[GL_NEAREST_MIPMAP_NEAREST] = "NEAREST_MIPMAP_NEAREST";
240 m_map[GL_LINEAR_MIPMAP_NEAREST] = "LINEAR_MIPMAP_NEAREST";
241 m_map[GL_NEAREST_MIPMAP_LINEAR] = "NEAREST_MIPMAP_LINEAR";
242 m_map[GL_LINEAR_MIPMAP_LINEAR] = "LINEAR_MIPMAP_LINEAR";
243
244 m_map[GL_TEXTURE_MAG_FILTER] = "TEXTURE_MAG_FILTER";
245 m_map[GL_TEXTURE_MIN_FILTER] = "TEXTURE_MIN_FILTER";
246 m_map[GL_TEXTURE_WRAP_S] = "TEXTURE_WRAP_S";
247 m_map[GL_TEXTURE_WRAP_T] = "TEXTURE_WRAP_T";
248
249 m_map[GL_TEXTURE_2D] = "TEXTURE_2D";
250 m_map[GL_TEXTURE] = "TEXTURE";
251
252 m_map[GL_TEXTURE_CUBE_MAP] = "TEXTURE_CUBE_MAP";
253 m_map[GL_TEXTURE_BINDING_CUBE_MAP] = "TEXTURE_BINDING_CUBE_MAP";
254 m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_X] = "TEXTURE_CUBE_MAP_POSITIVE_X";
255 m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_X] = "TEXTURE_CUBE_MAP_NEGATIVE_X";
256 m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_Y] = "TEXTURE_CUBE_MAP_POSITIVE_Y";
257 m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_Y] = "TEXTURE_CUBE_MAP_NEGATIVE_Y";
258 m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_Z] = "TEXTURE_CUBE_MAP_POSITIVE_Z";
259 m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_Z] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
260 m_map[GL_MAX_CUBE_MAP_TEXTURE_SIZE] = "MAX_CUBE_MAP_TEXTURE_SIZE";
261
262 m_map[GL_TEXTURE0] = "TEXTURE0";
263 m_map[GL_TEXTURE1] = "TEXTURE1";
264 m_map[GL_TEXTURE2] = "TEXTURE2";
265 m_map[GL_TEXTURE3] = "TEXTURE3";
266 m_map[GL_TEXTURE4] = "TEXTURE4";
267 m_map[GL_TEXTURE5] = "TEXTURE5";
268 m_map[GL_TEXTURE6] = "TEXTURE6";
269 m_map[GL_TEXTURE7] = "TEXTURE7";
270 m_map[GL_TEXTURE8] = "TEXTURE8";
271 m_map[GL_TEXTURE9] = "TEXTURE9";
272 m_map[GL_TEXTURE10] = "TEXTURE10";
273 m_map[GL_TEXTURE11] = "TEXTURE11";
274 m_map[GL_TEXTURE12] = "TEXTURE12";
275 m_map[GL_TEXTURE13] = "TEXTURE13";
276 m_map[GL_TEXTURE14] = "TEXTURE14";
277 m_map[GL_TEXTURE15] = "TEXTURE15";
278 m_map[GL_TEXTURE16] = "TEXTURE16";
279 m_map[GL_TEXTURE17] = "TEXTURE17";
280 m_map[GL_TEXTURE18] = "TEXTURE18";
281 m_map[GL_TEXTURE19] = "TEXTURE19";
282 m_map[GL_TEXTURE20] = "TEXTURE20";
283 m_map[GL_TEXTURE21] = "TEXTURE21";
284 m_map[GL_TEXTURE22] = "TEXTURE22";
285 m_map[GL_TEXTURE23] = "TEXTURE23";
286 m_map[GL_TEXTURE24] = "TEXTURE24";
287 m_map[GL_TEXTURE25] = "TEXTURE25";
288 m_map[GL_TEXTURE26] = "TEXTURE26";
289 m_map[GL_TEXTURE27] = "TEXTURE27";
290 m_map[GL_TEXTURE28] = "TEXTURE28";
291 m_map[GL_TEXTURE29] = "TEXTURE29";
292 m_map[GL_TEXTURE30] = "TEXTURE30";
293 m_map[GL_TEXTURE31] = "TEXTURE31";
294 m_map[GL_ACTIVE_TEXTURE] = "ACTIVE_TEXTURE";
295
296 m_map[GL_REPEAT] = "REPEAT";
297 m_map[GL_CLAMP_TO_EDGE] = "CLAMP_TO_EDGE";
298 m_map[GL_MIRRORED_REPEAT] = "MIRRORED_REPEAT";
299
300 m_map[GL_FLOAT_VEC2] = "FLOAT_VEC2";
301 m_map[GL_FLOAT_VEC3] = "FLOAT_VEC3";
302 m_map[GL_FLOAT_VEC4] = "FLOAT_VEC4";
303 m_map[GL_INT_VEC2] = "INT_VEC2";
304 m_map[GL_INT_VEC3] = "INT_VEC3";
305 m_map[GL_INT_VEC4] = "INT_VEC4";
306 m_map[GL_BOOL] = "BOOL";
307 m_map[GL_BOOL_VEC2] = "BOOL_VEC2";
308 m_map[GL_BOOL_VEC3] = "BOOL_VEC3";
309 m_map[GL_BOOL_VEC4] = "BOOL_VEC4";
310 m_map[GL_FLOAT_MAT2] = "FLOAT_MAT2";
311 m_map[GL_FLOAT_MAT3] = "FLOAT_MAT3";
312 m_map[GL_FLOAT_MAT4] = "FLOAT_MAT4";
313 m_map[GL_SAMPLER_2D] = "SAMPLER_2D";
314 m_map[GL_SAMPLER_CUBE] = "SAMPLER_CUBE";
315
316 m_map[GL_VERTEX_ATTRIB_ARRAY_ENABLED] = "VERTEX_ATTRIB_ARRAY_ENABLED";
317 m_map[GL_VERTEX_ATTRIB_ARRAY_SIZE] = "VERTEX_ATTRIB_ARRAY_SIZE";
318 m_map[GL_VERTEX_ATTRIB_ARRAY_STRIDE] = "VERTEX_ATTRIB_ARRAY_STRIDE";
319 m_map[GL_VERTEX_ATTRIB_ARRAY_TYPE] = "VERTEX_ATTRIB_ARRAY_TYPE";
320 m_map[GL_VERTEX_ATTRIB_ARRAY_NORMALIZED] = "VERTEX_ATTRIB_ARRAY_NORMALIZED";
321 m_map[GL_VERTEX_ATTRIB_ARRAY_POINTER] = "VERTEX_ATTRIB_ARRAY_POINTER";
322 m_map[GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING] = "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING";
323
324 m_map[GL_COMPILE_STATUS] = "COMPILE_STATUS";
325
326 m_map[GL_LOW_FLOAT] = "LOW_FLOAT";
327 m_map[GL_MEDIUM_FLOAT] = "MEDIUM_FLOAT";
328 m_map[GL_HIGH_FLOAT] = "HIGH_FLOAT";
329 m_map[GL_LOW_INT] = "LOW_INT";
330 m_map[GL_MEDIUM_INT] = "MEDIUM_INT";
331 m_map[GL_HIGH_INT] = "HIGH_INT";
332
333 m_map[GL_FRAMEBUFFER] = "FRAMEBUFFER";
334 m_map[GL_RENDERBUFFER] = "RENDERBUFFER";
335
336 m_map[GL_RGBA4] = "RGBA4";
337 m_map[GL_RGB5_A1] = "RGB5_A1";
338 m_map[GL_RGB565] = "RGB565";
339 m_map[GL_DEPTH_COMPONENT16] = "DEPTH_COMPONENT16";
340 m_map[GL_STENCIL_INDEX] = "STENCIL_INDEX";
341 m_map[GL_STENCIL_INDEX8] = "STENCIL_INDEX8";
342
343 m_map[GL_RENDERBUFFER_WIDTH] = "RENDERBUFFER_WIDTH";
344 m_map[GL_RENDERBUFFER_HEIGHT] = "RENDERBUFFER_HEIGHT";
345 m_map[GL_RENDERBUFFER_INTERNAL_FORMAT] = "RENDERBUFFER_INTERNAL_FORMAT";
346 m_map[GL_RENDERBUFFER_RED_SIZE] = "RENDERBUFFER_RED_SIZE";
347 m_map[GL_RENDERBUFFER_GREEN_SIZE] = "RENDERBUFFER_GREEN_SIZE";
348 m_map[GL_RENDERBUFFER_BLUE_SIZE] = "RENDERBUFFER_BLUE_SIZE";
349 m_map[GL_RENDERBUFFER_ALPHA_SIZE] = "RENDERBUFFER_ALPHA_SIZE";
350 m_map[GL_RENDERBUFFER_DEPTH_SIZE] = "RENDERBUFFER_DEPTH_SIZE";
351 m_map[GL_RENDERBUFFER_STENCIL_SIZE] = "RENDERBUFFER_STENCIL_SIZE";
352
353 m_map[GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE] = "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE";
354 m_map[GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME] = "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME";
355 m_map[GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL";
356 m_map[GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE] =
357 "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE";
358
359 m_map[GL_COLOR_ATTACHMENT0] = "COLOR_ATTACHMENT0";
360 m_map[GL_DEPTH_ATTACHMENT] = "DEPTH_ATTACHMENT";
361 m_map[GL_STENCIL_ATTACHMENT] = "STENCIL_ATTACHMENT";
362
363 m_map[GL_FRAMEBUFFER_COMPLETE] = "FRAMEBUFFER_COMPLETE";
364 m_map[GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT] = "FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
365 m_map[GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT] =
366 "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";
367 m_map[GL_FRAMEBUFFER_UNSUPPORTED] = "FRAMEBUFFER_UNSUPPORTED";
368
369 m_map[GL_FRAMEBUFFER_BINDING] = "FRAMEBUFFER_BINDING";
370#if !QT_CONFIG(opengles2)
371 m_map[GL_RENDERBUFFER_BINDING] = "RENDERBUFFER_BINDING";
372#else
373 m_map[GL_RENDERBUFFER] = "RENDERBUFFER_BINDING";
374#endif
375 m_map[GL_MAX_RENDERBUFFER_SIZE] = "MAX_RENDERBUFFER_SIZE";
376
377 m_map[GL_INVALID_FRAMEBUFFER_OPERATION] = "INVALID_FRAMEBUFFER_OPERATION";
378}
379
380QString EnumToStringMap::lookUp(const GLuint value) const
381{
382 if (m_map.contains(value))
383 return m_map[value];
384
385 return QString("0x0%1").arg(value, 0, 16);
386}
387#endif
388

source code of qtdatavis3d/src/datavisualizationqml/enumtostringmap.cpp