-- Automatically generated by ConvertEnumSpec from enumglu.spec

module GLU_EnumSpec where

import GL_BasicTypes ( GLenum )

--------------------------------------------------

-- Extensions
extObjectSpaceTess :: GLenum
extObjectSpaceTess = 1
extNurbsTessellator :: GLenum
extNurbsTessellator = 1

--------------------------------------------------

data Boolean =
     False'
   | True'
   deriving ( Eq, Ord, Show )

marshalBoolean :: Boolean -> GLenum
marshalBoolean x = case x of
   False' -> 0x0
   True' -> 0x1

unmarshalBoolean :: GLenum -> Boolean
unmarshalBoolean x
   | x == 0x0 = False'
   | x == 0x1 = True'
   | otherwise = error ("unmarshalBoolean: illegal value " ++ show x)

--------------------------------------------------

-- Version
version11 :: GLenum
version11 = 1
version12 :: GLenum
version12 = 1
version13 :: GLenum
version13 = 1

--------------------------------------------------

data StringName =
     Version
   | Extensions
   deriving ( Eq, Ord, Show )

marshalStringName :: StringName -> GLenum
marshalStringName x = case x of
   Version -> 0x189c0
   Extensions -> 0x189c1

unmarshalStringName :: GLenum -> StringName
unmarshalStringName x
   | x == 0x189c0 = Version
   | x == 0x189c1 = Extensions
   | otherwise = error ("unmarshalStringName: illegal value " ++ show x)

--------------------------------------------------

data ErrorCode =
     InvalidEnum
   | InvalidValue
   | OutOfMemory
   | InvalidOperation
   deriving ( Eq, Ord, Show )

marshalErrorCode :: ErrorCode -> GLenum
marshalErrorCode x = case x of
   InvalidEnum -> 0x18a24
   InvalidValue -> 0x18a25
   OutOfMemory -> 0x18a26
   InvalidOperation -> 0x18a28

unmarshalErrorCode :: GLenum -> ErrorCode
unmarshalErrorCode x
   | x == 0x18a24 = InvalidEnum
   | x == 0x18a25 = InvalidValue
   | x == 0x18a26 = OutOfMemory
   | x == 0x18a28 = InvalidOperation
   | otherwise = error ("unmarshalErrorCode: illegal value " ++ show x)

--------------------------------------------------

data Filter4TypeSGIS =
     LagrangianSGI
   | MitchellNetravaliSGI
   deriving ( Eq, Ord, Show )

marshalFilter4TypeSGIS :: Filter4TypeSGIS -> GLenum
marshalFilter4TypeSGIS x = case x of
   LagrangianSGI -> 0x187cc
   MitchellNetravaliSGI -> 0x187cd

unmarshalFilter4TypeSGIS :: GLenum -> Filter4TypeSGIS
unmarshalFilter4TypeSGIS x
   | x == 0x187cc = LagrangianSGI
   | x == 0x187cd = MitchellNetravaliSGI
   | otherwise = error ("unmarshalFilter4TypeSGIS: illegal value " ++ show x)

--------------------------------------------------

data NurbsDisplay =
     Fill'
   | OutlinePolygon
   | OutlinePatch
   deriving ( Eq, Ord, Show )

marshalNurbsDisplay :: NurbsDisplay -> GLenum
marshalNurbsDisplay x = case x of
   Fill' -> 0x186ac
   OutlinePolygon -> 0x18790
   OutlinePatch -> 0x18791

unmarshalNurbsDisplay :: GLenum -> NurbsDisplay
unmarshalNurbsDisplay x
   | x == 0x186ac = Fill'
   | x == 0x18790 = OutlinePolygon
   | x == 0x18791 = OutlinePatch
   | otherwise = error ("unmarshalNurbsDisplay: illegal value " ++ show x)

--------------------------------------------------

