// GENERATED FILE - DO NOT EDIT. // Generated by gen_packed_gl_enums.py using data from packed_gl_enums.json. // // Copyright 2017 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // PackedGLEnums_autogen.h: // Declares ANGLE-specific enums classes for GLenums and functions operating // on them. #ifndef COMMON_PACKEDGLENUMS_AUTOGEN_H_ #define COMMON_PACKEDGLENUMS_AUTOGEN_H_ #include #include #include namespace gl { template Enum FromGLenum(GLenum from); enum class AlphaTestFunc : uint8_t { AlwaysPass = 0, Equal = 1, Gequal = 2, Greater = 3, Lequal = 4, Less = 5, Never = 6, NotEqual = 7, InvalidEnum = 8, EnumCount = 8, }; template <> AlphaTestFunc FromGLenum(GLenum from); GLenum ToGLenum(AlphaTestFunc from); std::ostream &operator<<(std::ostream &os, AlphaTestFunc value); enum class BufferBinding : uint8_t { Array = 0, AtomicCounter = 1, CopyRead = 2, CopyWrite = 3, DispatchIndirect = 4, DrawIndirect = 5, ElementArray = 6, PixelPack = 7, PixelUnpack = 8, ShaderStorage = 9, Texture = 10, TransformFeedback = 11, Uniform = 12, InvalidEnum = 13, EnumCount = 13, }; template <> BufferBinding FromGLenum(GLenum from); GLenum ToGLenum(BufferBinding from); std::ostream &operator<<(std::ostream &os, BufferBinding value); enum class BufferParam : uint8_t { ImmutableStorage = 0, StorageFlags = 1, BufferSize = 2, BufferUsage = 3, BufferAccess = 4, BufferMapped = 5, BufferAccessFlags = 6, BufferMapLength = 7, BufferMapOffset = 8, MemorySize = 9, ResourceInitialized = 10, InvalidEnum = 11, EnumCount = 11, }; template <> BufferParam FromGLenum(GLenum from); GLenum ToGLenum(BufferParam from); std::ostream &operator<<(std::ostream &os, BufferParam value); enum class BufferUsage : uint8_t { DynamicCopy = 0, DynamicDraw = 1, DynamicRead = 2, StaticCopy = 3, StaticDraw = 4, StaticRead = 5, StreamCopy = 6, StreamDraw = 7, StreamRead = 8, InvalidEnum = 9, EnumCount = 9, }; template <> BufferUsage FromGLenum(GLenum from); GLenum ToGLenum(BufferUsage from); std::ostream &operator<<(std::ostream &os, BufferUsage value); enum class ClientVertexArrayType : uint8_t { Color = 0, Normal = 1, PointSize = 2, TextureCoord = 3, Vertex = 4, InvalidEnum = 5, EnumCount = 5, }; template <> ClientVertexArrayType FromGLenum(GLenum from); GLenum ToGLenum(ClientVertexArrayType from); std::ostream &operator<<(std::ostream &os, ClientVertexArrayType value); enum class ClipDepthMode : uint8_t { NegativeOneToOne = 0, ZeroToOne = 1, InvalidEnum = 2, EnumCount = 2, }; template <> ClipDepthMode FromGLenum(GLenum from); GLenum ToGLenum(ClipDepthMode from); std::ostream &operator<<(std::ostream &os, ClipDepthMode value); enum class ClipOrigin : uint8_t { LowerLeft = 0, UpperLeft = 1, InvalidEnum = 2, EnumCount = 2, }; template <> ClipOrigin FromGLenum(GLenum from); GLenum ToGLenum(ClipOrigin from); std::ostream &operator<<(std::ostream &os, ClipOrigin value); enum class CombinerOp : uint8_t { Undefined = 0, Keep = 1, Replace = 2, Min = 3, Max = 4, Mul = 5, InvalidEnum = 6, EnumCount = 6, }; template <> CombinerOp FromGLenum(GLenum from); GLenum ToGLenum(CombinerOp from); std::ostream &operator<<(std::ostream &os, CombinerOp value); enum class CullFaceMode : uint8_t { Back = 0, Front = 1, FrontAndBack = 2, InvalidEnum = 3, EnumCount = 3, }; template <> CullFaceMode FromGLenum(GLenum from); GLenum ToGLenum(CullFaceMode from); std::ostream &operator<<(std::ostream &os, CullFaceMode value); enum class FilterMode : uint8_t { Nearest = 0, Linear = 1, NearestMipmapNearest = 2, NearestMipmapLinear = 3, LinearMipmapLinear = 4, InvalidEnum = 5, EnumCount = 5, }; template <> FilterMode FromGLenum(GLenum from); GLenum ToGLenum(FilterMode from); std::ostream &operator<<(std::ostream &os, FilterMode value); enum class FogMode : uint8_t { Exp = 0, Exp2 = 1, Linear = 2, InvalidEnum = 3, EnumCount = 3, }; template <> FogMode FromGLenum(GLenum from); GLenum ToGLenum(FogMode from); std::ostream &operator<<(std::ostream &os, FogMode value); enum class GraphicsResetStatus : uint8_t { NoError = 0, GuiltyContextReset = 1, InnocentContextReset = 2, UnknownContextReset = 3, PurgedContextResetNV = 4, InvalidEnum = 5, EnumCount = 5, }; template <> GraphicsResetStatus FromGLenum(GLenum from); GLenum ToGLenum(GraphicsResetStatus from); std::ostream &operator<<(std::ostream &os, GraphicsResetStatus value); enum class HandleType : uint8_t { OpaqueFd = 0, ZirconVmo = 1, ZirconEvent = 2, InvalidEnum = 3, EnumCount = 3, }; template <> HandleType FromGLenum(GLenum from); GLenum ToGLenum(HandleType from); std::ostream &operator<<(std::ostream &os, HandleType value); enum class HintSetting : uint8_t { DontCare = 0, Fastest = 1, Nicest = 2, InvalidEnum = 3, EnumCount = 3, }; template <> HintSetting FromGLenum(GLenum from); GLenum ToGLenum(HintSetting from); std::ostream &operator<<(std::ostream &os, HintSetting value); enum class ImageLayout : uint8_t { Undefined = 0, General = 1, ColorAttachment = 2, DepthStencilAttachment = 3, DepthStencilReadOnlyAttachment = 4, ShaderReadOnly = 5, TransferSrc = 6, TransferDst = 7, DepthReadOnlyStencilAttachment = 8, DepthAttachmentStencilReadOnly = 9, InvalidEnum = 10, EnumCount = 10, }; template <> ImageLayout FromGLenum(GLenum from); GLenum ToGLenum(ImageLayout from); std::ostream &operator<<(std::ostream &os, ImageLayout value); enum class LightParameter : uint8_t { Ambient = 0, AmbientAndDiffuse = 1, ConstantAttenuation = 2, Diffuse = 3, LinearAttenuation = 4, Position = 5, QuadraticAttenuation = 6, Specular = 7, SpotCutoff = 8, SpotDirection = 9, SpotExponent = 10, InvalidEnum = 11, EnumCount = 11, }; template <> LightParameter FromGLenum(GLenum from); GLenum ToGLenum(LightParameter from); std::ostream &operator<<(std::ostream &os, LightParameter value); enum class LogicalOperation : uint8_t { And = 0, AndInverted = 1, AndReverse = 2, Clear = 3, Copy = 4, CopyInverted = 5, Equiv = 6, Invert = 7, Nand = 8, Noop = 9, Nor = 10, Or = 11, OrInverted = 12, OrReverse = 13, Set = 14, Xor = 15, InvalidEnum = 16, EnumCount = 16, }; template <> LogicalOperation FromGLenum(GLenum from); GLenum ToGLenum(LogicalOperation from); std::ostream &operator<<(std::ostream &os, LogicalOperation value); enum class MaterialParameter : uint8_t { Ambient = 0, AmbientAndDiffuse = 1, Diffuse = 2, Emission = 3, Shininess = 4, Specular = 5, InvalidEnum = 6, EnumCount = 6, }; template <> MaterialParameter FromGLenum(GLenum from); GLenum ToGLenum(MaterialParameter from); std::ostream &operator<<(std::ostream &os, MaterialParameter value); enum class MatrixType : uint8_t { Modelview = 0, Projection = 1, Texture = 2, InvalidEnum = 3, EnumCount = 3, }; template <> MatrixType FromGLenum(GLenum from); GLenum ToGLenum(MatrixType from); std::ostream &operator<<(std::ostream &os, MatrixType value); enum class PlaneParameter : uint8_t { InternalFormat = 0, TextureName = 1, TextureLevel = 2, TextureLayer = 3, Usage = 4, ClearValueFloat = 5, ClearValueInt = 6, ClearValueUnsignedInt = 7, InvalidEnum = 8, EnumCount = 8, }; template <> PlaneParameter FromGLenum(GLenum from); GLenum ToGLenum(PlaneParameter from); std::ostream &operator<<(std::ostream &os, PlaneParameter value); enum class PointParameter : uint8_t { PointSizeMin = 0, PointSizeMax = 1, PointFadeThresholdSize = 2, PointDistanceAttenuation = 3, InvalidEnum = 4, EnumCount = 4, }; template <> PointParameter FromGLenum(GLenum from); GLenum ToGLenum(PointParameter from); std::ostream &operator<<(std::ostream &os, PointParameter value); enum class PolygonMode : uint8_t { Point = 0, Line = 1, Fill = 2, InvalidEnum = 3, EnumCount = 3, }; template <> PolygonMode FromGLenum(GLenum from); GLenum ToGLenum(PolygonMode from); std::ostream &operator<<(std::ostream &os, PolygonMode value); enum class ProvokingVertexConvention : uint8_t { FirstVertexConvention = 0, LastVertexConvention = 1, InvalidEnum = 2, EnumCount = 2, }; template <> ProvokingVertexConvention FromGLenum(GLenum from); GLenum ToGLenum(ProvokingVertexConvention from); std::ostream &operator<<(std::ostream &os, ProvokingVertexConvention value); enum class QueryObjectParameter : uint8_t { QueryResult = 0, QueryResultAvailable = 1, InvalidEnum = 2, EnumCount = 2, }; template <> QueryObjectParameter FromGLenum(GLenum from); GLenum ToGLenum(QueryObjectParameter from); std::ostream &operator<<(std::ostream &os, QueryObjectParameter value); enum class QueryParameter : uint8_t { QueryCounterBits = 0, CurrentQuery = 1, InvalidEnum = 2, EnumCount = 2, }; template <> QueryParameter FromGLenum(GLenum from); GLenum ToGLenum(QueryParameter from); std::ostream &operator<<(std::ostream &os, QueryParameter value); enum class QueryType : uint8_t { AnySamples = 0, AnySamplesConservative = 1, PrimitivesGenerated = 2, TimeElapsed = 3, Timestamp = 4, TransformFeedbackPrimitivesWritten = 5, InvalidEnum = 6, EnumCount = 6, }; template <> QueryType FromGLenum(GLenum from); GLenum ToGLenum(QueryType from); std::ostream &operator<<(std::ostream &os, QueryType value); enum class SamplerParameter : uint8_t { MagFilter = 0, MinFilter = 1, WrapS = 2, WrapT = 3, WrapR = 4, MinLod = 5, MaxLod = 6, CompareMode = 7, CompareFunc = 8, BorderColor = 9, MaxAnisotropy = 10, SrgbDecode = 11, InvalidEnum = 12, EnumCount = 12, }; template <> SamplerParameter FromGLenum(GLenum from); GLenum ToGLenum(SamplerParameter from); std::ostream &operator<<(std::ostream &os, SamplerParameter value); enum class ShaderParameter : uint8_t { ShaderType = 0, DeleteStatus = 1, CompileStatus = 2, InfoLogLength = 3, ShaderSourceLength = 4, CompletionStatus = 5, TranslatedShaderSourceLength = 6, InvalidEnum = 7, EnumCount = 7, }; template <> ShaderParameter FromGLenum(GLenum from); GLenum ToGLenum(ShaderParameter from); std::ostream &operator<<(std::ostream &os, ShaderParameter value); enum class ShaderType : uint8_t { Vertex = 0, TessControl = 1, TessEvaluation = 2, Geometry = 3, Fragment = 4, Compute = 5, InvalidEnum = 6, EnumCount = 6, }; template <> ShaderType FromGLenum(GLenum from); GLenum ToGLenum(ShaderType from); std::ostream &operator<<(std::ostream &os, ShaderType value); enum class ShadingModel : uint8_t { Flat = 0, Smooth = 1, InvalidEnum = 2, EnumCount = 2, }; template <> ShadingModel FromGLenum(GLenum from); GLenum ToGLenum(ShadingModel from); std::ostream &operator<<(std::ostream &os, ShadingModel value); enum class ShadingRate : uint8_t { Undefined = 0, _1x1 = 1, _1x2 = 2, _1x4 = 3, _2x1 = 4, _2x2 = 5, _2x4 = 6, _4x1 = 7, _4x2 = 8, _4x4 = 9, InvalidEnum = 10, EnumCount = 10, }; template <> ShadingRate FromGLenum(GLenum from); GLenum ToGLenum(ShadingRate from); std::ostream &operator<<(std::ostream &os, ShadingRate value); enum class TextureCombine : uint8_t { Add = 0, AddSigned = 1, Dot3Rgb = 2, Dot3Rgba = 3, Interpolate = 4, Modulate = 5, Replace = 6, Subtract = 7, InvalidEnum = 8, EnumCount = 8, }; template <> TextureCombine FromGLenum(GLenum from); GLenum ToGLenum(TextureCombine from); std::ostream &operator<<(std::ostream &os, TextureCombine value); enum class TextureEnvMode : uint8_t { Add = 0, Blend = 1, Combine = 2, Decal = 3, Modulate = 4, Replace = 5, InvalidEnum = 6, EnumCount = 6, }; template <> TextureEnvMode FromGLenum(GLenum from); GLenum ToGLenum(TextureEnvMode from); std::ostream &operator<<(std::ostream &os, TextureEnvMode value); enum class TextureEnvParameter : uint8_t { Mode = 0, Color = 1, CombineRgb = 2, CombineAlpha = 3, RgbScale = 4, AlphaScale = 5, Src0Rgb = 6, Src1Rgb = 7, Src2Rgb = 8, Src0Alpha = 9, Src1Alpha = 10, Src2Alpha = 11, Op0Rgb = 12, Op1Rgb = 13, Op2Rgb = 14, Op0Alpha = 15, Op1Alpha = 16, Op2Alpha = 17, PointCoordReplace = 18, InvalidEnum = 19, EnumCount = 19, }; template <> TextureEnvParameter FromGLenum(GLenum from); GLenum ToGLenum(TextureEnvParameter from); std::ostream &operator<<(std::ostream &os, TextureEnvParameter value); enum class TextureEnvTarget : uint8_t { Env = 0, PointSprite = 1, InvalidEnum = 2, EnumCount = 2, }; template <> TextureEnvTarget FromGLenum(GLenum from); GLenum ToGLenum(TextureEnvTarget from); std::ostream &operator<<(std::ostream &os, TextureEnvTarget value); enum class TextureImageParameter : uint8_t { Width = 0, Height = 1, Depth = 2, InternalFormat = 3, RedSize = 4, GreenSize = 5, BlueSize = 6, AlphaSize = 7, DepthSize = 8, StencilSize = 9, SharedSize = 10, RedType = 11, GreenType = 12, BlueType = 13, AlphaType = 14, DepthType = 15, Compressed = 16, Samples = 17, FixedSampleLocations = 18, BufferDataStoreBinding = 19, BufferOffset = 20, BufferSize = 21, MemorySize = 22, ResourceInitialized = 23, InvalidEnum = 24, EnumCount = 24, }; template <> TextureImageParameter FromGLenum(GLenum from); GLenum ToGLenum(TextureImageParameter from); std::ostream &operator<<(std::ostream &os, TextureImageParameter value); enum class TextureOp : uint8_t { OneMinusSrcAlpha = 0, OneMinusSrcColor = 1, SrcAlpha = 2, SrcColor = 3, InvalidEnum = 4, EnumCount = 4, }; template <> TextureOp FromGLenum(GLenum from); GLenum ToGLenum(TextureOp from); std::ostream &operator<<(std::ostream &os, TextureOp value); enum class TextureSrc : uint8_t { Constant = 0, Previous = 1, PrimaryColor = 2, Texture = 3, InvalidEnum = 4, EnumCount = 4, }; template <> TextureSrc FromGLenum(GLenum from); GLenum ToGLenum(TextureSrc from); std::ostream &operator<<(std::ostream &os, TextureSrc value); enum class TextureTarget : uint8_t { _2D = 0, _2DArray = 1, _2DMultisample = 2, _2DMultisampleArray = 3, _3D = 4, External = 5, Rectangle = 6, CubeMapPositiveX = 7, CubeMapNegativeX = 8, CubeMapPositiveY = 9, CubeMapNegativeY = 10, CubeMapPositiveZ = 11, CubeMapNegativeZ = 12, CubeMapArray = 13, VideoImage = 14, Buffer = 15, InvalidEnum = 16, EnumCount = 16, }; template <> TextureTarget FromGLenum(GLenum from); GLenum ToGLenum(TextureTarget from); std::ostream &operator<<(std::ostream &os, TextureTarget value); enum class TextureType : uint8_t { _2D = 0, _2DArray = 1, _2DMultisample = 2, _2DMultisampleArray = 3, _3D = 4, External = 5, Rectangle = 6, CubeMap = 7, CubeMapArray = 8, VideoImage = 9, Buffer = 10, InvalidEnum = 11, EnumCount = 11, }; template <> TextureType FromGLenum(GLenum from); GLenum ToGLenum(TextureType from); std::ostream &operator<<(std::ostream &os, TextureType value); enum class TilingMode : uint8_t { Optimal = 0, Linear = 1, InvalidEnum = 2, EnumCount = 2, }; template <> TilingMode FromGLenum(GLenum from); GLenum ToGLenum(TilingMode from); std::ostream &operator<<(std::ostream &os, TilingMode value); enum class UniformBlockParameter : uint8_t { Binding = 0, DataSize = 1, NameLength = 2, ActiveUniforms = 3, ActiveUniformIndices = 4, ReferencedByVertexShader = 5, ReferencedByFragmentShader = 6, InvalidEnum = 7, EnumCount = 7, }; template <> UniformBlockParameter FromGLenum(GLenum from); GLenum ToGLenum(UniformBlockParameter from); std::ostream &operator<<(std::ostream &os, UniformBlockParameter value); enum class VertexArrayType : uint8_t { Color = 0, Normal = 1, PointSize = 2, TextureCoord = 3, Vertex = 4, InvalidEnum = 5, EnumCount = 5, }; template <> VertexArrayType FromGLenum(GLenum from); GLenum ToGLenum(VertexArrayType from); std::ostream &operator<<(std::ostream &os, VertexArrayType value); enum class WrapMode : uint8_t { ClampToEdge = 0, ClampToBorder = 1, MirroredRepeat = 2, Repeat = 3, InvalidEnum = 4, EnumCount = 4, }; template <> WrapMode FromGLenum(GLenum from); GLenum ToGLenum(WrapMode from); std::ostream &operator<<(std::ostream &os, WrapMode value); } // namespace gl #endif // COMMON_PACKEDGLENUMS_AUTOGEN_H_