1 | // GENERATED FILE - DO NOT EDIT. |
2 | // Generated by gen_packed_gl_enums.py using data from packed_gl_enums.json. |
3 | // |
4 | // Copyright 2019 The ANGLE Project Authors. All rights reserved. |
5 | // Use of this source code is governed by a BSD-style license that can be |
6 | // found in the LICENSE file. |
7 | // |
8 | // PackedGLEnums_autogen.h: |
9 | // Declares ANGLE-specific enums classes for GLenums and functions operating |
10 | // on them. |
11 | |
12 | #ifndef COMMON_PACKEDGLENUMS_AUTOGEN_H_ |
13 | #define COMMON_PACKEDGLENUMS_AUTOGEN_H_ |
14 | |
15 | #include <EGL/egl.h> |
16 | #include <EGL/eglext.h> |
17 | #include <angle_gl.h> |
18 | |
19 | #include <cstdint> |
20 | |
21 | namespace gl |
22 | { |
23 | |
24 | template <typename Enum> |
25 | Enum FromGLenum(GLenum from); |
26 | |
27 | enum class AlphaTestFunc : uint8_t |
28 | { |
29 | AlwaysPass = 0, |
30 | Equal = 1, |
31 | Gequal = 2, |
32 | Greater = 3, |
33 | Lequal = 4, |
34 | Less = 5, |
35 | Never = 6, |
36 | NotEqual = 7, |
37 | |
38 | InvalidEnum = 8, |
39 | EnumCount = 8, |
40 | }; |
41 | |
42 | template <> |
43 | AlphaTestFunc FromGLenum<AlphaTestFunc>(GLenum from); |
44 | GLenum ToGLenum(AlphaTestFunc from); |
45 | |
46 | enum class BufferBinding : uint8_t |
47 | { |
48 | Array = 0, |
49 | AtomicCounter = 1, |
50 | CopyRead = 2, |
51 | CopyWrite = 3, |
52 | DispatchIndirect = 4, |
53 | DrawIndirect = 5, |
54 | ElementArray = 6, |
55 | PixelPack = 7, |
56 | PixelUnpack = 8, |
57 | ShaderStorage = 9, |
58 | TransformFeedback = 10, |
59 | Uniform = 11, |
60 | |
61 | InvalidEnum = 12, |
62 | EnumCount = 12, |
63 | }; |
64 | |
65 | template <> |
66 | BufferBinding FromGLenum<BufferBinding>(GLenum from); |
67 | GLenum ToGLenum(BufferBinding from); |
68 | |
69 | enum class BufferUsage : uint8_t |
70 | { |
71 | DynamicCopy = 0, |
72 | DynamicDraw = 1, |
73 | DynamicRead = 2, |
74 | StaticCopy = 3, |
75 | StaticDraw = 4, |
76 | StaticRead = 5, |
77 | StreamCopy = 6, |
78 | StreamDraw = 7, |
79 | StreamRead = 8, |
80 | |
81 | InvalidEnum = 9, |
82 | EnumCount = 9, |
83 | }; |
84 | |
85 | template <> |
86 | BufferUsage FromGLenum<BufferUsage>(GLenum from); |
87 | GLenum ToGLenum(BufferUsage from); |
88 | |
89 | enum class ClientVertexArrayType : uint8_t |
90 | { |
91 | Color = 0, |
92 | Normal = 1, |
93 | PointSize = 2, |
94 | TextureCoord = 3, |
95 | Vertex = 4, |
96 | |
97 | InvalidEnum = 5, |
98 | EnumCount = 5, |
99 | }; |
100 | |
101 | template <> |
102 | ClientVertexArrayType FromGLenum<ClientVertexArrayType>(GLenum from); |
103 | GLenum ToGLenum(ClientVertexArrayType from); |
104 | |
105 | enum class CullFaceMode : uint8_t |
106 | { |
107 | Back = 0, |
108 | Front = 1, |
109 | FrontAndBack = 2, |
110 | |
111 | InvalidEnum = 3, |
112 | EnumCount = 3, |
113 | }; |
114 | |
115 | template <> |
116 | CullFaceMode FromGLenum<CullFaceMode>(GLenum from); |
117 | GLenum ToGLenum(CullFaceMode from); |
118 | |
119 | enum class FilterMode : uint8_t |
120 | { |
121 | Nearest = 0, |
122 | Linear = 1, |
123 | NearestMipmapNearest = 2, |
124 | NearestMipmapLinear = 3, |
125 | LinearMipmapLinear = 4, |
126 | |
127 | InvalidEnum = 5, |
128 | EnumCount = 5, |
129 | }; |
130 | |
131 | template <> |
132 | FilterMode FromGLenum<FilterMode>(GLenum from); |
133 | GLenum ToGLenum(FilterMode from); |
134 | |
135 | enum class FogMode : uint8_t |
136 | { |
137 | Exp = 0, |
138 | Exp2 = 1, |
139 | Linear = 2, |
140 | |
141 | InvalidEnum = 3, |
142 | EnumCount = 3, |
143 | }; |
144 | |
145 | template <> |
146 | FogMode FromGLenum<FogMode>(GLenum from); |
147 | GLenum ToGLenum(FogMode from); |
148 | |
149 | enum class GraphicsResetStatus : uint8_t |
150 | { |
151 | NoError = 0, |
152 | GuiltyContextReset = 1, |
153 | InnocentContextReset = 2, |
154 | UnknownContextReset = 3, |
155 | |
156 | InvalidEnum = 4, |
157 | EnumCount = 4, |
158 | }; |
159 | |
160 | template <> |
161 | GraphicsResetStatus FromGLenum<GraphicsResetStatus>(GLenum from); |
162 | GLenum ToGLenum(GraphicsResetStatus from); |
163 | |
164 | enum class HandleType : uint8_t |
165 | { |
166 | OpaqueFd = 0, |
167 | |
168 | InvalidEnum = 1, |
169 | EnumCount = 1, |
170 | }; |
171 | |
172 | template <> |
173 | HandleType FromGLenum<HandleType>(GLenum from); |
174 | GLenum ToGLenum(HandleType from); |
175 | |
176 | enum class HintSetting : uint8_t |
177 | { |
178 | DontCare = 0, |
179 | Fastest = 1, |
180 | Nicest = 2, |
181 | |
182 | InvalidEnum = 3, |
183 | EnumCount = 3, |
184 | }; |
185 | |
186 | template <> |
187 | HintSetting FromGLenum<HintSetting>(GLenum from); |
188 | GLenum ToGLenum(HintSetting from); |
189 | |
190 | enum class LightParameter : uint8_t |
191 | { |
192 | Ambient = 0, |
193 | AmbientAndDiffuse = 1, |
194 | ConstantAttenuation = 2, |
195 | Diffuse = 3, |
196 | LinearAttenuation = 4, |
197 | Position = 5, |
198 | QuadraticAttenuation = 6, |
199 | Specular = 7, |
200 | SpotCutoff = 8, |
201 | SpotDirection = 9, |
202 | SpotExponent = 10, |
203 | |
204 | InvalidEnum = 11, |
205 | EnumCount = 11, |
206 | }; |
207 | |
208 | template <> |
209 | LightParameter FromGLenum<LightParameter>(GLenum from); |
210 | GLenum ToGLenum(LightParameter from); |
211 | |
212 | enum class LogicalOperation : uint8_t |
213 | { |
214 | And = 0, |
215 | AndInverted = 1, |
216 | AndReverse = 2, |
217 | Clear = 3, |
218 | Copy = 4, |
219 | CopyInverted = 5, |
220 | Equiv = 6, |
221 | Invert = 7, |
222 | Nand = 8, |
223 | Noop = 9, |
224 | Nor = 10, |
225 | Or = 11, |
226 | OrInverted = 12, |
227 | OrReverse = 13, |
228 | Set = 14, |
229 | Xor = 15, |
230 | |
231 | InvalidEnum = 16, |
232 | EnumCount = 16, |
233 | }; |
234 | |
235 | template <> |
236 | LogicalOperation FromGLenum<LogicalOperation>(GLenum from); |
237 | GLenum ToGLenum(LogicalOperation from); |
238 | |
239 | enum class MaterialParameter : uint8_t |
240 | { |
241 | Ambient = 0, |
242 | AmbientAndDiffuse = 1, |
243 | Diffuse = 2, |
244 | Emission = 3, |
245 | Shininess = 4, |
246 | Specular = 5, |
247 | |
248 | InvalidEnum = 6, |
249 | EnumCount = 6, |
250 | }; |
251 | |
252 | template <> |
253 | MaterialParameter FromGLenum<MaterialParameter>(GLenum from); |
254 | GLenum ToGLenum(MaterialParameter from); |
255 | |
256 | enum class MatrixType : uint8_t |
257 | { |
258 | Modelview = 0, |
259 | Projection = 1, |
260 | Texture = 2, |
261 | |
262 | InvalidEnum = 3, |
263 | EnumCount = 3, |
264 | }; |
265 | |
266 | template <> |
267 | MatrixType FromGLenum<MatrixType>(GLenum from); |
268 | GLenum ToGLenum(MatrixType from); |
269 | |
270 | enum class PointParameter : uint8_t |
271 | { |
272 | PointSizeMin = 0, |
273 | PointSizeMax = 1, |
274 | PointFadeThresholdSize = 2, |
275 | PointDistanceAttenuation = 3, |
276 | |
277 | InvalidEnum = 4, |
278 | EnumCount = 4, |
279 | }; |
280 | |
281 | template <> |
282 | PointParameter FromGLenum<PointParameter>(GLenum from); |
283 | GLenum ToGLenum(PointParameter from); |
284 | |
285 | enum class ProvokingVertex : uint8_t |
286 | { |
287 | FirstVertexConvention = 0, |
288 | LastVertexConvention = 1, |
289 | |
290 | InvalidEnum = 2, |
291 | EnumCount = 2, |
292 | }; |
293 | |
294 | template <> |
295 | ProvokingVertex FromGLenum<ProvokingVertex>(GLenum from); |
296 | GLenum ToGLenum(ProvokingVertex from); |
297 | |
298 | enum class QueryType : uint8_t |
299 | { |
300 | AnySamples = 0, |
301 | AnySamplesConservative = 1, |
302 | CommandsCompleted = 2, |
303 | PrimitivesGenerated = 3, |
304 | TimeElapsed = 4, |
305 | Timestamp = 5, |
306 | TransformFeedbackPrimitivesWritten = 6, |
307 | |
308 | InvalidEnum = 7, |
309 | EnumCount = 7, |
310 | }; |
311 | |
312 | template <> |
313 | QueryType FromGLenum<QueryType>(GLenum from); |
314 | GLenum ToGLenum(QueryType from); |
315 | |
316 | enum class ShaderType : uint8_t |
317 | { |
318 | Vertex = 0, |
319 | Fragment = 1, |
320 | Geometry = 2, |
321 | Compute = 3, |
322 | |
323 | InvalidEnum = 4, |
324 | EnumCount = 4, |
325 | }; |
326 | |
327 | template <> |
328 | ShaderType FromGLenum<ShaderType>(GLenum from); |
329 | GLenum ToGLenum(ShaderType from); |
330 | |
331 | enum class ShadingModel : uint8_t |
332 | { |
333 | Flat = 0, |
334 | Smooth = 1, |
335 | |
336 | InvalidEnum = 2, |
337 | EnumCount = 2, |
338 | }; |
339 | |
340 | template <> |
341 | ShadingModel FromGLenum<ShadingModel>(GLenum from); |
342 | GLenum ToGLenum(ShadingModel from); |
343 | |
344 | enum class TextureCombine : uint8_t |
345 | { |
346 | Add = 0, |
347 | AddSigned = 1, |
348 | Dot3Rgb = 2, |
349 | Dot3Rgba = 3, |
350 | Interpolate = 4, |
351 | Modulate = 5, |
352 | Replace = 6, |
353 | Subtract = 7, |
354 | |
355 | InvalidEnum = 8, |
356 | EnumCount = 8, |
357 | }; |
358 | |
359 | template <> |
360 | TextureCombine FromGLenum<TextureCombine>(GLenum from); |
361 | GLenum ToGLenum(TextureCombine from); |
362 | |
363 | enum class TextureEnvMode : uint8_t |
364 | { |
365 | Add = 0, |
366 | Blend = 1, |
367 | Combine = 2, |
368 | Decal = 3, |
369 | Modulate = 4, |
370 | Replace = 5, |
371 | |
372 | InvalidEnum = 6, |
373 | EnumCount = 6, |
374 | }; |
375 | |
376 | template <> |
377 | TextureEnvMode FromGLenum<TextureEnvMode>(GLenum from); |
378 | GLenum ToGLenum(TextureEnvMode from); |
379 | |
380 | enum class TextureEnvParameter : uint8_t |
381 | { |
382 | Mode = 0, |
383 | Color = 1, |
384 | CombineRgb = 2, |
385 | CombineAlpha = 3, |
386 | RgbScale = 4, |
387 | AlphaScale = 5, |
388 | Src0Rgb = 6, |
389 | Src1Rgb = 7, |
390 | Src2Rgb = 8, |
391 | Src0Alpha = 9, |
392 | Src1Alpha = 10, |
393 | Src2Alpha = 11, |
394 | Op0Rgb = 12, |
395 | Op1Rgb = 13, |
396 | Op2Rgb = 14, |
397 | Op0Alpha = 15, |
398 | Op1Alpha = 16, |
399 | Op2Alpha = 17, |
400 | PointCoordReplace = 18, |
401 | |
402 | InvalidEnum = 19, |
403 | EnumCount = 19, |
404 | }; |
405 | |
406 | template <> |
407 | TextureEnvParameter FromGLenum<TextureEnvParameter>(GLenum from); |
408 | GLenum ToGLenum(TextureEnvParameter from); |
409 | |
410 | enum class TextureEnvTarget : uint8_t |
411 | { |
412 | Env = 0, |
413 | PointSprite = 1, |
414 | |
415 | InvalidEnum = 2, |
416 | EnumCount = 2, |
417 | }; |
418 | |
419 | template <> |
420 | TextureEnvTarget FromGLenum<TextureEnvTarget>(GLenum from); |
421 | GLenum ToGLenum(TextureEnvTarget from); |
422 | |
423 | enum class TextureOp : uint8_t |
424 | { |
425 | OneMinusSrcAlpha = 0, |
426 | OneMinusSrcColor = 1, |
427 | SrcAlpha = 2, |
428 | SrcColor = 3, |
429 | |
430 | InvalidEnum = 4, |
431 | EnumCount = 4, |
432 | }; |
433 | |
434 | template <> |
435 | TextureOp FromGLenum<TextureOp>(GLenum from); |
436 | GLenum ToGLenum(TextureOp from); |
437 | |
438 | enum class TextureSrc : uint8_t |
439 | { |
440 | Constant = 0, |
441 | Previous = 1, |
442 | PrimaryColor = 2, |
443 | Texture = 3, |
444 | |
445 | InvalidEnum = 4, |
446 | EnumCount = 4, |
447 | }; |
448 | |
449 | template <> |
450 | TextureSrc FromGLenum<TextureSrc>(GLenum from); |
451 | GLenum ToGLenum(TextureSrc from); |
452 | |
453 | enum class TextureTarget : uint8_t |
454 | { |
455 | _2D = 0, |
456 | _2DArray = 1, |
457 | _2DMultisample = 2, |
458 | _2DMultisampleArray = 3, |
459 | _3D = 4, |
460 | External = 5, |
461 | Rectangle = 6, |
462 | CubeMapPositiveX = 7, |
463 | CubeMapNegativeX = 8, |
464 | CubeMapPositiveY = 9, |
465 | CubeMapNegativeY = 10, |
466 | CubeMapPositiveZ = 11, |
467 | CubeMapNegativeZ = 12, |
468 | |
469 | InvalidEnum = 13, |
470 | EnumCount = 13, |
471 | }; |
472 | |
473 | template <> |
474 | TextureTarget FromGLenum<TextureTarget>(GLenum from); |
475 | GLenum ToGLenum(TextureTarget from); |
476 | |
477 | enum class TextureType : uint8_t |
478 | { |
479 | _2D = 0, |
480 | _2DArray = 1, |
481 | _2DMultisample = 2, |
482 | _2DMultisampleArray = 3, |
483 | _3D = 4, |
484 | External = 5, |
485 | Rectangle = 6, |
486 | CubeMap = 7, |
487 | |
488 | InvalidEnum = 8, |
489 | EnumCount = 8, |
490 | }; |
491 | |
492 | template <> |
493 | TextureType FromGLenum<TextureType>(GLenum from); |
494 | GLenum ToGLenum(TextureType from); |
495 | |
496 | enum class VertexArrayType : uint8_t |
497 | { |
498 | Color = 0, |
499 | Normal = 1, |
500 | PointSize = 2, |
501 | TextureCoord = 3, |
502 | Vertex = 4, |
503 | |
504 | InvalidEnum = 5, |
505 | EnumCount = 5, |
506 | }; |
507 | |
508 | template <> |
509 | VertexArrayType FromGLenum<VertexArrayType>(GLenum from); |
510 | GLenum ToGLenum(VertexArrayType from); |
511 | |
512 | enum class WrapMode : uint8_t |
513 | { |
514 | ClampToEdge = 0, |
515 | ClampToBorder = 1, |
516 | MirroredRepeat = 2, |
517 | Repeat = 3, |
518 | |
519 | InvalidEnum = 4, |
520 | EnumCount = 4, |
521 | }; |
522 | |
523 | template <> |
524 | WrapMode FromGLenum<WrapMode>(GLenum from); |
525 | GLenum ToGLenum(WrapMode from); |
526 | |
527 | } // namespace gl |
528 | |
529 | #endif // COMMON_PACKEDGLENUMS_AUTOGEN_H_ |
530 | |