data NurbsCallback =
     NurbsError
   | Error
   | NurbsBegin
   | NurbsBeginEXT
   | NurbsVertex
   | NurbsVertexEXT
   | NurbsNormal
   | NurbsNormalEXT
   | NurbsColor
   | NurbsColorEXT
   | NurbsTextureCoord
   | NurbsTextureCoordEXT
   | NurbsEnd
   | NurbsEndEXT
   | NurbsBeginData
   | NurbsBeginDataEXT
   | NurbsVertexData
   | NurbsVertexDataEXT
   | NurbsNormalData
   | NurbsNormalDataEXT
   | NurbsColorData
   | NurbsColorDataEXT
   | NurbsTextureCoordData
   | NurbsTextureCoordDataEXT
   | NurbsEndData
   | NurbsEndDataEXT
   deriving ( Eq, Ord, Show )

marshalNurbsCallback :: NurbsCallback -> GLenum
marshalNurbsCallback x = case x of
   NurbsError -> 0x18707
   Error -> 0x18707
   NurbsBegin -> 0x18744
   NurbsBeginEXT -> 0x18744
   NurbsVertex -> 0x18745
   NurbsVertexEXT -> 0x18745
   NurbsNormal -> 0x18746
   NurbsNormalEXT -> 0x18746
   NurbsColor -> 0x18747
   NurbsColorEXT -> 0x18747
   NurbsTextureCoord -> 0x18748
   NurbsTextureCoordEXT -> 0x18748
   NurbsEnd -> 0x18749
   NurbsEndEXT -> 0x18749
   NurbsBeginData -> 0x1874a
   NurbsBeginDataEXT -> 0x1874a
   NurbsVertexData -> 0x1874b
   NurbsVertexDataEXT -> 0x1874b
   NurbsNormalData -> 0x1874c
   NurbsNormalDataEXT -> 0x1874c
   NurbsColorData -> 0x1874d
   NurbsColorDataEXT -> 0x1874d
   NurbsTextureCoordData -> 0x1874e
   NurbsTextureCoordDataEXT -> 0x1874e
   NurbsEndData -> 0x1874f
   NurbsEndDataEXT -> 0x1874f

unmarshalNurbsCallback :: GLenum -> NurbsCallback
unmarshalNurbsCallback x
   | x == 0x18707 = NurbsError
   | x == 0x18707 = Error
   | x == 0x18744 = NurbsBegin
   | x == 0x18744 = NurbsBeginEXT
   | x == 0x18745 = NurbsVertex
   | x == 0x18745 = NurbsVertexEXT
   | x == 0x18746 = NurbsNormal
   | x == 0x18746 = NurbsNormalEXT
   | x == 0x18747 = NurbsColor
   | x == 0x18747 = NurbsColorEXT
   | x == 0x18748 = NurbsTextureCoord
   | x == 0x18748 = NurbsTextureCoordEXT
   | x == 0x18749 = NurbsEnd
   | x == 0x18749 = NurbsEndEXT
   | x == 0x1874a = NurbsBeginData
   | x == 0x1874a = NurbsBeginDataEXT
   | x == 0x1874b = NurbsVertexData
   | x == 0x1874b = NurbsVertexDataEXT
   | x == 0x1874c = NurbsNormalData
   | x == 0x1874c = NurbsNormalDataEXT
   | x == 0x1874d = NurbsColorData
   | x == 0x1874d = NurbsColorDataEXT
   | x == 0x1874e = NurbsTextureCoordData
   | x == 0x1874e = NurbsTextureCoordDataEXT
   | x == 0x1874f = NurbsEndData
   | x == 0x1874f = NurbsEndDataEXT
   | otherwise = error ("unmarshalNurbsCallback: illegal value " ++ show x)

--------------------------------------------------

data NurbsError =
     NurbsError1
   | NurbsError2
   | NurbsError3
   | NurbsError4
   | NurbsError5
   | NurbsError6
   | NurbsError7
   | NurbsError8
   | NurbsError9
   | NurbsError10
   | NurbsError11
   | NurbsError12
   | NurbsError13
   | NurbsError14
   | NurbsError15
   | NurbsError16
   | NurbsError17
   | NurbsError18
   | NurbsError19
   | NurbsError20
   | NurbsError21
   | NurbsError22
   | NurbsError23
   | NurbsError24
   | NurbsError25
   | NurbsError26
   | NurbsError27
   | NurbsError28
   | NurbsError29
   | NurbsError30
   | NurbsError31
   | NurbsError32
   | NurbsError33
   | NurbsError34
   | NurbsError35
   | NurbsError36
   | NurbsError37
   deriving ( Eq, Ord, Show )

