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 ClipDepthMode : uint8_t 110 { 111 NegativeOneToOne = 0, 112 ZeroToOne = 1, 113 114 InvalidEnum = 2, 115 EnumCount = 2, 116 }; 117 118 template <> 119 ClipDepthMode FromGLenum<ClipDepthMode>(GLenum from); 120 GLenum ToGLenum(ClipDepthMode from); 121 std::ostream &operator<<(std::ostream &os, ClipDepthMode value); 122 123 enum class ClipOrigin : uint8_t 124 { 125 LowerLeft = 0, 126 UpperLeft = 1, 127 128 InvalidEnum = 2, 129 EnumCount = 2, 130 }; 131 132 template <> 133 ClipOrigin FromGLenum<ClipOrigin>(GLenum from); 134 GLenum ToGLenum(ClipOrigin from); 135 std::ostream &operator<<(std::ostream &os, ClipOrigin value); 136 137 enum class CullFaceMode : uint8_t 138 { 139 Back = 0, 140 Front = 1, 141 FrontAndBack = 2, 142 143 InvalidEnum = 3, 144 EnumCount = 3, 145 }; 146 147 template <> 148 CullFaceMode FromGLenum<CullFaceMode>(GLenum from); 149 GLenum ToGLenum(CullFaceMode from); 150 std::ostream &operator<<(std::ostream &os, CullFaceMode value); 151 152 enum class FilterMode : uint8_t 153 { 154 Nearest = 0, 155 Linear = 1, 156 NearestMipmapNearest = 2, 157 NearestMipmapLinear = 3, 158 LinearMipmapLinear = 4, 159 160 InvalidEnum = 5, 161 EnumCount = 5, 162 }; 163 164 template <> 165 FilterMode FromGLenum<FilterMode>(GLenum from); 166 GLenum ToGLenum(FilterMode from); 167 std::ostream &operator<<(std::ostream &os, FilterMode value); 168 169 enum class FogMode : uint8_t 170 { 171 Exp = 0, 172 Exp2 = 1, 173 Linear = 2, 174 175 InvalidEnum = 3, 176 EnumCount = 3, 177 }; 178 179 template <> 180 FogMode FromGLenum<FogMode>(GLenum from); 181 GLenum ToGLenum(FogMode from); 182 std::ostream &operator<<(std::ostream &os, FogMode value); 183 184 enum class GraphicsResetStatus : uint8_t 185 { 186 NoError = 0, 187 GuiltyContextReset = 1, 188 InnocentContextReset = 2, 189 UnknownContextReset = 3, 190 PurgedContextResetNV = 4, 191 192 InvalidEnum = 5, 193 EnumCount = 5, 194 }; 195 196 template <> 197 GraphicsResetStatus FromGLenum<GraphicsResetStatus>(GLenum from); 198 GLenum ToGLenum(GraphicsResetStatus from); 199 std::ostream &operator<<(std::ostream &os, GraphicsResetStatus value); 200 201 enum class HandleType : uint8_t 202 { 203 OpaqueFd = 0, 204 ZirconVmo = 1, 205 ZirconEvent = 2, 206 207 InvalidEnum = 3, 208 EnumCount = 3, 209 }; 210 211 template <> 212 HandleType FromGLenum<HandleType>(GLenum from); 213 GLenum ToGLenum(HandleType from); 214 std::ostream &operator<<(std::ostream &os, HandleType value); 215 216 enum class HintSetting : uint8_t 217 { 218 DontCare = 0, 219 Fastest = 1, 220 Nicest = 2, 221 222 InvalidEnum = 3, 223 EnumCount = 3, 224 }; 225 226 template <> 227 HintSetting FromGLenum<HintSetting>(GLenum from); 228 GLenum ToGLenum(HintSetting from); 229 std::ostream &operator<<(std::ostream &os, HintSetting value); 230 231 enum class ImageLayout : uint8_t 232 { 233 Undefined = 0, 234 General = 1, 235 ColorAttachment = 2, 236 DepthStencilAttachment = 3, 237 DepthStencilReadOnlyAttachment = 4, 238 ShaderReadOnly = 5, 239 TransferSrc = 6, 240 TransferDst = 7, 241 DepthReadOnlyStencilAttachment = 8, 242 DepthAttachmentStencilReadOnly = 9, 243 244 InvalidEnum = 10, 245 EnumCount = 10, 246 }; 247 248 template <> 249 ImageLayout FromGLenum<ImageLayout>(GLenum from); 250 GLenum ToGLenum(ImageLayout from); 251 std::ostream &operator<<(std::ostream &os, ImageLayout value); 252 253 enum class LightParameter : uint8_t 254 { 255 Ambient = 0, 256 AmbientAndDiffuse = 1, 257 ConstantAttenuation = 2, 258 Diffuse = 3, 259 LinearAttenuation = 4, 260 Position = 5, 261 QuadraticAttenuation = 6, 262 Specular = 7, 263 SpotCutoff = 8, 264 SpotDirection = 9, 265 SpotExponent = 10, 266 267 InvalidEnum = 11, 268 EnumCount = 11, 269 }; 270 271 template <> 272 LightParameter FromGLenum<LightParameter>(GLenum from); 273 GLenum ToGLenum(LightParameter from); 274 std::ostream &operator<<(std::ostream &os, LightParameter value); 275 276 enum class LogicalOperation : uint8_t 277 { 278 And = 0, 279 AndInverted = 1, 280 AndReverse = 2, 281 Clear = 3, 282 Copy = 4, 283 CopyInverted = 5, 284 Equiv = 6, 285 Invert = 7, 286 Nand = 8, 287 Noop = 9, 288 Nor = 10, 289 Or = 11, 290 OrInverted = 12, 291 OrReverse = 13, 292 Set = 14, 293 Xor = 15, 294 295 InvalidEnum = 16, 296 EnumCount = 16, 297 }; 298 299 template <> 300 LogicalOperation FromGLenum<LogicalOperation>(GLenum from); 301 GLenum ToGLenum(LogicalOperation from); 302 std::ostream &operator<<(std::ostream &os, LogicalOperation value); 303 304 enum class MaterialParameter : uint8_t 305 { 306 Ambient = 0, 307 AmbientAndDiffuse = 1, 308 Diffuse = 2, 309 Emission = 3, 310 Shininess = 4, 311 Specular = 5, 312 313 InvalidEnum = 6, 314 EnumCount = 6, 315 }; 316 317 template <> 318 MaterialParameter FromGLenum<MaterialParameter>(GLenum from); 319 GLenum ToGLenum(MaterialParameter from); 320 std::ostream &operator<<(std::ostream &os, MaterialParameter value); 321 322 enum class MatrixType : uint8_t 323 { 324 Modelview = 0, 325 Projection = 1, 326 Texture = 2, 327 328 InvalidEnum = 3, 329 EnumCount = 3, 330 }; 331 332 template <> 333 MatrixType FromGLenum<MatrixType>(GLenum from); 334 GLenum ToGLenum(MatrixType from); 335 std::ostream &operator<<(std::ostream &os, MatrixType value); 336 337 enum class PointParameter : uint8_t 338 { 339 PointSizeMin = 0, 340 PointSizeMax = 1, 341 PointFadeThresholdSize = 2, 342 PointDistanceAttenuation = 3, 343 344 InvalidEnum = 4, 345 EnumCount = 4, 346 }; 347 348 template <> 349 PointParameter FromGLenum<PointParameter>(GLenum from); 350 GLenum ToGLenum(PointParameter from); 351 std::ostream &operator<<(std::ostream &os, PointParameter value); 352 353 enum class PolygonMode : uint8_t 354 { 355 Point = 0, 356 Line = 1, 357 Fill = 2, 358 359 InvalidEnum = 3, 360 EnumCount = 3, 361 }; 362 363 template <> 364 PolygonMode FromGLenum<PolygonMode>(GLenum from); 365 GLenum ToGLenum(PolygonMode from); 366 std::ostream &operator<<(std::ostream &os, PolygonMode value); 367 368 enum class ProvokingVertexConvention : uint8_t 369 { 370 FirstVertexConvention = 0, 371 LastVertexConvention = 1, 372 373 InvalidEnum = 2, 374 EnumCount = 2, 375 }; 376 377 template <> 378 ProvokingVertexConvention FromGLenum<ProvokingVertexConvention>(GLenum from); 379 GLenum ToGLenum(ProvokingVertexConvention from); 380 std::ostream &operator<<(std::ostream &os, ProvokingVertexConvention value); 381 382 enum class QueryType : uint8_t 383 { 384 AnySamples = 0, 385 AnySamplesConservative = 1, 386 CommandsCompleted = 2, 387 PrimitivesGenerated = 3, 388 TimeElapsed = 4, 389 Timestamp = 5, 390 TransformFeedbackPrimitivesWritten = 6, 391 392 InvalidEnum = 7, 393 EnumCount = 7, 394 }; 395 396 template <> 397 QueryType FromGLenum<QueryType>(GLenum from); 398 GLenum ToGLenum(QueryType from); 399 std::ostream &operator<<(std::ostream &os, QueryType value); 400 401 enum class ShaderType : uint8_t 402 { 403 Vertex = 0, 404 TessControl = 1, 405 TessEvaluation = 2, 406 Geometry = 3, 407 Fragment = 4, 408 Compute = 5, 409 410 InvalidEnum = 6, 411 EnumCount = 6, 412 }; 413 414 template <> 415 ShaderType FromGLenum<ShaderType>(GLenum from); 416 GLenum ToGLenum(ShaderType from); 417 std::ostream &operator<<(std::ostream &os, ShaderType value); 418 419 enum class ShadingModel : uint8_t 420 { 421 Flat = 0, 422 Smooth = 1, 423 424 InvalidEnum = 2, 425 EnumCount = 2, 426 }; 427 428 template <> 429 ShadingModel FromGLenum<ShadingModel>(GLenum from); 430 GLenum ToGLenum(ShadingModel from); 431 std::ostream &operator<<(std::ostream &os, ShadingModel value); 432 433 enum class ShadingRate : uint8_t 434 { 435 Undefined = 0, 436 _1x1 = 1, 437 _1x2 = 2, 438 _2x1 = 3, 439 _2x2 = 4, 440 _4x2 = 5, 441 _4x4 = 6, 442 443 InvalidEnum = 7, 444 EnumCount = 7, 445 }; 446 447 template <> 448 ShadingRate FromGLenum<ShadingRate>(GLenum from); 449 GLenum ToGLenum(ShadingRate from); 450 std::ostream &operator<<(std::ostream &os, ShadingRate value); 451 452 enum class TextureCombine : uint8_t 453 { 454 Add = 0, 455 AddSigned = 1, 456 Dot3Rgb = 2, 457 Dot3Rgba = 3, 458 Interpolate = 4, 459 Modulate = 5, 460 Replace = 6, 461 Subtract = 7, 462 463 InvalidEnum = 8, 464 EnumCount = 8, 465 }; 466 467 template <> 468 TextureCombine FromGLenum<TextureCombine>(GLenum from); 469 GLenum ToGLenum(TextureCombine from); 470 std::ostream &operator<<(std::ostream &os, TextureCombine value); 471 472 enum class TextureEnvMode : uint8_t 473 { 474 Add = 0, 475 Blend = 1, 476 Combine = 2, 477 Decal = 3, 478 Modulate = 4, 479 Replace = 5, 480 481 InvalidEnum = 6, 482 EnumCount = 6, 483 }; 484 485 template <> 486 TextureEnvMode FromGLenum<TextureEnvMode>(GLenum from); 487 GLenum ToGLenum(TextureEnvMode from); 488 std::ostream &operator<<(std::ostream &os, TextureEnvMode value); 489 490 enum class TextureEnvParameter : uint8_t 491 { 492 Mode = 0, 493 Color = 1, 494 CombineRgb = 2, 495 CombineAlpha = 3, 496 RgbScale = 4, 497 AlphaScale = 5, 498 Src0Rgb = 6, 499 Src1Rgb = 7, 500 Src2Rgb = 8, 501 Src0Alpha = 9, 502 Src1Alpha = 10, 503 Src2Alpha = 11, 504 Op0Rgb = 12, 505 Op1Rgb = 13, 506 Op2Rgb = 14, 507 Op0Alpha = 15, 508 Op1Alpha = 16, 509 Op2Alpha = 17, 510 PointCoordReplace = 18, 511 512 InvalidEnum = 19, 513 EnumCount = 19, 514 }; 515 516 template <> 517 TextureEnvParameter FromGLenum<TextureEnvParameter>(GLenum from); 518 GLenum ToGLenum(TextureEnvParameter from); 519 std::ostream &operator<<(std::ostream &os, TextureEnvParameter value); 520 521 enum class TextureEnvTarget : uint8_t 522 { 523 Env = 0, 524 PointSprite = 1, 525 526 InvalidEnum = 2, 527 EnumCount = 2, 528 }; 529 530 template <> 531 TextureEnvTarget FromGLenum<TextureEnvTarget>(GLenum from); 532 GLenum ToGLenum(TextureEnvTarget from); 533 std::ostream &operator<<(std::ostream &os, TextureEnvTarget value); 534 535 enum class TextureOp : uint8_t 536 { 537 OneMinusSrcAlpha = 0, 538 OneMinusSrcColor = 1, 539 SrcAlpha = 2, 540 SrcColor = 3, 541 542 InvalidEnum = 4, 543 EnumCount = 4, 544 }; 545 546 template <> 547 TextureOp FromGLenum<TextureOp>(GLenum from); 548 GLenum ToGLenum(TextureOp from); 549 std::ostream &operator<<(std::ostream &os, TextureOp value); 550 551 enum class TextureSrc : uint8_t 552 { 553 Constant = 0, 554 Previous = 1, 555 PrimaryColor = 2, 556 Texture = 3, 557 558 InvalidEnum = 4, 559 EnumCount = 4, 560 }; 561 562 template <> 563 TextureSrc FromGLenum<TextureSrc>(GLenum from); 564 GLenum ToGLenum(TextureSrc from); 565 std::ostream &operator<<(std::ostream &os, TextureSrc value); 566 567 enum class TextureTarget : uint8_t 568 { 569 _2D = 0, 570 _2DArray = 1, 571 _2DMultisample = 2, 572 _2DMultisampleArray = 3, 573 _3D = 4, 574 External = 5, 575 Rectangle = 6, 576 CubeMapPositiveX = 7, 577 CubeMapNegativeX = 8, 578 CubeMapPositiveY = 9, 579 CubeMapNegativeY = 10, 580 CubeMapPositiveZ = 11, 581 CubeMapNegativeZ = 12, 582 CubeMapArray = 13, 583 VideoImage = 14, 584 Buffer = 15, 585 586 InvalidEnum = 16, 587 EnumCount = 16, 588 }; 589 590 template <> 591 TextureTarget FromGLenum<TextureTarget>(GLenum from); 592 GLenum ToGLenum(TextureTarget from); 593 std::ostream &operator<<(std::ostream &os, TextureTarget value); 594 595 enum class TextureType : uint8_t 596 { 597 _2D = 0, 598 _2DArray = 1, 599 _2DMultisample = 2, 600 _2DMultisampleArray = 3, 601 _3D = 4, 602 External = 5, 603 Rectangle = 6, 604 CubeMap = 7, 605 CubeMapArray = 8, 606 VideoImage = 9, 607 Buffer = 10, 608 609 InvalidEnum = 11, 610 EnumCount = 11, 611 }; 612 613 template <> 614 TextureType FromGLenum<TextureType>(GLenum from); 615 GLenum ToGLenum(TextureType from); 616 std::ostream &operator<<(std::ostream &os, TextureType value); 617 618 enum class TilingMode : uint8_t 619 { 620 Optimal = 0, 621 Linear = 1, 622 623 InvalidEnum = 2, 624 EnumCount = 2, 625 }; 626 627 template <> 628 TilingMode FromGLenum<TilingMode>(GLenum from); 629 GLenum ToGLenum(TilingMode from); 630 std::ostream &operator<<(std::ostream &os, TilingMode value); 631 632 enum class VertexArrayType : uint8_t 633 { 634 Color = 0, 635 Normal = 1, 636 PointSize = 2, 637 TextureCoord = 3, 638 Vertex = 4, 639 640 InvalidEnum = 5, 641 EnumCount = 5, 642 }; 643 644 template <> 645 VertexArrayType FromGLenum<VertexArrayType>(GLenum from); 646 GLenum ToGLenum(VertexArrayType from); 647 std::ostream &operator<<(std::ostream &os, VertexArrayType value); 648 649 enum class WrapMode : uint8_t 650 { 651 ClampToEdge = 0, 652 ClampToBorder = 1, 653 MirroredRepeat = 2, 654 Repeat = 3, 655 656 InvalidEnum = 4, 657 EnumCount = 4, 658 }; 659 660 template <> 661 WrapMode FromGLenum<WrapMode>(GLenum from); 662 GLenum ToGLenum(WrapMode from); 663 std::ostream &operator<<(std::ostream &os, WrapMode value); 664 665 } // namespace gl 666 667 #endif // COMMON_PACKEDGLENUMS_AUTOGEN_H_ 668