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
21namespace gl
22{
23
24template <typename Enum>
25Enum FromGLenum(GLenum from);
26
27enum 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
42template <>
43AlphaTestFunc FromGLenum<AlphaTestFunc>(GLenum from);
44GLenum ToGLenum(AlphaTestFunc from);
45
46enum 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
65template <>
66BufferBinding FromGLenum<BufferBinding>(GLenum from);
67GLenum ToGLenum(BufferBinding from);
68
69enum 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
85template <>
86BufferUsage FromGLenum<BufferUsage>(GLenum from);
87GLenum ToGLenum(BufferUsage from);
88
89enum 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
101template <>
102ClientVertexArrayType FromGLenum<ClientVertexArrayType>(GLenum from);
103GLenum ToGLenum(ClientVertexArrayType from);
104
105enum class CullFaceMode : uint8_t
106{
107 Back = 0,
108 Front = 1,
109 FrontAndBack = 2,
110
111 InvalidEnum = 3,
112 EnumCount = 3,
113};
114
115template <>
116CullFaceMode FromGLenum<CullFaceMode>(GLenum from);
117GLenum ToGLenum(CullFaceMode from);
118
119enum 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
131template <>
132FilterMode FromGLenum<FilterMode>(GLenum from);
133GLenum ToGLenum(FilterMode from);
134
135enum class FogMode : uint8_t
136{
137 Exp = 0,
138 Exp2 = 1,
139 Linear = 2,
140
141 InvalidEnum = 3,
142 EnumCount = 3,
143};
144
145template <>
146FogMode FromGLenum<FogMode>(GLenum from);
147GLenum ToGLenum(FogMode from);
148
149enum 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
160template <>
161GraphicsResetStatus FromGLenum<GraphicsResetStatus>(GLenum from);
162GLenum ToGLenum(GraphicsResetStatus from);
163
164enum class HandleType : uint8_t
165{
166 OpaqueFd = 0,
167
168 InvalidEnum = 1,
169 EnumCount = 1,
170};
171
172template <>
173HandleType FromGLenum<HandleType>(GLenum from);
174GLenum ToGLenum(HandleType from);
175
176enum class HintSetting : uint8_t
177{
178 DontCare = 0,
179 Fastest = 1,
180 Nicest = 2,
181
182 InvalidEnum = 3,
183 EnumCount = 3,
184};
185
186template <>
187HintSetting FromGLenum<HintSetting>(GLenum from);
188GLenum ToGLenum(HintSetting from);
189
190enum 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
208template <>
209LightParameter FromGLenum<LightParameter>(GLenum from);
210GLenum ToGLenum(LightParameter from);
211
212enum 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
235template <>
236LogicalOperation FromGLenum<LogicalOperation>(GLenum from);
237GLenum ToGLenum(LogicalOperation from);
238
239enum 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
252template <>
253MaterialParameter FromGLenum<MaterialParameter>(GLenum from);
254GLenum ToGLenum(MaterialParameter from);
255
256enum class MatrixType : uint8_t
257{
258 Modelview = 0,
259 Projection = 1,
260 Texture = 2,
261
262 InvalidEnum = 3,
263 EnumCount = 3,
264};
265
266template <>
267MatrixType FromGLenum<MatrixType>(GLenum from);
268GLenum ToGLenum(MatrixType from);
269
270enum 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
281template <>
282PointParameter FromGLenum<PointParameter>(GLenum from);
283GLenum ToGLenum(PointParameter from);
284
285enum class ProvokingVertex : uint8_t
286{
287 FirstVertexConvention = 0,
288 LastVertexConvention = 1,
289
290 InvalidEnum = 2,
291 EnumCount = 2,
292};
293
294template <>
295ProvokingVertex FromGLenum<ProvokingVertex>(GLenum from);
296GLenum ToGLenum(ProvokingVertex from);
297
298enum 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
312template <>
313QueryType FromGLenum<QueryType>(GLenum from);
314GLenum ToGLenum(QueryType from);
315
316enum 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
327template <>
328ShaderType FromGLenum<ShaderType>(GLenum from);
329GLenum ToGLenum(ShaderType from);
330
331enum class ShadingModel : uint8_t
332{
333 Flat = 0,
334 Smooth = 1,
335
336 InvalidEnum = 2,
337 EnumCount = 2,
338};
339
340template <>
341ShadingModel FromGLenum<ShadingModel>(GLenum from);
342GLenum ToGLenum(ShadingModel from);
343
344enum 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
359template <>
360TextureCombine FromGLenum<TextureCombine>(GLenum from);
361GLenum ToGLenum(TextureCombine from);
362
363enum 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
376template <>
377TextureEnvMode FromGLenum<TextureEnvMode>(GLenum from);
378GLenum ToGLenum(TextureEnvMode from);
379
380enum 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
406template <>
407TextureEnvParameter FromGLenum<TextureEnvParameter>(GLenum from);
408GLenum ToGLenum(TextureEnvParameter from);
409
410enum class TextureEnvTarget : uint8_t
411{
412 Env = 0,
413 PointSprite = 1,
414
415 InvalidEnum = 2,
416 EnumCount = 2,
417};
418
419template <>
420TextureEnvTarget FromGLenum<TextureEnvTarget>(GLenum from);
421GLenum ToGLenum(TextureEnvTarget from);
422
423enum 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
434template <>
435TextureOp FromGLenum<TextureOp>(GLenum from);
436GLenum ToGLenum(TextureOp from);
437
438enum 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
449template <>
450TextureSrc FromGLenum<TextureSrc>(GLenum from);
451GLenum ToGLenum(TextureSrc from);
452
453enum 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
473template <>
474TextureTarget FromGLenum<TextureTarget>(GLenum from);
475GLenum ToGLenum(TextureTarget from);
476
477enum 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
492template <>
493TextureType FromGLenum<TextureType>(GLenum from);
494GLenum ToGLenum(TextureType from);
495
496enum 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
508template <>
509VertexArrayType FromGLenum<VertexArrayType>(GLenum from);
510GLenum ToGLenum(VertexArrayType from);
511
512enum 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
523template <>
524WrapMode FromGLenum<WrapMode>(GLenum from);
525GLenum ToGLenum(WrapMode from);
526
527} // namespace gl
528
529#endif // COMMON_PACKEDGLENUMS_AUTOGEN_H_
530