marshalNurbsError :: NurbsError -> GLenum
marshalNurbsError x = case x of
   NurbsError1 -> 0x1879b
   NurbsError2 -> 0x1879c
   NurbsError3 -> 0x1879d
   NurbsError4 -> 0x1879e
   NurbsError5 -> 0x1879f
   NurbsError6 -> 0x187a0
   NurbsError7 -> 0x187a1
   NurbsError8 -> 0x187a2
   NurbsError9 -> 0x187a3
   NurbsError10 -> 0x187a4
   NurbsError11 -> 0x187a5
   NurbsError12 -> 0x187a6
   NurbsError13 -> 0x187a7
   NurbsError14 -> 0x187a8
   NurbsError15 -> 0x187a9
   NurbsError16 -> 0x187aa
   NurbsError17 -> 0x187ab
   NurbsError18 -> 0x187ac
   NurbsError19 -> 0x187ad
   NurbsError20 -> 0x187ae
   NurbsError21 -> 0x187af
   NurbsError22 -> 0x187b0
   NurbsError23 -> 0x187b1
   NurbsError24 -> 0x187b2
   NurbsError25 -> 0x187b3
   NurbsError26 -> 0x187b4
   NurbsError27 -> 0x187b5
   NurbsError28 -> 0x187b6
   NurbsError29 -> 0x187b7
   NurbsError30 -> 0x187b8
   NurbsError31 -> 0x187b9
   NurbsError32 -> 0x187ba
   NurbsError33 -> 0x187bb
   NurbsError34 -> 0x187bc
   NurbsError35 -> 0x187bd
   NurbsError36 -> 0x187be
   NurbsError37 -> 0x187bf

unmarshalNurbsError :: GLenum -> NurbsError
unmarshalNurbsError x
   | x == 0x1879b = NurbsError1
   | x == 0x1879c = NurbsError2
   | x == 0x1879d = NurbsError3
   | x == 0x1879e = NurbsError4
   | x == 0x1879f = NurbsError5
   | x == 0x187a0 = NurbsError6
   | x == 0x187a1 = NurbsError7
   | x == 0x187a2 = NurbsError8
   | x == 0x187a3 = NurbsError9
   | x == 0x187a4 = NurbsError10
   | x == 0x187a5 = NurbsError11
   | x == 0x187a6 = NurbsError12
   | x == 0x187a7 = NurbsError13
   | x == 0x187a8 = NurbsError14
   | x == 0x187a9 = NurbsError15
   | x == 0x187aa = NurbsError16
   | x == 0x187ab = NurbsError17
   | x == 0x187ac = NurbsError18
   | x == 0x187ad = NurbsError19
   | x == 0x187ae = NurbsError20
   | x == 0x187af = NurbsError21
   | x == 0x187b0 = NurbsError22
   | x == 0x187b1 = NurbsError23
   | x == 0x187b2 = NurbsError24
   | x == 0x187b3 = NurbsError25
   | x == 0x187b4 = NurbsError26
   | x == 0x187b5 = NurbsError27
   | x == 0x187b6 = NurbsError28
   | x == 0x187b7 = NurbsError29
   | x == 0x187b8 = NurbsError30
   | x == 0x187b9 = NurbsError31
   | x == 0x187ba = NurbsError32
   | x == 0x187bb = NurbsError33
   | x == 0x187bc = NurbsError34
   | x == 0x187bd = NurbsError35
   | x == 0x187be = NurbsError36
   | x == 0x187bf = NurbsError37
   | otherwise = error ("unmarshalNurbsError: illegal value " ++ show x)

--------------------------------------------------

data NurbsProperty =
     AutoLoadMatrix
   | Culling
   | SamplingTolerance
   | DisplayMode
   | ParametricTolerance
   | SamplingMethod
   | UStep
   | VStep
   | NurbsMode
   | NurbsModeEXT
   | NurbsTessellator
   | NurbsTessellatorEXT
   | NurbsRenderer
   | NurbsRendererEXT
   deriving ( Eq, Ord, Show )

