PackedGLEnums_autogen.h (14051B)
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 ShadingRate : uint8_t 391 { 392 Undefined = 0, 393 _1x1 = 1, 394 _1x2 = 2, 395 _2x1 = 3, 396 _2x2 = 4, 397 _4x2 = 5, 398 _4x4 = 6, 399 400 InvalidEnum = 7, 401 EnumCount = 7, 402 }; 403 404 template <> 405 ShadingRate FromGLenum<ShadingRate>(GLenum from); 406 GLenum ToGLenum(ShadingRate from); 407 std::ostream &operator<<(std::ostream &os, ShadingRate value); 408 409 enum class TextureCombine : uint8_t 410 { 411 Add = 0, 412 AddSigned = 1, 413 Dot3Rgb = 2, 414 Dot3Rgba = 3, 415 Interpolate = 4, 416 Modulate = 5, 417 Replace = 6, 418 Subtract = 7, 419 420 InvalidEnum = 8, 421 EnumCount = 8, 422 }; 423 424 template <> 425 TextureCombine FromGLenum<TextureCombine>(GLenum from); 426 GLenum ToGLenum(TextureCombine from); 427 std::ostream &operator<<(std::ostream &os, TextureCombine value); 428 429 enum class TextureEnvMode : uint8_t 430 { 431 Add = 0, 432 Blend = 1, 433 Combine = 2, 434 Decal = 3, 435 Modulate = 4, 436 Replace = 5, 437 438 InvalidEnum = 6, 439 EnumCount = 6, 440 }; 441 442 template <> 443 TextureEnvMode FromGLenum<TextureEnvMode>(GLenum from); 444 GLenum ToGLenum(TextureEnvMode from); 445 std::ostream &operator<<(std::ostream &os, TextureEnvMode value); 446 447 enum class TextureEnvParameter : uint8_t 448 { 449 Mode = 0, 450 Color = 1, 451 CombineRgb = 2, 452 CombineAlpha = 3, 453 RgbScale = 4, 454 AlphaScale = 5, 455 Src0Rgb = 6, 456 Src1Rgb = 7, 457 Src2Rgb = 8, 458 Src0Alpha = 9, 459 Src1Alpha = 10, 460 Src2Alpha = 11, 461 Op0Rgb = 12, 462 Op1Rgb = 13, 463 Op2Rgb = 14, 464 Op0Alpha = 15, 465 Op1Alpha = 16, 466 Op2Alpha = 17, 467 PointCoordReplace = 18, 468 469 InvalidEnum = 19, 470 EnumCount = 19, 471 }; 472 473 template <> 474 TextureEnvParameter FromGLenum<TextureEnvParameter>(GLenum from); 475 GLenum ToGLenum(TextureEnvParameter from); 476 std::ostream &operator<<(std::ostream &os, TextureEnvParameter value); 477 478 enum class TextureEnvTarget : uint8_t 479 { 480 Env = 0, 481 PointSprite = 1, 482 483 InvalidEnum = 2, 484 EnumCount = 2, 485 }; 486 487 template <> 488 TextureEnvTarget FromGLenum<TextureEnvTarget>(GLenum from); 489 GLenum ToGLenum(TextureEnvTarget from); 490 std::ostream &operator<<(std::ostream &os, TextureEnvTarget value); 491 492 enum class TextureOp : uint8_t 493 { 494 OneMinusSrcAlpha = 0, 495 OneMinusSrcColor = 1, 496 SrcAlpha = 2, 497 SrcColor = 3, 498 499 InvalidEnum = 4, 500 EnumCount = 4, 501 }; 502 503 template <> 504 TextureOp FromGLenum<TextureOp>(GLenum from); 505 GLenum ToGLenum(TextureOp from); 506 std::ostream &operator<<(std::ostream &os, TextureOp value); 507 508 enum class TextureSrc : uint8_t 509 { 510 Constant = 0, 511 Previous = 1, 512 PrimaryColor = 2, 513 Texture = 3, 514 515 InvalidEnum = 4, 516 EnumCount = 4, 517 }; 518 519 template <> 520 TextureSrc FromGLenum<TextureSrc>(GLenum from); 521 GLenum ToGLenum(TextureSrc from); 522 std::ostream &operator<<(std::ostream &os, TextureSrc value); 523 524 enum class TextureTarget : uint8_t 525 { 526 _2D = 0, 527 _2DArray = 1, 528 _2DMultisample = 2, 529 _2DMultisampleArray = 3, 530 _3D = 4, 531 External = 5, 532 Rectangle = 6, 533 CubeMapPositiveX = 7, 534 CubeMapNegativeX = 8, 535 CubeMapPositiveY = 9, 536 CubeMapNegativeY = 10, 537 CubeMapPositiveZ = 11, 538 CubeMapNegativeZ = 12, 539 CubeMapArray = 13, 540 VideoImage = 14, 541 Buffer = 15, 542 543 InvalidEnum = 16, 544 EnumCount = 16, 545 }; 546 547 template <> 548 TextureTarget FromGLenum<TextureTarget>(GLenum from); 549 GLenum ToGLenum(TextureTarget from); 550 std::ostream &operator<<(std::ostream &os, TextureTarget value); 551 552 enum class TextureType : uint8_t 553 { 554 _2D = 0, 555 _2DArray = 1, 556 _2DMultisample = 2, 557 _2DMultisampleArray = 3, 558 _3D = 4, 559 External = 5, 560 Rectangle = 6, 561 CubeMap = 7, 562 CubeMapArray = 8, 563 VideoImage = 9, 564 Buffer = 10, 565 566 InvalidEnum = 11, 567 EnumCount = 11, 568 }; 569 570 template <> 571 TextureType FromGLenum<TextureType>(GLenum from); 572 GLenum ToGLenum(TextureType from); 573 std::ostream &operator<<(std::ostream &os, TextureType value); 574 575 enum class VertexArrayType : uint8_t 576 { 577 Color = 0, 578 Normal = 1, 579 PointSize = 2, 580 TextureCoord = 3, 581 Vertex = 4, 582 583 InvalidEnum = 5, 584 EnumCount = 5, 585 }; 586 587 template <> 588 VertexArrayType FromGLenum<VertexArrayType>(GLenum from); 589 GLenum ToGLenum(VertexArrayType from); 590 std::ostream &operator<<(std::ostream &os, VertexArrayType value); 591 592 enum class WrapMode : uint8_t 593 { 594 ClampToEdge = 0, 595 ClampToBorder = 1, 596 MirroredRepeat = 2, 597 Repeat = 3, 598 599 InvalidEnum = 4, 600 EnumCount = 4, 601 }; 602 603 template <> 604 WrapMode FromGLenum<WrapMode>(GLenum from); 605 GLenum ToGLenum(WrapMode from); 606 std::ostream &operator<<(std::ostream &os, WrapMode value); 607 608 } // namespace gl 609 610 #endif // COMMON_PACKEDGLENUMS_AUTOGEN_H_