    --------------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.Rendering.OpenGL.GL.VertexSpec
    -- Copyright   :  (c) Sven Panne 2002-2019
    -- License     :  BSD3
    --
    -- Maintainer  :  Sven Panne <svenpanne@gmail.com>
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This module corresponds to section 2.7 (Vertex Specification) of the
    -- OpenGL 2.1 specs.
    --
    --------------------------------------------------------------------------------

    {-# LANGUAGE TypeSynonymInstances #-}

    module Graphics.Rendering.OpenGL.GL.VertexSpec (
       -- * Vertex Coordinates
       Vertex(..),
       VertexComponent,

       -- * Auxiliary Vertex Attributes
       -- $AuxiliaryVertexAttributes

       -- ** Texture Coordinates
       currentTextureCoords, TexCoord(..),
       TexCoordComponent,
       TexCoord1(..), TexCoord2(..), TexCoord3(..), TexCoord4(..),

       -- ** Normal
       currentNormal, Normal(..),
       NormalComponent,
       Normal3(..),

       -- ** Fog Coordinate
       currentFogCoord, FogCoord(..),
       FogCoordComponent,
       FogCoord1(..),

       -- ** Color and Secondary Color
       rgbaMode,
       currentColor, Color(..),
       currentSecondaryColor, SecondaryColor(..),
       ColorComponent,
       Color3(..), Color4(..),

       currentIndex, Index(..),
       IndexComponent,
       Index1(..),

       -- * Generic Vertex Attributes
       IntegerHandling(..), AttribLocation(..),
       currentVertexAttrib, currentVertexAttribI, currentVertexAttribIu,
       VertexAttrib(..), VertexAttribComponent(..),

       -- * Texture Units
       TextureUnit(..), maxTextureUnit
    ) where

    import Data.StateVar
    import Foreign.Marshal.Array
    import Foreign.Ptr
    import Foreign.Storable
    import Graphics.Rendering.OpenGL.GL.GLboolean
    import Graphics.Rendering.OpenGL.GL.PeekPoke
    import Graphics.Rendering.OpenGL.GL.QueryUtils
    import Graphics.Rendering.OpenGL.GL.Tensor
    import Graphics.Rendering.OpenGL.GL.Texturing.TextureUnit
    import Graphics.Rendering.OpenGL.GL.VertexAttributes
    import Graphics.GL

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

    -- | The class of all types which can be used as a vertex coordinate.

    class VertexComponent a where
       vertex2 :: a -> a -> IO ()
       vertex3 :: a -> a -> a -> IO ()
       vertex4 :: a -> a -> a -> a -> IO ()

       vertex2v :: Ptr a -> IO ()
       vertex3v :: Ptr a -> IO ()
       vertex4v :: Ptr a -> IO ()

    instance VertexComponent GLshort where
       vertex2 :: GLshort -> GLshort -> IO ()
    vertex2 = GLshort -> GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLshort -> GLshort -> m ()
    glVertex2s
       vertex3 :: GLshort -> GLshort -> GLshort -> IO ()
    vertex3 = GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> m ()
    glVertex3s
       vertex4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    vertex4 = GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> GLshort -> m ()
    glVertex4s

       vertex2v :: Ptr GLshort -> IO ()
    vertex2v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glVertex2sv
       vertex3v :: Ptr GLshort -> IO ()
    vertex3v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glVertex3sv
       vertex4v :: Ptr GLshort -> IO ()
    vertex4v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glVertex4sv

    instance VertexComponent GLint where
       vertex2 :: GLint -> GLint -> IO ()
    vertex2 = GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> m ()
    glVertex2i
       vertex3 :: GLint -> GLint -> GLint -> IO ()
    vertex3 = GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
    glVertex3i
       vertex4 :: GLint -> GLint -> GLint -> GLint -> IO ()
    vertex4 = GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLint -> GLint -> GLint -> GLint -> m ()
    glVertex4i

       vertex2v :: Ptr GLint -> IO ()
    vertex2v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glVertex2iv
       vertex3v :: Ptr GLint -> IO ()
    vertex3v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glVertex3iv
       vertex4v :: Ptr GLint -> IO ()
    vertex4v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glVertex4iv

    instance VertexComponent GLfloat where
       vertex2 :: GLfloat -> GLfloat -> IO ()
    vertex2 = GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLfloat -> GLfloat -> m ()
    glVertex2f
       vertex3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
    vertex3 = GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> m ()
    glVertex3f
       vertex4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    vertex4 = GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
    glVertex4f

       vertex2v :: Ptr GLfloat -> IO ()
    vertex2v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glVertex2fv
       vertex3v :: Ptr GLfloat -> IO ()
    vertex3v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glVertex3fv
       vertex4v :: Ptr GLfloat -> IO ()
    vertex4v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glVertex4fv

    instance VertexComponent GLdouble where
       vertex2 :: GLdouble -> GLdouble -> IO ()
    vertex2 = GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLdouble -> GLdouble -> m ()
    glVertex2d
       vertex3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
    vertex3 = GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> m ()
    glVertex3d
       vertex4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    vertex4 = GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
    glVertex4d

       vertex2v :: Ptr GLdouble -> IO ()
    vertex2v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glVertex2dv
       vertex3v :: Ptr GLdouble -> IO ()
    vertex3v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glVertex3dv
       vertex4v :: Ptr GLdouble -> IO ()
    vertex4v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glVertex4dv

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

    -- | Specify the (/x/, /y/, /z/, /w/) coordinates of a four-dimensional vertex.
    -- This must only be done during
    -- 'Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive', otherwise the
    -- behaviour is unspecified. The current values of the auxiliary vertex
    -- attributes are associated with the vertex.
    --
    -- Note that there is no such thing as a \"current vertex\" which could be
    -- retrieved.

    class Vertex a where
       vertex  ::     a -> IO ()
       vertexv :: Ptr a -> IO ()

    instance VertexComponent a => Vertex (Vertex2 a) where
       vertex :: Vertex2 a -> IO ()
    vertex (Vertex2 a
    x a
    y) = a -> a -> IO ()
    forall a. VertexComponent a => a -> a -> IO ()
    vertex2 a
    x a
    y
       vertexv :: Ptr (Vertex2 a) -> IO ()
    vertexv = Ptr a -> IO ()
    forall a. VertexComponent a => Ptr a -> IO ()
    vertex2v (Ptr a -> IO ())
    -> (Ptr (Vertex2 a) -> Ptr a) -> Ptr (Vertex2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex2 b) -> Ptr b
    forall {b}. Ptr (Vertex2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex2 b) -> Ptr b)

    instance VertexComponent a => Vertex (Vertex3 a) where
       vertex :: Vertex3 a -> IO ()
    vertex (Vertex3 a
    x a
    y a
    z) = a -> a -> a -> IO ()
    forall a. VertexComponent a => a -> a -> a -> IO ()
    vertex3 a
    x a
    y a
    z
       vertexv :: Ptr (Vertex3 a) -> IO ()
    vertexv = Ptr a -> IO ()
    forall a. VertexComponent a => Ptr a -> IO ()
    vertex3v (Ptr a -> IO ())
    -> (Ptr (Vertex3 a) -> Ptr a) -> Ptr (Vertex3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex3 b) -> Ptr b
    forall {b}. Ptr (Vertex3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex3 b) -> Ptr b)

    instance VertexComponent a => Vertex (Vertex4 a) where
       vertex :: Vertex4 a -> IO ()
    vertex (Vertex4 a
    x a
    y a
    z a
    w) = a -> a -> a -> a -> IO ()
    forall a. VertexComponent a => a -> a -> a -> a -> IO ()
    vertex4 a
    x a
    y a
    z a
    w
       vertexv :: Ptr (Vertex4 a) -> IO ()
    vertexv = Ptr a -> IO ()
    forall a. VertexComponent a => Ptr a -> IO ()
    vertex4v (Ptr a -> IO ())
    -> (Ptr (Vertex4 a) -> Ptr a) -> Ptr (Vertex4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex4 b) -> Ptr b
    forall {b}. Ptr (Vertex4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex4 b) -> Ptr b)

    --------------------------------------------------------------------------------
    -- $AuxiliaryVertexAttributes
    -- Apart from its coordinates in four-dimensional space, every vertex has
    -- associated /auxiliary attributes/: Its texture coordinates, a normal, a
    -- fog coordinate, and a color plus a secondary color. For every attribute, the
    -- OpenGL state contains its current value, which can be changed at any time.
    --
    -- Every attribute has a \"natural\" format via which it can be manipulated
    -- directly as part of the OpenGL state, e.g. the current texture coordinates
    -- are internally handled as @'TexCoord4' 'GLfloat'@. Different formats are
    -- converted to this format, e.g. the /s/, /r/, and /t/ coordinates of a
    -- @'TexCoord3' 'GLint'@ are converted to floating point values and a /q/
    -- coordinate of 1.0 is implicitly assumed.
    --
    -- Consequently, the vast majority of classes, functions, and data types in this
    -- module are for convenience only and offer no additional functionality.

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

    -- | The current texture coordinates (/s/, /t/, /r/, /q/) for the current
    -- texture unit (see 'Graphics.Rendering.OpenGL.GL.CoordTrans.activeTexture').
    -- The initial value is (0,0,0,1) for all texture units.

    currentTextureCoords :: StateVar (TexCoord4 GLfloat)
    currentTextureCoords :: StateVar (TexCoord4 GLfloat)
    currentTextureCoords =
       IO (TexCoord4 GLfloat)
    -> (TexCoord4 GLfloat -> IO ()) -> StateVar (TexCoord4 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar ((GLfloat -> GLfloat -> GLfloat -> GLfloat -> TexCoord4 GLfloat)
    -> PName4F -> IO (TexCoord4 GLfloat)
    forall p a.
    GetPName4F p =>
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
    forall a.
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> PName4F -> IO a
    getFloat4 GLfloat -> GLfloat -> GLfloat -> GLfloat -> TexCoord4 GLfloat
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 PName4F
    GetCurrentTextureCoords) TexCoord4 GLfloat -> IO ()
    forall a. TexCoord a => a -> IO ()
    texCoord

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

    -- | The class of all types which can be used as a texture coordinate.

    class TexCoordComponent a where
       texCoord1 :: a -> IO ()
       texCoord2 :: a -> a -> IO ()
       texCoord3 :: a -> a -> a -> IO ()
       texCoord4 :: a -> a -> a -> a -> IO ()

       texCoord1v :: Ptr a -> IO ()
       texCoord2v :: Ptr a -> IO ()
       texCoord3v :: Ptr a -> IO ()
       texCoord4v :: Ptr a -> IO ()

       multiTexCoord1 :: GLenum -> a -> IO ()
       multiTexCoord2 :: GLenum -> a -> a -> IO ()
       multiTexCoord3 :: GLenum -> a -> a -> a -> IO ()
       multiTexCoord4 :: GLenum -> a -> a -> a -> a -> IO ()

       multiTexCoord1v :: GLenum -> Ptr a -> IO ()
       multiTexCoord2v :: GLenum -> Ptr a -> IO ()
       multiTexCoord3v :: GLenum -> Ptr a -> IO ()
       multiTexCoord4v :: GLenum -> Ptr a -> IO ()

    instance TexCoordComponent GLshort where
       texCoord1 :: GLshort -> IO ()
    texCoord1 = GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLshort -> m ()
    glTexCoord1s
       texCoord2 :: GLshort -> GLshort -> IO ()
    texCoord2 = GLshort -> GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLshort -> GLshort -> m ()
    glTexCoord2s
       texCoord3 :: GLshort -> GLshort -> GLshort -> IO ()
    texCoord3 = GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> m ()
    glTexCoord3s
       texCoord4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    texCoord4 = GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> GLshort -> m ()
    glTexCoord4s

       texCoord1v :: Ptr GLshort -> IO ()
    texCoord1v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glTexCoord1sv
       texCoord2v :: Ptr GLshort -> IO ()
    texCoord2v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glTexCoord2sv
       texCoord3v :: Ptr GLshort -> IO ()
    texCoord3v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glTexCoord3sv
       texCoord4v :: Ptr GLshort -> IO ()
    texCoord4v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glTexCoord4sv

       multiTexCoord1 :: GLenum -> GLshort -> IO ()
    multiTexCoord1 = GLenum -> GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLshort -> m ()
    glMultiTexCoord1s
       multiTexCoord2 :: GLenum -> GLshort -> GLshort -> IO ()
    multiTexCoord2 = GLenum -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> m ()
    glMultiTexCoord2s
       multiTexCoord3 :: GLenum -> GLshort -> GLshort -> GLshort -> IO ()
    multiTexCoord3 = GLenum -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> GLshort -> m ()
    glMultiTexCoord3s
       multiTexCoord4 :: GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    multiTexCoord4 = GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> m ()
    glMultiTexCoord4s

       multiTexCoord1v :: GLenum -> Ptr GLshort -> IO ()
    multiTexCoord1v = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glMultiTexCoord1sv
       multiTexCoord2v :: GLenum -> Ptr GLshort -> IO ()
    multiTexCoord2v = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glMultiTexCoord2sv
       multiTexCoord3v :: GLenum -> Ptr GLshort -> IO ()
    multiTexCoord3v = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glMultiTexCoord3sv
       multiTexCoord4v :: GLenum -> Ptr GLshort -> IO ()
    multiTexCoord4v = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glMultiTexCoord4sv

    instance TexCoordComponent GLint where
       texCoord1 :: GLint -> IO ()
    texCoord1 = GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> m ()
    glTexCoord1i
       texCoord2 :: GLint -> GLint -> IO ()
    texCoord2 = GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> m ()
    glTexCoord2i
       texCoord3 :: GLint -> GLint -> GLint -> IO ()
    texCoord3 = GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
    glTexCoord3i
       texCoord4 :: GLint -> GLint -> GLint -> GLint -> IO ()
    texCoord4 = GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLint -> GLint -> GLint -> GLint -> m ()
    glTexCoord4i

       texCoord1v :: Ptr GLint -> IO ()
    texCoord1v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glTexCoord1iv
       texCoord2v :: Ptr GLint -> IO ()
    texCoord2v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glTexCoord2iv
       texCoord3v :: Ptr GLint -> IO ()
    texCoord3v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glTexCoord3iv
       texCoord4v :: Ptr GLint -> IO ()
    texCoord4v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glTexCoord4iv

       multiTexCoord1 :: GLenum -> GLint -> IO ()
    multiTexCoord1 = GLenum -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLint -> m ()
    glMultiTexCoord1i
       multiTexCoord2 :: GLenum -> GLint -> GLint -> IO ()
    multiTexCoord2 = GLenum -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLint -> GLint -> m ()
    glMultiTexCoord2i
       multiTexCoord3 :: GLenum -> GLint -> GLint -> GLint -> IO ()
    multiTexCoord3 = GLenum -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLint -> GLint -> m ()
    glMultiTexCoord3i
       multiTexCoord4 :: GLenum -> GLint -> GLint -> GLint -> GLint -> IO ()
    multiTexCoord4 = GLenum -> GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLint -> GLint -> GLint -> m ()
    glMultiTexCoord4i

       multiTexCoord1v :: GLenum -> Ptr GLint -> IO ()
    multiTexCoord1v = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glMultiTexCoord1iv
       multiTexCoord2v :: GLenum -> Ptr GLint -> IO ()
    multiTexCoord2v = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glMultiTexCoord2iv
       multiTexCoord3v :: GLenum -> Ptr GLint -> IO ()
    multiTexCoord3v = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glMultiTexCoord3iv
       multiTexCoord4v :: GLenum -> Ptr GLint -> IO ()
    multiTexCoord4v = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glMultiTexCoord4iv

    instance TexCoordComponent GLfloat where
       texCoord1 :: GLfloat -> IO ()
    texCoord1 = GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLfloat -> m ()
    glTexCoord1f
       texCoord2 :: GLfloat -> GLfloat -> IO ()
    texCoord2 = GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLfloat -> GLfloat -> m ()
    glTexCoord2f
       texCoord3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
    texCoord3 = GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> m ()
    glTexCoord3f
       texCoord4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    texCoord4 = GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
    glTexCoord4f

       texCoord1v :: Ptr GLfloat -> IO ()
    texCoord1v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glTexCoord1fv
       texCoord2v :: Ptr GLfloat -> IO ()
    texCoord2v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glTexCoord2fv
       texCoord3v :: Ptr GLfloat -> IO ()
    texCoord3v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glTexCoord3fv
       texCoord4v :: Ptr GLfloat -> IO ()
    texCoord4v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glTexCoord4fv

       multiTexCoord1 :: GLenum -> GLfloat -> IO ()
    multiTexCoord1 = GLenum -> GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLfloat -> m ()
    glMultiTexCoord1f
       multiTexCoord2 :: GLenum -> GLfloat -> GLfloat -> IO ()
    multiTexCoord2 = GLenum -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> m ()
    glMultiTexCoord2f
       multiTexCoord3 :: GLenum -> GLfloat -> GLfloat -> GLfloat -> IO ()
    multiTexCoord3 = GLenum -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> GLfloat -> m ()
    glMultiTexCoord3f
       multiTexCoord4 :: GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    multiTexCoord4 = GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
    glMultiTexCoord4f

       multiTexCoord1v :: GLenum -> Ptr GLfloat -> IO ()
    multiTexCoord1v = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glMultiTexCoord1fv
       multiTexCoord2v :: GLenum -> Ptr GLfloat -> IO ()
    multiTexCoord2v = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glMultiTexCoord2fv
       multiTexCoord3v :: GLenum -> Ptr GLfloat -> IO ()
    multiTexCoord3v = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glMultiTexCoord3fv
       multiTexCoord4v :: GLenum -> Ptr GLfloat -> IO ()
    multiTexCoord4v = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glMultiTexCoord4fv

    instance TexCoordComponent GLdouble where
       texCoord1 :: GLdouble -> IO ()
    texCoord1 = GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLdouble -> m ()
    glTexCoord1d
       texCoord2 :: GLdouble -> GLdouble -> IO ()
    texCoord2 = GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLdouble -> GLdouble -> m ()
    glTexCoord2d
       texCoord3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
    texCoord3 = GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> m ()
    glTexCoord3d
       texCoord4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    texCoord4 = GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
    glTexCoord4d

       texCoord1v :: Ptr GLdouble -> IO ()
    texCoord1v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glTexCoord1dv
       texCoord2v :: Ptr GLdouble -> IO ()
    texCoord2v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glTexCoord2dv
       texCoord3v :: Ptr GLdouble -> IO ()
    texCoord3v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glTexCoord3dv
       texCoord4v :: Ptr GLdouble -> IO ()
    texCoord4v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glTexCoord4dv

       multiTexCoord1 :: GLenum -> GLdouble -> IO ()
    multiTexCoord1 = GLenum -> GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLdouble -> m ()
    glMultiTexCoord1d
       multiTexCoord2 :: GLenum -> GLdouble -> GLdouble -> IO ()
    multiTexCoord2 = GLenum -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> m ()
    glMultiTexCoord2d
       multiTexCoord3 :: GLenum -> GLdouble -> GLdouble -> GLdouble -> IO ()
    multiTexCoord3 = GLenum -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> GLdouble -> m ()
    glMultiTexCoord3d
       multiTexCoord4 :: GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    multiTexCoord4 = GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
    glMultiTexCoord4d

       multiTexCoord1v :: GLenum -> Ptr GLdouble -> IO ()
    multiTexCoord1v = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glMultiTexCoord1dv
       multiTexCoord2v :: GLenum -> Ptr GLdouble -> IO ()
    multiTexCoord2v = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glMultiTexCoord2dv
       multiTexCoord3v :: GLenum -> Ptr GLdouble -> IO ()
    multiTexCoord3v = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glMultiTexCoord3dv
       multiTexCoord4v :: GLenum -> Ptr GLdouble -> IO ()
    multiTexCoord4v = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glMultiTexCoord4dv

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

    -- | Change the current texture coordinates of the current or given texture
    -- unit.

    class TexCoord a where
       texCoord       ::                    a -> IO ()
       texCoordv      ::                Ptr a -> IO ()
       multiTexCoord  :: TextureUnit ->     a -> IO ()
       multiTexCoordv :: TextureUnit -> Ptr a -> IO ()

    instance TexCoordComponent a => TexCoord (TexCoord1 a) where
       texCoord :: TexCoord1 a -> IO ()
    texCoord (TexCoord1 a
    s) = a -> IO ()
    forall a. TexCoordComponent a => a -> IO ()
    texCoord1 a
    s
       texCoordv :: Ptr (TexCoord1 a) -> IO ()
    texCoordv = Ptr a -> IO ()
    forall a. TexCoordComponent a => Ptr a -> IO ()
    texCoord1v (Ptr a -> IO ())
    -> (Ptr (TexCoord1 a) -> Ptr a) -> Ptr (TexCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord1 b) -> Ptr b
    forall {b}. Ptr (TexCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord1 b) -> Ptr b)
       multiTexCoord :: TextureUnit -> TexCoord1 a -> IO ()
    multiTexCoord TextureUnit
    u (TexCoord1 a
    s) =
          GLenum -> a -> IO ()
    forall a. TexCoordComponent a => GLenum -> a -> IO ()
    multiTexCoord1 (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) a
    s
       multiTexCoordv :: TextureUnit -> Ptr (TexCoord1 a) -> IO ()
    multiTexCoordv TextureUnit
    u =
          GLenum -> Ptr a -> IO ()
    forall a. TexCoordComponent a => GLenum -> Ptr a -> IO ()
    multiTexCoord1v (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) (Ptr a -> IO ())
    -> (Ptr (TexCoord1 a) -> Ptr a) -> Ptr (TexCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord1 b) -> Ptr b
    forall {b}. Ptr (TexCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord1 b) -> Ptr b)

    instance TexCoordComponent a => TexCoord (TexCoord2 a) where
       texCoord :: TexCoord2 a -> IO ()
    texCoord (TexCoord2 a
    s a
    t) = a -> a -> IO ()
    forall a. TexCoordComponent a => a -> a -> IO ()
    texCoord2 a
    s a
    t
       texCoordv :: Ptr (TexCoord2 a) -> IO ()
    texCoordv = Ptr a -> IO ()
    forall a. TexCoordComponent a => Ptr a -> IO ()
    texCoord2v (Ptr a -> IO ())
    -> (Ptr (TexCoord2 a) -> Ptr a) -> Ptr (TexCoord2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord2 b) -> Ptr b
    forall {b}. Ptr (TexCoord2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord2 b) -> Ptr b)
       multiTexCoord :: TextureUnit -> TexCoord2 a -> IO ()
    multiTexCoord TextureUnit
    u (TexCoord2 a
    s a
    t) =
          GLenum -> a -> a -> IO ()
    forall a. TexCoordComponent a => GLenum -> a -> a -> IO ()
    multiTexCoord2 (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) a
    s a
    t
       multiTexCoordv :: TextureUnit -> Ptr (TexCoord2 a) -> IO ()
    multiTexCoordv TextureUnit
    u =
          GLenum -> Ptr a -> IO ()
    forall a. TexCoordComponent a => GLenum -> Ptr a -> IO ()
    multiTexCoord2v (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) (Ptr a -> IO ())
    -> (Ptr (TexCoord2 a) -> Ptr a) -> Ptr (TexCoord2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord2 b) -> Ptr b
    forall {b}. Ptr (TexCoord2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord2 b) -> Ptr b)

    instance TexCoordComponent a => TexCoord (TexCoord3 a) where
       texCoord :: TexCoord3 a -> IO ()
    texCoord (TexCoord3 a
    s a
    t a
    r) = a -> a -> a -> IO ()
    forall a. TexCoordComponent a => a -> a -> a -> IO ()
    texCoord3 a
    s a
    t a
    r
       texCoordv :: Ptr (TexCoord3 a) -> IO ()
    texCoordv = Ptr a -> IO ()
    forall a. TexCoordComponent a => Ptr a -> IO ()
    texCoord3v (Ptr a -> IO ())
    -> (Ptr (TexCoord3 a) -> Ptr a) -> Ptr (TexCoord3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord3 b) -> Ptr b
    forall {b}. Ptr (TexCoord3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord3 b) -> Ptr b)
       multiTexCoord :: TextureUnit -> TexCoord3 a -> IO ()
    multiTexCoord TextureUnit
    u (TexCoord3 a
    s a
    t a
    r) =
          GLenum -> a -> a -> a -> IO ()
    forall a. TexCoordComponent a => GLenum -> a -> a -> a -> IO ()
    multiTexCoord3 (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) a
    s a
    t a
    r
       multiTexCoordv :: TextureUnit -> Ptr (TexCoord3 a) -> IO ()
    multiTexCoordv TextureUnit
    u =
          GLenum -> Ptr a -> IO ()
    forall a. TexCoordComponent a => GLenum -> Ptr a -> IO ()
    multiTexCoord3v (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) (Ptr a -> IO ())
    -> (Ptr (TexCoord3 a) -> Ptr a) -> Ptr (TexCoord3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord3 b) -> Ptr b
    forall {b}. Ptr (TexCoord3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord3 b) -> Ptr b)

    instance TexCoordComponent a => TexCoord (TexCoord4 a) where
       texCoord :: TexCoord4 a -> IO ()
    texCoord (TexCoord4 a
    s a
    t a
    r a
    q) = a -> a -> a -> a -> IO ()
    forall a. TexCoordComponent a => a -> a -> a -> a -> IO ()
    texCoord4 a
    s a
    t a
    r a
    q
       texCoordv :: Ptr (TexCoord4 a) -> IO ()
    texCoordv = Ptr a -> IO ()
    forall a. TexCoordComponent a => Ptr a -> IO ()
    texCoord4v (Ptr a -> IO ())
    -> (Ptr (TexCoord4 a) -> Ptr a) -> Ptr (TexCoord4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord4 b) -> Ptr b
    forall {b}. Ptr (TexCoord4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord4 b) -> Ptr b)
       multiTexCoord :: TextureUnit -> TexCoord4 a -> IO ()
    multiTexCoord TextureUnit
    u (TexCoord4 a
    s a
    t a
    r a
    q) =
          GLenum -> a -> a -> a -> a -> IO ()
    forall a.
    TexCoordComponent a =>
    GLenum -> a -> a -> a -> a -> IO ()
    multiTexCoord4 (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) a
    s a
    t a
    r a
    q
       multiTexCoordv :: TextureUnit -> Ptr (TexCoord4 a) -> IO ()
    multiTexCoordv TextureUnit
    u =
          GLenum -> Ptr a -> IO ()
    forall a. TexCoordComponent a => GLenum -> Ptr a -> IO ()
    multiTexCoord4v (TextureUnit -> GLenum
    marshalTextureUnit TextureUnit
    u) (Ptr a -> IO ())
    -> (Ptr (TexCoord4 a) -> Ptr a) -> Ptr (TexCoord4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord4 b) -> Ptr b
    forall {b}. Ptr (TexCoord4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord4 b) -> Ptr b)

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

    -- | The current normal (/x/, /y/, /z/). The initial value is the unit vector
    -- (0, 0, 1).

    currentNormal :: StateVar (Normal3 GLfloat)
    currentNormal :: StateVar (Normal3 GLfloat)
    currentNormal = IO (Normal3 GLfloat)
    -> (Normal3 GLfloat -> IO ()) -> StateVar (Normal3 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar ((GLfloat -> GLfloat -> GLfloat -> Normal3 GLfloat)
    -> PName3F -> IO (Normal3 GLfloat)
    forall p a.
    GetPName3F p =>
    (GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
    forall a. (GLfloat -> GLfloat -> GLfloat -> a) -> PName3F -> IO a
    getFloat3 GLfloat -> GLfloat -> GLfloat -> Normal3 GLfloat
    forall a. a -> a -> a -> Normal3 a
    Normal3 PName3F
    GetCurrentNormal) Normal3 GLfloat -> IO ()
    forall a. Normal a => a -> IO ()
    normal

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

    -- | The class of all types which can be used as a component of a normal.

    class NormalComponent a where
       normal3 :: a -> a -> a -> IO ()
       normal3v :: Ptr a -> IO ()

    instance NormalComponent GLbyte where
       normal3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
    normal3 = GLbyte -> GLbyte -> GLbyte -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLbyte -> GLbyte -> GLbyte -> m ()
    glNormal3b
       normal3v :: Ptr GLbyte -> IO ()
    normal3v = Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
    glNormal3bv

    instance NormalComponent GLshort where
       normal3 :: GLshort -> GLshort -> GLshort -> IO ()
    normal3 = GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> m ()
    glNormal3s
       normal3v :: Ptr GLshort -> IO ()
    normal3v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glNormal3sv

    instance NormalComponent GLint where
       normal3 :: GLint -> GLint -> GLint -> IO ()
    normal3 = GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
    glNormal3i
       normal3v :: Ptr GLint -> IO ()
    normal3v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glNormal3iv

    instance NormalComponent GLfloat where
       normal3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
    normal3 = GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> m ()
    glNormal3f
       normal3v :: Ptr GLfloat -> IO ()
    normal3v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glNormal3fv

    instance NormalComponent GLdouble where
       normal3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
    normal3 = GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> m ()
    glNormal3d
       normal3v :: Ptr GLdouble -> IO ()
    normal3v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glNormal3dv

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

    -- | Change the current normal. Integral arguments are converted to
    -- floating-point with a linear mapping that maps the most positive
    -- representable integer value to 1.0, and the most negative representable
    -- integer value to -1.0.
    --
    -- Normals specified with 'normal' or 'normalv' need not have unit length.
    -- If 'Graphics.Rendering.OpenGL.GL.CoordTrans.normalize' is enabled, then
    -- normals of any length specified with 'normal' or 'normalv' are normalized
    -- after transformation. If
    -- 'Graphics.Rendering.OpenGL.GL.CoordTrans.rescaleNormal' is enabled, normals
    -- are scaled by a scaling factor derived from the modelview matrix.
    -- 'Graphics.Rendering.OpenGL.GL.CoordTrans.rescaleNormal' requires that the
    -- originally specified normals were of unit length, and that the modelview
    -- matrix contains only uniform scales for proper results. Normalization is
    -- initially disabled.

    class Normal a where
       normal  ::     a -> IO ()
       normalv :: Ptr a -> IO ()

    instance NormalComponent a => Normal (Normal3 a) where
       normal :: Normal3 a -> IO ()
    normal (Normal3 a
    x a
    y a
    z) = a -> a -> a -> IO ()
    forall a. NormalComponent a => a -> a -> a -> IO ()
    normal3 a
    x a
    y a
    z
       normalv :: Ptr (Normal3 a) -> IO ()
    normalv = Ptr a -> IO ()
    forall a. NormalComponent a => Ptr a -> IO ()
    normal3v (Ptr a -> IO ())
    -> (Ptr (Normal3 a) -> Ptr a) -> Ptr (Normal3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Normal3 b) -> Ptr b
    forall {b}. Ptr (Normal3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Normal3 b) -> Ptr b)

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

    -- | The current fog coordinate. The initial value is 0.

    currentFogCoord :: StateVar (FogCoord1 GLfloat)
    currentFogCoord :: StateVar (FogCoord1 GLfloat)
    currentFogCoord =
       IO (FogCoord1 GLfloat)
    -> (FogCoord1 GLfloat -> IO ()) -> StateVar (FogCoord1 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar ((GLfloat -> FogCoord1 GLfloat) -> PName1F -> IO (FogCoord1 GLfloat)
    forall p a. GetPName1F p => (GLfloat -> a) -> p -> IO a
    forall a. (GLfloat -> a) -> PName1F -> IO a
    getFloat1 GLfloat -> FogCoord1 GLfloat
    forall a. a -> FogCoord1 a
    FogCoord1 PName1F
    GetCurrentFogCoord) FogCoord1 GLfloat -> IO ()
    forall a. FogCoord a => a -> IO ()
    fogCoord

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

    -- | The class of all types which can be used as the fog coordinate.

    class FogCoordComponent a where
       fogCoord1 :: a -> IO ()
       fogCoord1v :: Ptr a -> IO ()

    instance FogCoordComponent GLfloat where
       fogCoord1 :: GLfloat -> IO ()
    fogCoord1 = GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLfloat -> m ()
    glFogCoordf
       fogCoord1v :: Ptr GLfloat -> IO ()
    fogCoord1v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glFogCoordfv

    instance FogCoordComponent GLdouble where
       fogCoord1 :: GLdouble -> IO ()
    fogCoord1 = GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLdouble -> m ()
    glFogCoordd
       fogCoord1v :: Ptr GLdouble -> IO ()
    fogCoord1v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glFogCoorddv

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

    -- | Change the current fog coordinate.

    class FogCoord a where
       fogCoord  ::     a -> IO ()
       fogCoordv :: Ptr a -> IO ()

    instance FogCoordComponent a => FogCoord (FogCoord1 a) where
       fogCoord :: FogCoord1 a -> IO ()
    fogCoord (FogCoord1 a
    c) = a -> IO ()
    forall a. FogCoordComponent a => a -> IO ()
    fogCoord1 a
    c
       fogCoordv :: Ptr (FogCoord1 a) -> IO ()
    fogCoordv = Ptr a -> IO ()
    forall a. FogCoordComponent a => Ptr a -> IO ()
    fogCoord1v (Ptr a -> IO ())
    -> (Ptr (FogCoord1 a) -> Ptr a) -> Ptr (FogCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (FogCoord1 b) -> Ptr b
    forall {b}. Ptr (FogCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (FogCoord1 b) -> Ptr b)

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

    -- | If 'rgbaMode' contains 'True', the color buffers store RGBA value. If
    -- color indexes are stored, it contains 'False'.

    rgbaMode :: GettableStateVar Bool
    rgbaMode :: GettableStateVar Bool
    rgbaMode = GettableStateVar Bool -> GettableStateVar Bool
    forall a. IO a -> IO a
    makeGettableStateVar ((GLboolean -> Bool) -> PName1I -> GettableStateVar Bool
    forall p a. GetPName1I p => (GLboolean -> a) -> p -> IO a
    forall a. (GLboolean -> a) -> PName1I -> IO a
    getBoolean1 GLboolean -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    unmarshalGLboolean PName1I
    GetRGBAMode)

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

    -- The current color (/R/, /G/, /B/, /A/). The initial value is (1, 1, 1, 1).
    -- Note that this state variable is significant only when the GL is in RGBA
    -- mode.

    currentColor :: StateVar (Color4 GLfloat)
    currentColor :: StateVar (Color4 GLfloat)
    currentColor =
       IO (Color4 GLfloat)
    -> (Color4 GLfloat -> IO ()) -> StateVar (Color4 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar ((GLfloat -> GLfloat -> GLfloat -> GLfloat -> Color4 GLfloat)
    -> PName4F -> IO (Color4 GLfloat)
    forall p a.
    GetPName4F p =>
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
    forall a.
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> PName4F -> IO a
    getFloat4 GLfloat -> GLfloat -> GLfloat -> GLfloat -> Color4 GLfloat
    forall a. a -> a -> a -> a -> Color4 a
    Color4 PName4F
    GetCurrentColor) Color4 GLfloat -> IO ()
    forall a. Color a => a -> IO ()
    color

    -- The current secondary color (/R/, /G/, /B/). The initial value is (0, 0, 0).
    -- Note that this state variable is significant only when the GL is in RGBA
    -- mode.

    currentSecondaryColor :: StateVar (Color3 GLfloat)
    currentSecondaryColor :: StateVar (Color3 GLfloat)
    currentSecondaryColor =
       IO (Color3 GLfloat)
    -> (Color3 GLfloat -> IO ()) -> StateVar (Color3 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar
          (do Color4 r g b _ <- (GLfloat -> GLfloat -> GLfloat -> GLfloat -> Color4 GLfloat)
    -> PName4F -> IO (Color4 GLfloat)
    forall p a.
    GetPName4F p =>
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
    forall a.
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> PName4F -> IO a
    getFloat4 GLfloat -> GLfloat -> GLfloat -> GLfloat -> Color4 GLfloat
    forall a. a -> a -> a -> a -> Color4 a
    Color4 PName4F
    GetCurrentSecondaryColor
              return $ Color3 r g b)
          Color3 GLfloat -> IO ()
    forall a. SecondaryColor a => a -> IO ()
    secondaryColor

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

    -- | The class of all types which can be used as a color component.

    class ColorComponent a where
       color3 :: a -> a -> a -> IO ()
       color4 :: a -> a -> a -> a -> IO ()

       color3v :: Ptr a -> IO ()
       color4v :: Ptr a -> IO ()

       secondaryColor3  :: a -> a -> a -> IO ()
       secondaryColor3v :: Ptr a -> IO ()

    instance ColorComponent GLbyte where
       color3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
    color3 = GLbyte -> GLbyte -> GLbyte -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLbyte -> GLbyte -> GLbyte -> m ()
    glColor3b
       color4 :: GLbyte -> GLbyte -> GLbyte -> GLbyte -> IO ()
    color4 = GLbyte -> GLbyte -> GLbyte -> GLbyte -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLbyte -> GLbyte -> GLbyte -> GLbyte -> m ()
    glColor4b

       color3v :: Ptr GLbyte -> IO ()
    color3v = Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
    glColor3bv
       color4v :: Ptr GLbyte -> IO ()
    color4v = Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
    glColor4bv

       secondaryColor3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
    secondaryColor3 = GLbyte -> GLbyte -> GLbyte -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLbyte -> GLbyte -> GLbyte -> m ()
    glSecondaryColor3b
       secondaryColor3v :: Ptr GLbyte -> IO ()
    secondaryColor3v = Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
    glSecondaryColor3bv

    instance ColorComponent GLshort where
       color3 :: GLshort -> GLshort -> GLshort -> IO ()
    color3 = GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> m ()
    glColor3s
       color4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    color4 = GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> GLshort -> m ()
    glColor4s

       color3v :: Ptr GLshort -> IO ()
    color3v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glColor3sv
       color4v :: Ptr GLshort -> IO ()
    color4v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glColor4sv

       secondaryColor3 :: GLshort -> GLshort -> GLshort -> IO ()
    secondaryColor3 = GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLshort -> GLshort -> GLshort -> m ()
    glSecondaryColor3s
       secondaryColor3v :: Ptr GLshort -> IO ()
    secondaryColor3v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glSecondaryColor3sv

    instance ColorComponent GLint where
       color3 :: GLint -> GLint -> GLint -> IO ()
    color3 = GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
    glColor3i
       color4 :: GLint -> GLint -> GLint -> GLint -> IO ()
    color4 = GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLint -> GLint -> GLint -> GLint -> m ()
    glColor4i

       color3v :: Ptr GLint -> IO ()
    color3v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glColor3iv
       color4v :: Ptr GLint -> IO ()
    color4v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glColor4iv

       secondaryColor3 :: GLint -> GLint -> GLint -> IO ()
    secondaryColor3 = GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
    glSecondaryColor3i
       secondaryColor3v :: Ptr GLint -> IO ()
    secondaryColor3v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glSecondaryColor3iv

    instance ColorComponent GLfloat where
       color3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
    color3 = GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> m ()
    glColor3f
       color4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    color4 = GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
    glColor4f

       color3v :: Ptr GLfloat -> IO ()
    color3v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glColor3fv
       color4v :: Ptr GLfloat -> IO ()
    color4v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glColor4fv

       secondaryColor3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
    secondaryColor3 = GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLfloat -> GLfloat -> GLfloat -> m ()
    glSecondaryColor3f
       secondaryColor3v :: Ptr GLfloat -> IO ()
    secondaryColor3v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glSecondaryColor3fv

    instance ColorComponent GLdouble where
       color3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
    color3 = GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> m ()
    glColor3d
       color4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    color4 = GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
    glColor4d

       color3v :: Ptr GLdouble -> IO ()
    color3v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glColor3dv
       color4v :: Ptr GLdouble -> IO ()
    color4v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glColor4dv

       secondaryColor3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
    secondaryColor3 = GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLdouble -> GLdouble -> GLdouble -> m ()
    glSecondaryColor3d
       secondaryColor3v :: Ptr GLdouble -> IO ()
    secondaryColor3v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glSecondaryColor3dv

    instance ColorComponent GLubyte where
       color3 :: GLboolean -> GLboolean -> GLboolean -> IO ()
    color3 = GLboolean -> GLboolean -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLboolean -> GLboolean -> GLboolean -> m ()
    glColor3ub
       color4 :: GLboolean -> GLboolean -> GLboolean -> GLboolean -> IO ()
    color4 = GLboolean -> GLboolean -> GLboolean -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLboolean -> GLboolean -> GLboolean -> GLboolean -> m ()
    glColor4ub

       color3v :: Ptr GLboolean -> IO ()
    color3v = Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLboolean -> m ()
    glColor3ubv
       color4v :: Ptr GLboolean -> IO ()
    color4v = Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLboolean -> m ()
    glColor4ubv

       secondaryColor3 :: GLboolean -> GLboolean -> GLboolean -> IO ()
    secondaryColor3 = GLboolean -> GLboolean -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLboolean -> GLboolean -> GLboolean -> m ()
    glSecondaryColor3ub
       secondaryColor3v :: Ptr GLboolean -> IO ()
    secondaryColor3v = Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLboolean -> m ()
    glSecondaryColor3ubv

    instance ColorComponent GLushort where
       color3 :: GLushort -> GLushort -> GLushort -> IO ()
    color3 = GLushort -> GLushort -> GLushort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLushort -> GLushort -> GLushort -> m ()
    glColor3us
       color4 :: GLushort -> GLushort -> GLushort -> GLushort -> IO ()
    color4 = GLushort -> GLushort -> GLushort -> GLushort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLushort -> GLushort -> GLushort -> GLushort -> m ()
    glColor4us

       color3v :: Ptr GLushort -> IO ()
    color3v = Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
    glColor3usv
       color4v :: Ptr GLushort -> IO ()
    color4v = Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
    glColor4usv

       secondaryColor3 :: GLushort -> GLushort -> GLushort -> IO ()
    secondaryColor3 = GLushort -> GLushort -> GLushort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLushort -> GLushort -> GLushort -> m ()
    glSecondaryColor3us
       secondaryColor3v :: Ptr GLushort -> IO ()
    secondaryColor3v = Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
    glSecondaryColor3usv

    instance ColorComponent GLuint where
       color3 :: GLenum -> GLenum -> GLenum -> IO ()
    color3 = GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> m ()
    glColor3ui
       color4 :: GLenum -> GLenum -> GLenum -> GLenum -> IO ()
    color4 = GLenum -> GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> GLenum -> m ()
    glColor4ui

       color3v :: Ptr GLenum -> IO ()
    color3v = Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLenum -> m ()
    glColor3uiv
       color4v :: Ptr GLenum -> IO ()
    color4v = Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLenum -> m ()
    glColor4uiv

       secondaryColor3 :: GLenum -> GLenum -> GLenum -> IO ()
    secondaryColor3 = GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> m ()
    glSecondaryColor3ui
       secondaryColor3v :: Ptr GLenum -> IO ()
    secondaryColor3v = Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLenum -> m ()
    glSecondaryColor3uiv

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

    -- | Change the current color.

    class Color a where
       color  ::     a -> IO ()
       colorv :: Ptr a -> IO ()

    instance ColorComponent a => Color (Color3 a) where
       color :: Color3 a -> IO ()
    color (Color3 a
    r a
    g a
    b) = a -> a -> a -> IO ()
    forall a. ColorComponent a => a -> a -> a -> IO ()
    color3 a
    r a
    g a
    b
       colorv :: Ptr (Color3 a) -> IO ()
    colorv = Ptr a -> IO ()
    forall a. ColorComponent a => Ptr a -> IO ()
    color3v (Ptr a -> IO ())
    -> (Ptr (Color3 a) -> Ptr a) -> Ptr (Color3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color3 b) -> Ptr b
    forall {b}. Ptr (Color3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color3 b) -> Ptr b)

    instance ColorComponent a => Color (Color4 a) where
       color :: Color4 a -> IO ()
    color (Color4 a
    r a
    g a
    b a
    a) = a -> a -> a -> a -> IO ()
    forall a. ColorComponent a => a -> a -> a -> a -> IO ()
    color4 a
    r a
    g a
    b a
    a
       colorv :: Ptr (Color4 a) -> IO ()
    colorv = Ptr a -> IO ()
    forall a. ColorComponent a => Ptr a -> IO ()
    color4v (Ptr a -> IO ())
    -> (Ptr (Color4 a) -> Ptr a) -> Ptr (Color4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color4 b) -> Ptr b
    forall {b}. Ptr (Color4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color4 b) -> Ptr b)

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

    -- | Change the current secondary color.

    class SecondaryColor a where
       secondaryColor  ::     a -> IO ()
       secondaryColorv :: Ptr a -> IO ()

    instance ColorComponent a => SecondaryColor (Color3 a) where
       secondaryColor :: Color3 a -> IO ()
    secondaryColor (Color3 a
    r a
    g a
    b) = a -> a -> a -> IO ()
    forall a. ColorComponent a => a -> a -> a -> IO ()
    secondaryColor3 a
    r a
    g a
    b
       secondaryColorv :: Ptr (Color3 a) -> IO ()
    secondaryColorv = Ptr a -> IO ()
    forall a. ColorComponent a => Ptr a -> IO ()
    secondaryColor3v (Ptr a -> IO ())
    -> (Ptr (Color3 a) -> Ptr a) -> Ptr (Color3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color3 b) -> Ptr b
    forall {b}. Ptr (Color3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color3 b) -> Ptr b)

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

    -- The current color index. The initial value is 1. Note that this state
    -- variable is significant only when the GL is in color index mode.

    currentIndex :: StateVar (Index1 GLint)
    currentIndex :: StateVar (Index1 GLint)
    currentIndex = IO (Index1 GLint)
    -> (Index1 GLint -> IO ()) -> StateVar (Index1 GLint)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar ((GLint -> Index1 GLint) -> PName1I -> IO (Index1 GLint)
    forall p a. GetPName1I p => (GLint -> a) -> p -> IO a
    forall a. (GLint -> a) -> PName1I -> IO a
    getInteger1 GLint -> Index1 GLint
    forall a. a -> Index1 a
    Index1 PName1I
    GetCurrentIndex) Index1 GLint -> IO ()
    forall a. Index a => a -> IO ()
    index

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

    -- | The class of all types which can be used as a color index.

    class IndexComponent a where
       index1 :: a -> IO ()
       index1v :: Ptr a -> IO ()

    instance IndexComponent GLshort where
       index1 :: GLshort -> IO ()
    index1 = GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLshort -> m ()
    glIndexs
       index1v :: Ptr GLshort -> IO ()
    index1v = Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
    glIndexsv

    instance IndexComponent GLint where
       index1 :: GLint -> IO ()
    index1 = GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLint -> m ()
    glIndexi
       index1v :: Ptr GLint -> IO ()
    index1v = Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
    glIndexiv

    instance IndexComponent GLfloat where
       index1 :: GLfloat -> IO ()
    index1 = GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLfloat -> m ()
    glIndexf
       index1v :: Ptr GLfloat -> IO ()
    index1v = Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
    glIndexfv

    instance IndexComponent GLdouble where
       index1 :: GLdouble -> IO ()
    index1 = GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLdouble -> m ()
    glIndexd
       index1v :: Ptr GLdouble -> IO ()
    index1v = Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
    glIndexdv

    instance IndexComponent GLubyte where
       index1 :: GLboolean -> IO ()
    index1 = GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => GLboolean -> m ()
    glIndexub
       index1v :: Ptr GLboolean -> IO ()
    index1v = Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => Ptr GLboolean -> m ()
    glIndexubv

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

    -- | Change the current color index.

    class Index a where
       index  ::     a -> IO ()  -- Collision with Prelude.index
       indexv :: Ptr a -> IO ()

    instance IndexComponent a => Index (Index1 a) where
       index :: Index1 a -> IO ()
    index (Index1 a
    i) = a -> IO ()
    forall a. IndexComponent a => a -> IO ()
    index1 a
    i
       indexv :: Ptr (Index1 a) -> IO ()
    indexv = Ptr a -> IO ()
    forall a. IndexComponent a => Ptr a -> IO ()
    index1v (Ptr a -> IO ())
    -> (Ptr (Index1 a) -> Ptr a) -> Ptr (Index1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Index1 b) -> Ptr b
    forall {b}. Ptr (Index1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Index1 b) -> Ptr b)

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

    data IntegerHandling =
         ToFloat
       | ToNormalizedFloat
       | KeepIntegral
       deriving ( IntegerHandling -> IntegerHandling -> Bool
    (IntegerHandling -> IntegerHandling -> Bool)
    -> (IntegerHandling -> IntegerHandling -> Bool)
    -> Eq IntegerHandling
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: IntegerHandling -> IntegerHandling -> Bool
    == :: IntegerHandling -> IntegerHandling -> Bool
    $c/= :: IntegerHandling -> IntegerHandling -> Bool
    /= :: IntegerHandling -> IntegerHandling -> Bool
    Eq, Eq IntegerHandling
    Eq IntegerHandling =>
    (IntegerHandling -> IntegerHandling -> Ordering)
    -> (IntegerHandling -> IntegerHandling -> Bool)
    -> (IntegerHandling -> IntegerHandling -> Bool)
    -> (IntegerHandling -> IntegerHandling -> Bool)
    -> (IntegerHandling -> IntegerHandling -> Bool)
    -> (IntegerHandling -> IntegerHandling -> IntegerHandling)
    -> (IntegerHandling -> IntegerHandling -> IntegerHandling)
    -> Ord IntegerHandling
    IntegerHandling -> IntegerHandling -> Bool
    IntegerHandling -> IntegerHandling -> Ordering
    IntegerHandling -> IntegerHandling -> IntegerHandling
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: IntegerHandling -> IntegerHandling -> Ordering
    compare :: IntegerHandling -> IntegerHandling -> Ordering
    $c< :: IntegerHandling -> IntegerHandling -> Bool
    < :: IntegerHandling -> IntegerHandling -> Bool
    $c<= :: IntegerHandling -> IntegerHandling -> Bool
    <= :: IntegerHandling -> IntegerHandling -> Bool
    $c> :: IntegerHandling -> IntegerHandling -> Bool
    > :: IntegerHandling -> IntegerHandling -> Bool
    $c>= :: IntegerHandling -> IntegerHandling -> Bool
    >= :: IntegerHandling -> IntegerHandling -> Bool
    $cmax :: IntegerHandling -> IntegerHandling -> IntegerHandling
    max :: IntegerHandling -> IntegerHandling -> IntegerHandling
    $cmin :: IntegerHandling -> IntegerHandling -> IntegerHandling
    min :: IntegerHandling -> IntegerHandling -> IntegerHandling
    Ord, Int -> IntegerHandling -> ShowS
    [IntegerHandling] -> ShowS
    IntegerHandling -> String
    (Int -> IntegerHandling -> ShowS)
    -> (IntegerHandling -> String)
    -> ([IntegerHandling] -> ShowS)
    -> Show IntegerHandling
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> IntegerHandling -> ShowS
    showsPrec :: Int -> IntegerHandling -> ShowS
    $cshow :: IntegerHandling -> String
    show :: IntegerHandling -> String
    $cshowList :: [IntegerHandling] -> ShowS
    showList :: [IntegerHandling] -> ShowS
    Show )

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

    currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
    currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
    currentVertexAttrib AttribLocation
    location =
       IO (Vertex4 GLfloat)
    -> (Vertex4 GLfloat -> IO ()) -> StateVar (Vertex4 GLfloat)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar
          ((GLfloat -> GLfloat -> GLfloat -> GLfloat -> Vertex4 GLfloat)
    -> AttribLocation -> GetVertexAttribPName -> IO (Vertex4 GLfloat)
    forall b.
    (GLfloat -> GLfloat -> GLfloat -> GLfloat -> b)
    -> AttribLocation -> GetVertexAttribPName -> IO b
    getVertexAttribFloat4 GLfloat -> GLfloat -> GLfloat -> GLfloat -> Vertex4 GLfloat
    forall a. a -> a -> a -> a -> Vertex4 a
    Vertex4 AttribLocation
    location GetVertexAttribPName
    GetCurrentVertexAttrib)
          (IntegerHandling -> AttribLocation -> Vertex4 GLfloat -> IO ()
    forall a.
    VertexAttrib a =>
    IntegerHandling -> AttribLocation -> a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location)

    currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
    currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
    currentVertexAttribI AttribLocation
    location =
       IO (Vertex4 GLint)
    -> (Vertex4 GLint -> IO ()) -> StateVar (Vertex4 GLint)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar
          ((GLint -> GLint -> GLint -> GLint -> Vertex4 GLint)
    -> AttribLocation -> GetVertexAttribPName -> IO (Vertex4 GLint)
    forall b.
    (GLint -> GLint -> GLint -> GLint -> b)
    -> AttribLocation -> GetVertexAttribPName -> IO b
    getVertexAttribIInteger4 GLint -> GLint -> GLint -> GLint -> Vertex4 GLint
    forall a. a -> a -> a -> a -> Vertex4 a
    Vertex4 AttribLocation
    location GetVertexAttribPName
    GetCurrentVertexAttrib)
          (IntegerHandling -> AttribLocation -> Vertex4 GLint -> IO ()
    forall a.
    VertexAttrib a =>
    IntegerHandling -> AttribLocation -> a -> IO ()
    vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location)

    currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint)
    currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLenum)
    currentVertexAttribIu AttribLocation
    location =
       IO (Vertex4 GLenum)
    -> (Vertex4 GLenum -> IO ()) -> StateVar (Vertex4 GLenum)
    forall a. IO a -> (a -> IO ()) -> StateVar a
    makeStateVar
          ((GLenum -> GLenum -> GLenum -> GLenum -> Vertex4 GLenum)
    -> AttribLocation -> GetVertexAttribPName -> IO (Vertex4 GLenum)
    forall b.
    (GLenum -> GLenum -> GLenum -> GLenum -> b)
    -> AttribLocation -> GetVertexAttribPName -> IO b
    getVertexAttribIuInteger4 GLenum -> GLenum -> GLenum -> GLenum -> Vertex4 GLenum
    forall a. a -> a -> a -> a -> Vertex4 a
    Vertex4 AttribLocation
    location GetVertexAttribPName
    GetCurrentVertexAttrib)
          (IntegerHandling -> AttribLocation -> Vertex4 GLenum -> IO ()
    forall a.
    VertexAttrib a =>
    IntegerHandling -> AttribLocation -> a -> IO ()
    vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location)

    --------------------------------------------------------------------------------
    -- The generic vertex attribute API is not as orthogonal as we would like.
    -- Minimal methods: vertexAttrib4v and vertexAttrib4Nv and vertexAttrib4Iv

    -- | The class of all types which can be used as a generic vertex attribute.
    -- NOTE: Do not use the methods of this class directly, they were only exported
    -- by accident and will be hidden in future versions of this package.

    class (Storable a, Num a) => VertexAttribComponent a where
       vertexAttrib1 :: AttribLocation -> a -> IO ()
       vertexAttrib2 :: AttribLocation -> a -> a -> IO ()
       vertexAttrib3 :: AttribLocation -> a -> a -> a -> IO ()
       vertexAttrib4 :: AttribLocation -> a -> a -> a -> a -> IO ()

       vertexAttrib1N :: AttribLocation -> a -> IO ()
       vertexAttrib2N :: AttribLocation -> a -> a -> IO ()
       vertexAttrib3N :: AttribLocation -> a -> a -> a -> IO ()
       vertexAttrib4N :: AttribLocation -> a -> a -> a -> a -> IO ()

       vertexAttrib1I :: AttribLocation -> a -> IO ()
       vertexAttrib2I :: AttribLocation -> a -> a -> IO ()
       vertexAttrib3I :: AttribLocation -> a -> a -> a -> IO ()
       vertexAttrib4I :: AttribLocation -> a -> a -> a -> a -> IO ()

       vertexAttrib1v :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib2v :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib3v :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib4v :: AttribLocation -> Ptr a -> IO ()

       vertexAttrib1Nv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib2Nv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib3Nv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib4Nv :: AttribLocation -> Ptr a -> IO ()

       vertexAttrib1Iv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib2Iv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib3Iv :: AttribLocation -> Ptr a -> IO ()
       vertexAttrib4Iv :: AttribLocation -> Ptr a -> IO ()

       vertexAttrib1 AttribLocation
    location a
    x = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    x a
    0 a
    0 a
    1
       vertexAttrib2 AttribLocation
    location a
    x a
    y = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    x a
    y a
    0 a
    1
       vertexAttrib3 AttribLocation
    location a
    x a
    y a
    z = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    x a
    y a
    z a
    1
       vertexAttrib4 AttribLocation
    location a
    x a
    y a
    z a
    w = Int -> (Ptr a -> IO ()) -> IO ()
    forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
    allocaArray Int
    4 ((Ptr a -> IO ()) -> IO ()) -> (Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr a
    buf -> do
                                           Ptr a -> a -> a -> a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
    poke4 Ptr a
    buf a
    x a
    y a
    z a
    w
                                           AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v AttribLocation
    location Ptr a
    buf

       vertexAttrib1N AttribLocation
    location a
    x = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    x a
    0 a
    0 a
    1
       vertexAttrib2N AttribLocation
    location a
    x a
    y = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    x a
    y a
    0 a
    1
       vertexAttrib3N AttribLocation
    location a
    x a
    y a
    z = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    x a
    y a
    z a
    1
       vertexAttrib4N AttribLocation
    location a
    x a
    y a
    z a
    w = Int -> (Ptr a -> IO ()) -> IO ()
    forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
    allocaArray Int
    4 ((Ptr a -> IO ()) -> IO ()) -> (Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr a
    buf -> do
                                           Ptr a -> a -> a -> a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
    poke4 Ptr a
    buf a
    x a
    y a
    z a
    w
                                           AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Nv AttribLocation
    location Ptr a
    buf

       vertexAttrib1I AttribLocation
    location a
    x = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    x a
    0 a
    0 a
    1
       vertexAttrib2I AttribLocation
    location a
    x a
    y = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    x a
    y a
    0 a
    1
       vertexAttrib3I AttribLocation
    location a
    x a
    y a
    z = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    x a
    y a
    z a
    1
       vertexAttrib4I AttribLocation
    location a
    x a
    y a
    z a
    w = Int -> (Ptr a -> IO ()) -> IO ()
    forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
    allocaArray Int
    4 ((Ptr a -> IO ()) -> IO ()) -> (Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr a
    buf -> do
                                           Ptr a -> a -> a -> a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
    poke4 Ptr a
    buf a
    x a
    y a
    z a
    w
                                           AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Iv AttribLocation
    location Ptr a
    buf

       vertexAttrib1v AttribLocation
    location = (a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
    peek1M ((a -> IO ()) -> Ptr a -> IO ()) -> (a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location
       vertexAttrib2v AttribLocation
    location = (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
    peek2M ((a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2 AttribLocation
    location
       vertexAttrib3v AttribLocation
    location = (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
    peek3M ((a -> a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location

       vertexAttrib1Nv AttribLocation
    location = (a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
    peek1M ((a -> IO ()) -> Ptr a -> IO ()) -> (a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location
       vertexAttrib2Nv AttribLocation
    location = (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
    peek2M ((a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2N AttribLocation
    location
       vertexAttrib3Nv AttribLocation
    location = (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
    peek3M ((a -> a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location

       vertexAttrib1Iv AttribLocation
    location = (a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
    peek1M ((a -> IO ()) -> Ptr a -> IO ()) -> (a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location
       vertexAttrib2Iv AttribLocation
    location = (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
    peek2M ((a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2I AttribLocation
    location
       vertexAttrib3Iv AttribLocation
    location = (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
    peek3M ((a -> a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location

    instance VertexAttribComponent GLbyte where
       vertexAttrib4v :: AttribLocation -> Ptr GLbyte -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLbyte -> m ()
    glVertexAttrib4bv GLenum
    al
       vertexAttrib4Nv :: AttribLocation -> Ptr GLbyte -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLbyte -> m ()
    glVertexAttrib4Nbv GLenum
    al
       vertexAttrib4Iv :: AttribLocation -> Ptr GLbyte -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLbyte -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLbyte -> m ()
    glVertexAttribI4bv GLenum
    al

    instance VertexAttribComponent GLubyte where
       vertexAttrib4N :: AttribLocation
    -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> IO ()
    vertexAttrib4N (AttribLocation GLenum
    al) = GLenum -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> m ()
    glVertexAttrib4Nub GLenum
    al
       vertexAttrib4v :: AttribLocation -> Ptr GLboolean -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLboolean -> m ()
    glVertexAttrib4ubv GLenum
    al
       vertexAttrib4Nv :: AttribLocation -> Ptr GLboolean -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLboolean -> m ()
    glVertexAttrib4Nubv GLenum
    al
       vertexAttrib4Iv :: AttribLocation -> Ptr GLboolean -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLboolean -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLboolean -> m ()
    glVertexAttribI4ubv GLenum
    al

    instance VertexAttribComponent GLshort where
       vertexAttrib1 :: AttribLocation -> GLshort -> IO ()
    vertexAttrib1 (AttribLocation GLenum
    al) = GLenum -> GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLshort -> m ()
    glVertexAttrib1s GLenum
    al
       vertexAttrib2 :: AttribLocation -> GLshort -> GLshort -> IO ()
    vertexAttrib2 (AttribLocation GLenum
    al) = GLenum -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> m ()
    glVertexAttrib2s GLenum
    al
       vertexAttrib3 :: AttribLocation -> GLshort -> GLshort -> GLshort -> IO ()
    vertexAttrib3 (AttribLocation GLenum
    al) = GLenum -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> GLshort -> m ()
    glVertexAttrib3s GLenum
    al
       vertexAttrib4 :: AttribLocation -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    vertexAttrib4 (AttribLocation GLenum
    al) = GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> m ()
    glVertexAttrib4s GLenum
    al

       vertexAttrib1v :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib1v (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttrib1sv GLenum
    al
       vertexAttrib2v :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib2v (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttrib2sv GLenum
    al
       vertexAttrib3v :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib3v (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttrib3sv GLenum
    al
       vertexAttrib4v :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttrib4sv GLenum
    al

       vertexAttrib4Nv :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttrib4Nsv GLenum
    al

       vertexAttrib4Iv :: AttribLocation -> Ptr GLshort -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLshort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLshort -> m ()
    glVertexAttribI4sv GLenum
    al

    instance VertexAttribComponent GLushort where
       vertexAttrib4v :: AttribLocation -> Ptr GLushort -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLushort -> m ()
    glVertexAttrib4usv GLenum
    al
       vertexAttrib4Nv :: AttribLocation -> Ptr GLushort -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLushort -> m ()
    glVertexAttrib4Nusv GLenum
    al
       vertexAttrib4Iv :: AttribLocation -> Ptr GLushort -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLushort -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLushort -> m ()
    glVertexAttribI4usv GLenum
    al

    instance VertexAttribComponent GLint where
       vertexAttrib1I :: AttribLocation -> GLint -> IO ()
    vertexAttrib1I (AttribLocation GLenum
    al) = GLenum -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLint -> m ()
    glVertexAttribI1i GLenum
    al
       vertexAttrib2I :: AttribLocation -> GLint -> GLint -> IO ()
    vertexAttrib2I (AttribLocation GLenum
    al) = GLenum -> GLint -> GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLint -> GLint -> m ()
    glVertexAttribI2i GLenum
    al
       vertexAttrib3I :: AttribLocation -> GLint -> GLint -> GLint -> IO ()
    vertexAttrib3I (AttribLocation GLenum
    al) = GLenum -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLint -> GLint -> m ()
    glVertexAttribI3i GLenum
    al
       vertexAttrib4I :: AttribLocation -> GLint -> GLint -> GLint -> GLint -> IO ()
    vertexAttrib4I (AttribLocation GLenum
    al) = GLenum -> GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLint -> GLint -> GLint -> m ()
    glVertexAttribI4i GLenum
    al

       vertexAttrib4v :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttrib4iv GLenum
    al

       vertexAttrib4Nv :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttrib4Niv GLenum
    al

       vertexAttrib1Iv :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib1Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttribI1iv GLenum
    al
       vertexAttrib2Iv :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib2Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttribI2iv GLenum
    al
       vertexAttrib3Iv :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib3Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttribI3iv GLenum
    al
       vertexAttrib4Iv :: AttribLocation -> Ptr GLint -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLint -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLint -> m ()
    glVertexAttribI4iv GLenum
    al

    instance VertexAttribComponent GLuint where
       vertexAttrib1I :: AttribLocation -> GLenum -> IO ()
    vertexAttrib1I (AttribLocation GLenum
    al) = GLenum -> GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLenum -> m ()
    glVertexAttribI1ui GLenum
    al
       vertexAttrib2I :: AttribLocation -> GLenum -> GLenum -> IO ()
    vertexAttrib2I (AttribLocation GLenum
    al) = GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> m ()
    glVertexAttribI2ui GLenum
    al
       vertexAttrib3I :: AttribLocation -> GLenum -> GLenum -> GLenum -> IO ()
    vertexAttrib3I (AttribLocation GLenum
    al) = GLenum -> GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> GLenum -> m ()
    glVertexAttribI3ui GLenum
    al
       vertexAttrib4I :: AttribLocation -> GLenum -> GLenum -> GLenum -> GLenum -> IO ()
    vertexAttrib4I (AttribLocation GLenum
    al) = GLenum -> GLenum -> GLenum -> GLenum -> GLenum -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLenum -> GLenum -> GLenum -> GLenum -> m ()
    glVertexAttribI4ui GLenum
    al

       vertexAttrib4v :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttrib4uiv GLenum
    al

       vertexAttrib4Nv :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib4Nv (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttrib4Nuiv GLenum
    al

       vertexAttrib1Iv :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib1Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttribI1uiv GLenum
    al
       vertexAttrib2Iv :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib2Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttribI2uiv GLenum
    al
       vertexAttrib3Iv :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib3Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttribI3uiv GLenum
    al
       vertexAttrib4Iv :: AttribLocation -> Ptr GLenum -> IO ()
    vertexAttrib4Iv (AttribLocation GLenum
    al) = GLenum -> Ptr GLenum -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLenum -> m ()
    glVertexAttribI4uiv GLenum
    al

    instance VertexAttribComponent GLfloat where
       vertexAttrib1 :: AttribLocation -> GLfloat -> IO ()
    vertexAttrib1 (AttribLocation GLenum
    al) = GLenum -> GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLfloat -> m ()
    glVertexAttrib1f GLenum
    al
       vertexAttrib2 :: AttribLocation -> GLfloat -> GLfloat -> IO ()
    vertexAttrib2 (AttribLocation GLenum
    al) = GLenum -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> m ()
    glVertexAttrib2f GLenum
    al
       vertexAttrib3 :: AttribLocation -> GLfloat -> GLfloat -> GLfloat -> IO ()
    vertexAttrib3 (AttribLocation GLenum
    al) = GLenum -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> GLfloat -> m ()
    glVertexAttrib3f GLenum
    al
       vertexAttrib4 :: AttribLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    vertexAttrib4 (AttribLocation GLenum
    al) = GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
    glVertexAttrib4f GLenum
    al

       vertexAttrib1v :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib1v (AttribLocation GLenum
    al) = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glVertexAttrib1fv GLenum
    al
       vertexAttrib2v :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib2v (AttribLocation GLenum
    al) = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glVertexAttrib2fv GLenum
    al
       vertexAttrib3v :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib3v (AttribLocation GLenum
    al) = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glVertexAttrib3fv GLenum
    al
       vertexAttrib4v :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLfloat -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLfloat -> m ()
    glVertexAttrib4fv GLenum
    al

       vertexAttrib4Nv :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib4Nv = AttribLocation -> Ptr GLfloat -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v

       vertexAttrib4Iv :: AttribLocation -> Ptr GLfloat -> IO ()
    vertexAttrib4Iv = AttribLocation -> Ptr GLfloat -> IO ()
    forall a.
    (Storable a, RealFrac a) =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4IvRealFrac

    vertexAttrib4IvRealFrac :: (Storable a, RealFrac a) => AttribLocation -> Ptr a -> IO ()
    vertexAttrib4IvRealFrac :: forall a.
    (Storable a, RealFrac a) =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4IvRealFrac AttribLocation
    location = (a -> a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b.
    Storable a =>
    (a -> a -> a -> a -> IO b) -> Ptr a -> IO b
    peek4M ((a -> a -> a -> a -> IO ()) -> Ptr a -> IO ())
    -> (a -> a -> a -> a -> IO ()) -> Ptr a -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \a
    x a
    y a
    z a
    w ->
       AttribLocation -> GLint -> GLint -> GLint -> GLint -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location (a -> GLint
    forall a. RealFrac a => a -> GLint
    toGLint a
    x) (a -> GLint
    forall a. RealFrac a => a -> GLint
    toGLint a
    y) (a -> GLint
    forall a. RealFrac a => a -> GLint
    toGLint a
    z) (a -> GLint
    forall a. RealFrac a => a -> GLint
    toGLint a
    w)

    -- formula 2.6 from the OpenGL 3.1 spec
    toGLint :: RealFrac a => a -> GLint
    toGLint :: forall a. RealFrac a => a -> GLint
    toGLint = a -> GLint
    forall b. Integral b => a -> b
    forall a b. (RealFrac a, Integral b) => a -> b
    truncate (a -> GLint) -> (a -> a) -> a -> GLint
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (GLint -> a
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (GLint
    forall a. Bounded a => a
    maxBound :: GLint) a -> a -> a
    forall a. Num a => a -> a -> a
    *)(a -> a) -> (a -> a) -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> a
    clamp
       where clamp :: a -> a
    clamp = a -> a -> a
    forall a. Ord a => a -> a -> a
    max (-a
    1.0) (a -> a) -> (a -> a) -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> a -> a
    forall a. Ord a => a -> a -> a
    min a
    1.0

    instance VertexAttribComponent GLdouble where
       vertexAttrib1 :: AttribLocation -> GLdouble -> IO ()
    vertexAttrib1 (AttribLocation GLenum
    al) = GLenum -> GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> GLdouble -> m ()
    glVertexAttrib1d GLenum
    al
       vertexAttrib2 :: AttribLocation -> GLdouble -> GLdouble -> IO ()
    vertexAttrib2 (AttribLocation GLenum
    al) = GLenum -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> m ()
    glVertexAttrib2d GLenum
    al
       vertexAttrib3 :: AttribLocation -> GLdouble -> GLdouble -> GLdouble -> IO ()
    vertexAttrib3 (AttribLocation GLenum
    al) = GLenum -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> GLdouble -> m ()
    glVertexAttrib3d GLenum
    al
       vertexAttrib4 :: AttribLocation
    -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    vertexAttrib4 (AttribLocation GLenum
    al) = GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
    glVertexAttrib4d GLenum
    al

       vertexAttrib1v :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib1v (AttribLocation GLenum
    al) = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glVertexAttrib1dv GLenum
    al
       vertexAttrib2v :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib2v (AttribLocation GLenum
    al) = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glVertexAttrib2dv GLenum
    al
       vertexAttrib3v :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib3v (AttribLocation GLenum
    al) = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glVertexAttrib3dv GLenum
    al
       vertexAttrib4v :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib4v (AttribLocation GLenum
    al) = GLenum -> Ptr GLdouble -> IO ()
    forall (m :: * -> *). MonadIO m => GLenum -> Ptr GLdouble -> m ()
    glVertexAttrib4dv GLenum
    al

       vertexAttrib4Nv :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib4Nv = AttribLocation -> Ptr GLdouble -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v

       vertexAttrib4Iv :: AttribLocation -> Ptr GLdouble -> IO ()
    vertexAttrib4Iv = AttribLocation -> Ptr GLdouble -> IO ()
    forall a.
    (Storable a, RealFrac a) =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4IvRealFrac

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

    class VertexAttrib a where
       vertexAttrib  :: IntegerHandling -> AttribLocation ->     a -> IO ()
       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr a -> IO ()

    instance VertexAttribComponent a => VertexAttrib (Vertex1 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex1 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vertex1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vertex1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vertex1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location a
    i

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex1 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex1 a) -> Ptr a) -> Ptr (Vertex1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex1 b) -> Ptr b
    forall {b}. Ptr (Vertex1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex1 a) -> Ptr a) -> Ptr (Vertex1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex1 b) -> Ptr b
    forall {b}. Ptr (Vertex1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex1 a) -> Ptr a) -> Ptr (Vertex1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex1 b) -> Ptr b
    forall {b}. Ptr (Vertex1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex1 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vertex2 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex2 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vertex2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2 AttribLocation
    location a
    x a
    y
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vertex2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2N AttribLocation
    location a
    x a
    y
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vertex2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2I AttribLocation
    location a
    x a
    y

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex2 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex2 a) -> Ptr a) -> Ptr (Vertex2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex2 b) -> Ptr b
    forall {b}. Ptr (Vertex2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex2 a) -> Ptr a) -> Ptr (Vertex2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex2 b) -> Ptr b
    forall {b}. Ptr (Vertex2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex2 a) -> Ptr a) -> Ptr (Vertex2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex2 b) -> Ptr b
    forall {b}. Ptr (Vertex2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex2 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vertex3 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex3 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vertex3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vertex3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vertex3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location a
    x a
    y a
    z

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex3 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex3 a) -> Ptr a) -> Ptr (Vertex3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex3 b) -> Ptr b
    forall {b}. Ptr (Vertex3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex3 a) -> Ptr a) -> Ptr (Vertex3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex3 b) -> Ptr b
    forall {b}. Ptr (Vertex3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex3 a) -> Ptr a) -> Ptr (Vertex3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex3 b) -> Ptr b
    forall {b}. Ptr (Vertex3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex3 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vertex4 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex4 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vertex4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    x a
    y a
    z a
    w
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vertex4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    x a
    y a
    z a
    w
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vertex4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    x a
    y a
    z a
    w

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex4 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex4 a) -> Ptr a) -> Ptr (Vertex4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex4 b) -> Ptr b
    forall {b}. Ptr (Vertex4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex4 a) -> Ptr a) -> Ptr (Vertex4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex4 b) -> Ptr b
    forall {b}. Ptr (Vertex4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vertex4 a) -> Ptr a) -> Ptr (Vertex4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vertex4 b) -> Ptr b
    forall {b}. Ptr (Vertex4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vertex4 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vector1 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vector1 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vector1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vector1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vector1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location a
    i

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector1 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector1 a) -> Ptr a) -> Ptr (Vector1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector1 b) -> Ptr b
    forall {b}. Ptr (Vector1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector1 a) -> Ptr a) -> Ptr (Vector1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector1 b) -> Ptr b
    forall {b}. Ptr (Vector1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector1 a) -> Ptr a) -> Ptr (Vector1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector1 b) -> Ptr b
    forall {b}. Ptr (Vector1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector1 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vector2 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vector2 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vector2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2 AttribLocation
    location a
    x a
    y
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vector2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2N AttribLocation
    location a
    x a
    y
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vector2 a
    x a
    y) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2I AttribLocation
    location a
    x a
    y

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector2 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector2 a) -> Ptr a) -> Ptr (Vector2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector2 b) -> Ptr b
    forall {b}. Ptr (Vector2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector2 a) -> Ptr a) -> Ptr (Vector2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector2 b) -> Ptr b
    forall {b}. Ptr (Vector2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector2 a) -> Ptr a) -> Ptr (Vector2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector2 b) -> Ptr b
    forall {b}. Ptr (Vector2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector2 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vector3 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vector3 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vector3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vector3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vector3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location a
    x a
    y a
    z

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector3 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector3 a) -> Ptr a) -> Ptr (Vector3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector3 b) -> Ptr b
    forall {b}. Ptr (Vector3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector3 a) -> Ptr a) -> Ptr (Vector3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector3 b) -> Ptr b
    forall {b}. Ptr (Vector3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector3 a) -> Ptr a) -> Ptr (Vector3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector3 b) -> Ptr b
    forall {b}. Ptr (Vector3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector3 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Vector4 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Vector4 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Vector4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    x a
    y a
    z a
    w
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Vector4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    x a
    y a
    z a
    w
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Vector4 a
    x a
    y a
    z a
    w) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    x a
    y a
    z a
    w

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector4 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector4 a) -> Ptr a) -> Ptr (Vector4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector4 b) -> Ptr b
    forall {b}. Ptr (Vector4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector4 a) -> Ptr a) -> Ptr (Vector4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector4 b) -> Ptr b
    forall {b}. Ptr (Vector4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Vector4 a) -> Ptr a) -> Ptr (Vector4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Vector4 b) -> Ptr b
    forall {b}. Ptr (Vector4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Vector4 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (TexCoord1 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord1 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (TexCoord1 a
    s) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location a
    s
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (TexCoord1 a
    s) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location a
    s
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (TexCoord1 a
    s) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location a
    s

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord1 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord1 a) -> Ptr a) -> Ptr (TexCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord1 b) -> Ptr b
    forall {b}. Ptr (TexCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord1 a) -> Ptr a) -> Ptr (TexCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord1 b) -> Ptr b
    forall {b}. Ptr (TexCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord1 a) -> Ptr a) -> Ptr (TexCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord1 b) -> Ptr b
    forall {b}. Ptr (TexCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord1 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (TexCoord2 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord2 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (TexCoord2 a
    s a
    t) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2 AttribLocation
    location a
    s a
    t
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (TexCoord2 a
    s a
    t) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2N AttribLocation
    location a
    s a
    t
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (TexCoord2 a
    s a
    t) = AttribLocation -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> IO ()
    vertexAttrib2I AttribLocation
    location a
    s a
    t

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord2 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord2 a) -> Ptr a) -> Ptr (TexCoord2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord2 b) -> Ptr b
    forall {b}. Ptr (TexCoord2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord2 a) -> Ptr a) -> Ptr (TexCoord2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord2 b) -> Ptr b
    forall {b}. Ptr (TexCoord2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord2 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib2Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord2 a) -> Ptr a) -> Ptr (TexCoord2 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord2 b) -> Ptr b
    forall {b}. Ptr (TexCoord2 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord2 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (TexCoord3 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord3 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (TexCoord3 a
    s a
    t a
    u) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location a
    s a
    t a
    u
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (TexCoord3 a
    s a
    t a
    u) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location a
    s a
    t a
    u
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (TexCoord3 a
    s a
    t a
    u) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location a
    s a
    t a
    u

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord3 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord3 a) -> Ptr a) -> Ptr (TexCoord3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord3 b) -> Ptr b
    forall {b}. Ptr (TexCoord3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord3 a) -> Ptr a) -> Ptr (TexCoord3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord3 b) -> Ptr b
    forall {b}. Ptr (TexCoord3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord3 a) -> Ptr a) -> Ptr (TexCoord3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord3 b) -> Ptr b
    forall {b}. Ptr (TexCoord3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord3 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (TexCoord4 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord4 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (TexCoord4 a
    s a
    t a
    u a
    v) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    s a
    t a
    u a
    v
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (TexCoord4 a
    s a
    t a
    u a
    v) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    s a
    t a
    u a
    v
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (TexCoord4 a
    s a
    t a
    u a
    v) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    s a
    t a
    u a
    v

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord4 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord4 a) -> Ptr a) -> Ptr (TexCoord4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord4 b) -> Ptr b
    forall {b}. Ptr (TexCoord4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord4 a) -> Ptr a) -> Ptr (TexCoord4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord4 b) -> Ptr b
    forall {b}. Ptr (TexCoord4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (TexCoord4 a) -> Ptr a) -> Ptr (TexCoord4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (TexCoord4 b) -> Ptr b
    forall {b}. Ptr (TexCoord4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (TexCoord4 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Normal3 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Normal3 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Normal3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Normal3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location a
    x a
    y a
    z
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Normal3 a
    x a
    y a
    z) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location a
    x a
    y a
    z

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Normal3 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Normal3 a) -> Ptr a) -> Ptr (Normal3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Normal3 b) -> Ptr b
    forall {b}. Ptr (Normal3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Normal3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Normal3 a) -> Ptr a) -> Ptr (Normal3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Normal3 b) -> Ptr b
    forall {b}. Ptr (Normal3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Normal3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Normal3 a) -> Ptr a) -> Ptr (Normal3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Normal3 b) -> Ptr b
    forall {b}. Ptr (Normal3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Normal3 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (FogCoord1 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> FogCoord1 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (FogCoord1 a
    c) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location a
    c
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (FogCoord1 a
    c) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location a
    c
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (FogCoord1 a
    c) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location a
    c

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (FogCoord1 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (FogCoord1 a) -> Ptr a) -> Ptr (FogCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (FogCoord1 b) -> Ptr b
    forall {b}. Ptr (FogCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (FogCoord1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (FogCoord1 a) -> Ptr a) -> Ptr (FogCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (FogCoord1 b) -> Ptr b
    forall {b}. Ptr (FogCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (FogCoord1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (FogCoord1 a) -> Ptr a) -> Ptr (FogCoord1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (FogCoord1 b) -> Ptr b
    forall {b}. Ptr (FogCoord1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (FogCoord1 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Color3 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Color3 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Color3 a
    r a
    g a
    b) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3 AttribLocation
    location a
    r a
    g a
    b
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Color3 a
    r a
    g a
    b) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3N AttribLocation
    location a
    r a
    g a
    b
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Color3 a
    r a
    g a
    b) = AttribLocation -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> IO ()
    vertexAttrib3I AttribLocation
    location a
    r a
    g a
    b

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color3 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color3 a) -> Ptr a) -> Ptr (Color3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color3 b) -> Ptr b
    forall {b}. Ptr (Color3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color3 a) -> Ptr a) -> Ptr (Color3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color3 b) -> Ptr b
    forall {b}. Ptr (Color3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color3 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib3Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color3 a) -> Ptr a) -> Ptr (Color3 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color3 b) -> Ptr b
    forall {b}. Ptr (Color3 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color3 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Color4 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Color4 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Color4 a
    r a
    g a
    b a
    a) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4 AttribLocation
    location a
    r a
    g a
    b a
    a
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Color4 a
    r a
    g a
    b a
    a) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4N AttribLocation
    location a
    r a
    g a
    b a
    a
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Color4 a
    r a
    g a
    b a
    a) = AttribLocation -> a -> a -> a -> a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> a -> a -> a -> a -> IO ()
    vertexAttrib4I AttribLocation
    location a
    r a
    g a
    b a
    a

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color4 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color4 a) -> Ptr a) -> Ptr (Color4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color4 b) -> Ptr b
    forall {b}. Ptr (Color4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color4 a) -> Ptr a) -> Ptr (Color4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color4 b) -> Ptr b
    forall {b}. Ptr (Color4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color4 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib4Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Color4 a) -> Ptr a) -> Ptr (Color4 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Color4 b) -> Ptr b
    forall {b}. Ptr (Color4 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Color4 b) -> Ptr b)

    instance VertexAttribComponent a => VertexAttrib (Index1 a) where
       vertexAttrib :: IntegerHandling -> AttribLocation -> Index1 a -> IO ()
    vertexAttrib IntegerHandling
    ToFloat AttribLocation
    location (Index1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1 AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    ToNormalizedFloat AttribLocation
    location (Index1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1N AttribLocation
    location a
    i
       vertexAttrib IntegerHandling
    KeepIntegral AttribLocation
    location (Index1 a
    i) = AttribLocation -> a -> IO ()
    forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
    vertexAttrib1I AttribLocation
    location a
    i

       vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Index1 a) -> IO ()
    vertexAttribv IntegerHandling
    ToFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1v AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Index1 a) -> Ptr a) -> Ptr (Index1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Index1 b) -> Ptr b
    forall {b}. Ptr (Index1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Index1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    ToNormalizedFloat AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Nv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Index1 a) -> Ptr a) -> Ptr (Index1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Index1 b) -> Ptr b
    forall {b}. Ptr (Index1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Index1 b) -> Ptr b)
       vertexAttribv IntegerHandling
    KeepIntegral AttribLocation
    location = AttribLocation -> Ptr a -> IO ()
    forall a.
    VertexAttribComponent a =>
    AttribLocation -> Ptr a -> IO ()
    vertexAttrib1Iv AttribLocation
    location (Ptr a -> IO ())
    -> (Ptr (Index1 a) -> Ptr a) -> Ptr (Index1 a) -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Ptr (Index1 b) -> Ptr b
    forall {b}. Ptr (Index1 b) -> Ptr b
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr (Index1 b) -> Ptr b)

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

    -- | An implementation must support at least 2 texture units, but it may
    -- support up to 32 ones. This state variable can be used to query the actual
    -- implementation limit.

    maxTextureUnit :: GettableStateVar TextureUnit
    maxTextureUnit :: GettableStateVar TextureUnit
    maxTextureUnit =
       GettableStateVar TextureUnit -> GettableStateVar TextureUnit
    forall a. IO a -> IO a
    makeGettableStateVar ((GLenum -> TextureUnit) -> PName1I -> GettableStateVar TextureUnit
    forall p a. GetPName1I p => (GLenum -> a) -> p -> IO a
    forall a. (GLenum -> a) -> PName1I -> IO a
    getEnum1 (GLenum -> TextureUnit
    TextureUnit (GLenum -> TextureUnit)
    -> (GLenum -> GLenum) -> GLenum -> TextureUnit
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . GLenum -> GLenum
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) PName1I
    GetMaxTextureUnits)