marshalNurbsProperty :: NurbsProperty -> GLenum
marshalNurbsProperty x = case x of
   AutoLoadMatrix -> 0x18768
   Culling -> 0x18769
   SamplingTolerance -> 0x1876b
   DisplayMode -> 0x1876c
   ParametricTolerance -> 0x1876a
   SamplingMethod -> 0x1876d
   UStep -> 0x1876e
   VStep -> 0x1876f
   NurbsMode -> 0x18740
   NurbsModeEXT -> 0x18740
   NurbsTessellator -> 0x18741
   NurbsTessellatorEXT -> 0x18741
   NurbsRenderer -> 0x18742
   NurbsRendererEXT -> 0x18742

unmarshalNurbsProperty :: GLenum -> NurbsProperty
unmarshalNurbsProperty x
   | x == 0x18768 = AutoLoadMatrix
   | x == 0x18769 = Culling
   | x == 0x1876b = SamplingTolerance
   | x == 0x1876c = DisplayMode
   | x == 0x1876a = ParametricTolerance
   | x == 0x1876d = SamplingMethod
   | x == 0x1876e = UStep
   | x == 0x1876f = VStep
   | x == 0x18740 = NurbsMode
   | x == 0x18740 = NurbsModeEXT
   | x == 0x18741 = NurbsTessellator
   | x == 0x18741 = NurbsTessellatorEXT
   | x == 0x18742 = NurbsRenderer
   | x == 0x18742 = NurbsRendererEXT
   | otherwise = error ("unmarshalNurbsProperty: illegal value " ++ show x)

--------------------------------------------------

data NurbsSampling =
     ObjectParametricError
   | ObjectParametricErrorEXT
   | ObjectPathLength
   | ObjectPathLengthEXT
   | PathLength
   | ParametricError
   | DomainDistance
   deriving ( Eq, Ord, Show )

marshalNurbsSampling :: NurbsSampling -> GLenum
marshalNurbsSampling x = case x of
   ObjectParametricError -> 0x18770
   ObjectParametricErrorEXT -> 0x18770
   ObjectPathLength -> 0x18771
   ObjectPathLengthEXT -> 0x18771
   PathLength -> 0x18777
   ParametricError -> 0x18778
   DomainDistance -> 0x18779

unmarshalNurbsSampling :: GLenum -> NurbsSampling
unmarshalNurbsSampling x
   | x == 0x18770 = ObjectParametricError
   | x == 0x18770 = ObjectParametricErrorEXT
   | x == 0x18771 = ObjectPathLength
   | x == 0x18771 = ObjectPathLengthEXT
   | x == 0x18777 = PathLength
   | x == 0x18778 = ParametricError
   | x == 0x18779 = DomainDistance
   | otherwise = error ("unmarshalNurbsSampling: illegal value " ++ show x)

--------------------------------------------------

data NurbsTrim =
     Map1Trim2
   | Map1Trim3
   deriving ( Eq, Ord, Show )

marshalNurbsTrim :: NurbsTrim -> GLenum
marshalNurbsTrim x = case x of
   Map1Trim2 -> 0x18772
   Map1Trim3 -> 0x18773

unmarshalNurbsTrim :: GLenum -> NurbsTrim
unmarshalNurbsTrim x
   | x == 0x18772 = Map1Trim2
   | x == 0x18773 = Map1Trim3
   | otherwise = error ("unmarshalNurbsTrim: illegal value " ++ show x)

--------------------------------------------------

data QuadricDrawStyle =
     Point
   | Line
   | Fill
   | Silhouette
   deriving ( Eq, Ord, Show )

marshalQuadricDrawStyle :: QuadricDrawStyle -> GLenum
marshalQuadricDrawStyle x = case x of
   Point -> 0x186aa
   Line -> 0x186ab
   Fill -> 0x186ac
   Silhouette -> 0x186ad

unmarshalQuadricDrawStyle :: GLenum -> QuadricDrawStyle
unmarshalQuadricDrawStyle x
   | x == 0x186aa = Point
   | x == 0x186ab = Line
   | x == 0x186ac = Fill
   | x == 0x186ad = Silhouette
   | otherwise = error ("unmarshalQuadricDrawStyle: illegal value " ++ show x)

