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