--------------------------------------------------

data QuadricCallback =
     Error'2
   deriving ( Eq, Ord, Show )

marshalQuadricCallback :: QuadricCallback -> GLenum
marshalQuadricCallback x = case x of
   Error'2 -> 0x18707

unmarshalQuadricCallback :: GLenum -> QuadricCallback
unmarshalQuadricCallback x
   | x == 0x18707 = Error'2
   | otherwise = error ("unmarshalQuadricCallback: illegal value " ++ show x)

--------------------------------------------------

data QuadricNormal =
     Smooth
   | Flat
   | None
   deriving ( Eq, Ord, Show )

marshalQuadricNormal :: QuadricNormal -> GLenum
marshalQuadricNormal x = case x of
   Smooth -> 0x186a0
   Flat -> 0x186a1
   None -> 0x186a2

unmarshalQuadricNormal :: GLenum -> QuadricNormal
unmarshalQuadricNormal x
   | x == 0x186a0 = Smooth
   | x == 0x186a1 = Flat
   | x == 0x186a2 = None
   | otherwise = error ("unmarshalQuadricNormal: illegal value " ++ show x)

--------------------------------------------------

data QuadricOrientation =
     Outside
   | Inside
   deriving ( Eq, Ord, Show )

marshalQuadricOrientation :: QuadricOrientation -> GLenum
marshalQuadricOrientation x = case x of
   Outside -> 0x186b4
   Inside -> 0x186b5

unmarshalQuadricOrientation :: GLenum -> QuadricOrientation
unmarshalQuadricOrientation x
   | x == 0x186b4 = Outside
   | x == 0x186b5 = Inside
   | otherwise = error ("unmarshalQuadricOrientation: illegal value " ++ show x)

--------------------------------------------------

data TessCallback =
     TessBegin
   | Begin
   | TessVertex
   | Vertex
   | TessEnd
   | End
   | TessError
   | Error'
   | TessEdgeFlag
   | EdgeFlag
   | TessCombine
   | TessBeginData
   | TessVertexData
   | TessEndData
   | TessErrorData
   | TessEdgeFlagData
   | TessCombineData
   deriving ( Eq, Ord, Show )

marshalTessCallback :: TessCallback -> GLenum
marshalTessCallback x = case x of
   TessBegin -> 0x18704
   Begin -> 0x18704
   TessVertex -> 0x18705
   Vertex -> 0x18705
   TessEnd -> 0x18706
   End -> 0x18706
   TessError -> 0x18707
   Error' -> 0x18707
   TessEdgeFlag -> 0x18708
   EdgeFlag -> 0x18708
   TessCombine -> 0x18709
   TessBeginData -> 0x1870a
   TessVertexData -> 0x1870b
   TessEndData -> 0x1870c
   TessErrorData -> 0x1870d
   TessEdgeFlagData -> 0x1870e
   TessCombineData -> 0x1870f

unmarshalTessCallback :: GLenum -> TessCallback
unmarshalTessCallback x
   | x == 0x18704 = TessBegin
   | x == 0x18704 = Begin
   | x == 0x18705 = TessVertex
   | x == 0x18705 = Vertex
   | x == 0x18706 = TessEnd
   | x == 0x18706 = End
   | x == 0x18707 = TessError
   | x == 0x18707 = Error'
   | x == 0x18708 = TessEdgeFlag
   | x == 0x18708 = EdgeFlag
   | x == 0x18709 = TessCombine
   | x == 0x1870a = TessBeginData
   | x == 0x1870b = TessVertexData
   | x == 0x1870c = TessEndData
   | x == 0x1870d = TessErrorData
   | x == 0x1870e = TessEdgeFlagData
   | x == 0x1870f = TessCombineData
   | otherwise = error ("unmarshalTessCallback: illegal value " ++ show x)

--------------------------------------------------

data TessContour =
     CW
   | CCW
   | Interior
   | Exterior
   | Unknown
   deriving ( Eq, Ord, Show )

marshalTessContour :: TessContour -> GLenum
marshalTessContour x = case x of
   CW -> 0x18718
   CCW -> 0x18719
   Interior -> 0x1871a
   Exterior -> 0x1871b
   Unknown -> 0x1871c

unmarshalTessContour :: GLenum -> TessContour
unmarshalTessContour x
   | x == 0x18718 = CW
   | x == 0x18719 = CCW
   | x == 0x1871a = Interior
   | x == 0x1871b = Exterior
   | x == 0x1871c = Unknown
   | otherwise = error ("unmarshalTessContour: illegal value " ++ show x)

--------------------------------------------------

data TessProperty =
     TessWindingRule
   | TessBoundaryOnly
   | TessTolerance
   deriving ( Eq, Ord, Show )

marshalTessProperty :: TessProperty -> GLenum
marshalTessProperty x = case x of
   TessWindingRule -> 0x1872c
   TessBoundaryOnly -> 0x1872d
   TessTolerance -> 0x1872e

unmarshalTessProperty :: GLenum -> TessProperty
unmarshalTessProperty x
   | x == 0x1872c = TessWindingRule
   | x == 0x1872d = TessBoundaryOnly
   | x == 0x1872e = TessTolerance
   | otherwise = error ("unmarshalTessProperty: illegal value " ++ show x)

--------------------------------------------------

data TessError =
     TessError1
   | TessError2
   | TessError3
   | TessError4
   | TessError5
   | TessError6
   | TessError7
   | TessError8
   | TessMissingBeginPolygon
   | TessMissingBeginContour
   | TessMissingEndPolygon
   | TessMissingEndContour
   | TessCoordTooLarge
   | TessNeedCombineCallback
   deriving ( Eq, Ord, Show )

marshalTessError :: TessError -> GLenum
marshalTessError x = case x of
   TessError1 -> 0x18737
   TessError2 -> 0x18738
   TessError3 -> 0x18739
   TessError4 -> 0x1873a
   TessError5 -> 0x1873b
   TessError6 -> 0x1873c
   TessError7 -> 0x1873d
   TessError8 -> 0x1873e
   TessMissingBeginPolygon -> 0x18737
   TessMissingBeginContour -> 0x18738
   TessMissingEndPolygon -> 0x18739
   TessMissingEndContour -> 0x1873a
   TessCoordTooLarge -> 0x1873b
   TessNeedCombineCallback -> 0x1873c

unmarshalTessError :: GLenum -> TessError
unmarshalTessError x
   | x == 0x18737 = TessError1
   | x == 0x18738 = TessError2
   | x == 0x18739 = TessError3
   | x == 0x1873a = TessError4
   | x == 0x1873b = TessError5
   | x == 0x1873c = TessError6
   | x == 0x1873d = TessError7
   | x == 0x1873e = TessError8
   | x == 0x18737 = TessMissingBeginPolygon
   | x == 0x18738 = TessMissingBeginContour
   | x == 0x18739 = TessMissingEndPolygon
   | x == 0x1873a = TessMissingEndContour
   | x == 0x1873b = TessCoordTooLarge
   | x == 0x1873c = TessNeedCombineCallback
   | otherwise = error ("unmarshalTessError: illegal value " ++ show x)

--------------------------------------------------

-- | The winding rule determines which parts of the polygon are on the interior,
-- based on the winding number.

data TessWinding =
     TessWindingOdd
   | TessWindingNonzero
   | TessWindingPositive
   | TessWindingNegative
   | TessWindingAbsGeqTwo
   deriving ( Eq, Ord, Show )

marshalTessWinding :: TessWinding -> GLenum
marshalTessWinding x = case x of
   TessWindingOdd -> 0x18722
   TessWindingNonzero -> 0x18723
   TessWindingPositive -> 0x18724
   TessWindingNegative -> 0x18725
   TessWindingAbsGeqTwo -> 0x18726

unmarshalTessWinding :: GLenum -> TessWinding
unmarshalTessWinding x
   | x == 0x18722 = TessWindingOdd
   | x == 0x18723 = TessWindingNonzero
   | x == 0x18724 = TessWindingPositive
   | x == 0x18725 = TessWindingNegative
   | x == 0x18726 = TessWindingAbsGeqTwo
   | otherwise = error ("unmarshalTessWinding: illegal value " ++ show x)

