    --------------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.Rendering.OpenGL.GL.Texturing.Specification
    -- Copyright   :  (c) Sven Panne 2002-2019
    -- License     :  BSD3
    --
    -- Maintainer  :  Sven Panne <svenpanne@gmail.com>
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This module corresponds to section 3.8.1 (Texture Image Specification),
    -- section 3.8.2 (Alternate Texture Image Specification Commands), and section
    -- 3.8.3 (Compressed Texture Images) of the OpenGL 2.1 specs.
    --
    --------------------------------------------------------------------------------

    module Graphics.Rendering.OpenGL.GL.Texturing.Specification (
       -- * Texture Targets

       -- ** One-Dimensional Texture Targets
       TextureTarget1D(..),

       -- ** Two-Dimensional Texture Targets
       TextureTarget2D(..),
       TextureTarget2DMultisample(..),
       TextureTargetCubeMap(..),
       TextureTargetCubeMapFace(..),

       -- ** Three-Dimensional Texture Targets
       TextureTarget3D(..),
       TextureTarget2DMultisampleArray(..),

       -- ** Texture Buffer Target
       TextureTargetBuffer(..),

       -- ** Texture Target Classification
       BindableTextureTarget,
       ParameterizedTextureTarget,
       OneDimensionalTextureTarget,
       TwoDimensionalTextureTarget,
       ThreeDimensionalTextureTarget,
       QueryableTextureTarget,
       GettableTextureTarget,

       -- * Texture-related Data Types
       Level, Border,
       TexturePosition1D(..), TexturePosition2D(..), TexturePosition3D(..),
       TextureSize1D(..), TextureSize2D(..), TextureSize3D(..),

       -- * Texture Image Specification
       texImage1D, texImage2D, texImage3D,
       copyTexImage1D, copyTexImage2D,
       texSubImage1D, texSubImage2D, texSubImage3D,
       getTexImage,

       -- * Alternate Texture Image Specification Commands
       copyTexSubImage1D, copyTexSubImage2D, copyTexSubImage3D,

       -- * Compressed Texture Images
       CompressedTextureFormat(..), compressedTextureFormats,
       CompressedPixelData(..),
       compressedTexImage1D, compressedTexImage2D, compressedTexImage3D,
       compressedTexSubImage1D, compressedTexSubImage2D, compressedTexSubImage3D,
       getCompressedTexImage,

       -- * Multisample Texture Images
       SampleLocations(..), texImage2DMultisample, texImage3DMultisample,

       -- * Implementation-Dependent Limits
       maxTextureSize, maxCubeMapTextureSize, maxRectangleTextureSize,
       max3DTextureSize, maxArrayTextureLayers, maxSampleMaskWords,
       maxColorTextureSamples, maxDepthTextureSamples, maxIntegerSamples
    ) where

    import Foreign.Ptr
    import Data.StateVar
    import Graphics.Rendering.OpenGL.GL.CoordTrans
    import Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferTarget
    import Graphics.Rendering.OpenGL.GL.GLboolean
    import Graphics.Rendering.OpenGL.GL.PixelData
    import Graphics.Rendering.OpenGL.GL.PixelRectangles
    import Graphics.Rendering.OpenGL.GL.QueryUtils
    import Graphics.Rendering.OpenGL.GL.Texturing.PixelInternalFormat
    import Graphics.Rendering.OpenGL.GL.Texturing.TextureTarget
    import Graphics.GL

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

    type Level = GLint

    type Border = GLint

    newtype TexturePosition1D = TexturePosition1D GLint
       deriving ( TexturePosition1D -> TexturePosition1D -> Bool
    (TexturePosition1D -> TexturePosition1D -> Bool)
    -> (TexturePosition1D -> TexturePosition1D -> Bool)
    -> Eq TexturePosition1D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TexturePosition1D -> TexturePosition1D -> Bool
    == :: TexturePosition1D -> TexturePosition1D -> Bool
    $c/= :: TexturePosition1D -> TexturePosition1D -> Bool
    /= :: TexturePosition1D -> TexturePosition1D -> Bool
    Eq, Eq TexturePosition1D
    Eq TexturePosition1D =>
    (TexturePosition1D -> TexturePosition1D -> Ordering)
    -> (TexturePosition1D -> TexturePosition1D -> Bool)
    -> (TexturePosition1D -> TexturePosition1D -> Bool)
    -> (TexturePosition1D -> TexturePosition1D -> Bool)
    -> (TexturePosition1D -> TexturePosition1D -> Bool)
    -> (TexturePosition1D -> TexturePosition1D -> TexturePosition1D)
    -> (TexturePosition1D -> TexturePosition1D -> TexturePosition1D)
    -> Ord TexturePosition1D
    TexturePosition1D -> TexturePosition1D -> Bool
    TexturePosition1D -> TexturePosition1D -> Ordering
    TexturePosition1D -> TexturePosition1D -> TexturePosition1D
    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 :: TexturePosition1D -> TexturePosition1D -> Ordering
    compare :: TexturePosition1D -> TexturePosition1D -> Ordering
    $c< :: TexturePosition1D -> TexturePosition1D -> Bool
    < :: TexturePosition1D -> TexturePosition1D -> Bool
    $c<= :: TexturePosition1D -> TexturePosition1D -> Bool
    <= :: TexturePosition1D -> TexturePosition1D -> Bool
    $c> :: TexturePosition1D -> TexturePosition1D -> Bool
    > :: TexturePosition1D -> TexturePosition1D -> Bool
    $c>= :: TexturePosition1D -> TexturePosition1D -> Bool
    >= :: TexturePosition1D -> TexturePosition1D -> Bool
    $cmax :: TexturePosition1D -> TexturePosition1D -> TexturePosition1D
    max :: TexturePosition1D -> TexturePosition1D -> TexturePosition1D
    $cmin :: TexturePosition1D -> TexturePosition1D -> TexturePosition1D
    min :: TexturePosition1D -> TexturePosition1D -> TexturePosition1D
    Ord, Int -> TexturePosition1D -> ShowS
    [TexturePosition1D] -> ShowS
    TexturePosition1D -> String
    (Int -> TexturePosition1D -> ShowS)
    -> (TexturePosition1D -> String)
    -> ([TexturePosition1D] -> ShowS)
    -> Show TexturePosition1D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TexturePosition1D -> ShowS
    showsPrec :: Int -> TexturePosition1D -> ShowS
    $cshow :: TexturePosition1D -> String
    show :: TexturePosition1D -> String
    $cshowList :: [TexturePosition1D] -> ShowS
    showList :: [TexturePosition1D] -> ShowS
    Show )

    data TexturePosition2D = TexturePosition2D !GLint !GLint
       deriving ( TexturePosition2D -> TexturePosition2D -> Bool
    (TexturePosition2D -> TexturePosition2D -> Bool)
    -> (TexturePosition2D -> TexturePosition2D -> Bool)
    -> Eq TexturePosition2D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TexturePosition2D -> TexturePosition2D -> Bool
    == :: TexturePosition2D -> TexturePosition2D -> Bool
    $c/= :: TexturePosition2D -> TexturePosition2D -> Bool
    /= :: TexturePosition2D -> TexturePosition2D -> Bool
    Eq, Eq TexturePosition2D
    Eq TexturePosition2D =>
    (TexturePosition2D -> TexturePosition2D -> Ordering)
    -> (TexturePosition2D -> TexturePosition2D -> Bool)
    -> (TexturePosition2D -> TexturePosition2D -> Bool)
    -> (TexturePosition2D -> TexturePosition2D -> Bool)
    -> (TexturePosition2D -> TexturePosition2D -> Bool)
    -> (TexturePosition2D -> TexturePosition2D -> TexturePosition2D)
    -> (TexturePosition2D -> TexturePosition2D -> TexturePosition2D)
    -> Ord TexturePosition2D
    TexturePosition2D -> TexturePosition2D -> Bool
    TexturePosition2D -> TexturePosition2D -> Ordering
    TexturePosition2D -> TexturePosition2D -> TexturePosition2D
    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 :: TexturePosition2D -> TexturePosition2D -> Ordering
    compare :: TexturePosition2D -> TexturePosition2D -> Ordering
    $c< :: TexturePosition2D -> TexturePosition2D -> Bool
    < :: TexturePosition2D -> TexturePosition2D -> Bool
    $c<= :: TexturePosition2D -> TexturePosition2D -> Bool
    <= :: TexturePosition2D -> TexturePosition2D -> Bool
    $c> :: TexturePosition2D -> TexturePosition2D -> Bool
    > :: TexturePosition2D -> TexturePosition2D -> Bool
    $c>= :: TexturePosition2D -> TexturePosition2D -> Bool
    >= :: TexturePosition2D -> TexturePosition2D -> Bool
    $cmax :: TexturePosition2D -> TexturePosition2D -> TexturePosition2D
    max :: TexturePosition2D -> TexturePosition2D -> TexturePosition2D
    $cmin :: TexturePosition2D -> TexturePosition2D -> TexturePosition2D
    min :: TexturePosition2D -> TexturePosition2D -> TexturePosition2D
    Ord, Int -> TexturePosition2D -> ShowS
    [TexturePosition2D] -> ShowS
    TexturePosition2D -> String
    (Int -> TexturePosition2D -> ShowS)
    -> (TexturePosition2D -> String)
    -> ([TexturePosition2D] -> ShowS)
    -> Show TexturePosition2D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TexturePosition2D -> ShowS
    showsPrec :: Int -> TexturePosition2D -> ShowS
    $cshow :: TexturePosition2D -> String
    show :: TexturePosition2D -> String
    $cshowList :: [TexturePosition2D] -> ShowS
    showList :: [TexturePosition2D] -> ShowS
    Show )

    data TexturePosition3D = TexturePosition3D !GLint !GLint !GLint
       deriving ( TexturePosition3D -> TexturePosition3D -> Bool
    (TexturePosition3D -> TexturePosition3D -> Bool)
    -> (TexturePosition3D -> TexturePosition3D -> Bool)
    -> Eq TexturePosition3D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TexturePosition3D -> TexturePosition3D -> Bool
    == :: TexturePosition3D -> TexturePosition3D -> Bool
    $c/= :: TexturePosition3D -> TexturePosition3D -> Bool
    /= :: TexturePosition3D -> TexturePosition3D -> Bool
    Eq, Eq TexturePosition3D
    Eq TexturePosition3D =>
    (TexturePosition3D -> TexturePosition3D -> Ordering)
    -> (TexturePosition3D -> TexturePosition3D -> Bool)
    -> (TexturePosition3D -> TexturePosition3D -> Bool)
    -> (TexturePosition3D -> TexturePosition3D -> Bool)
    -> (TexturePosition3D -> TexturePosition3D -> Bool)
    -> (TexturePosition3D -> TexturePosition3D -> TexturePosition3D)
    -> (TexturePosition3D -> TexturePosition3D -> TexturePosition3D)
    -> Ord TexturePosition3D
    TexturePosition3D -> TexturePosition3D -> Bool
    TexturePosition3D -> TexturePosition3D -> Ordering
    TexturePosition3D -> TexturePosition3D -> TexturePosition3D
    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 :: TexturePosition3D -> TexturePosition3D -> Ordering
    compare :: TexturePosition3D -> TexturePosition3D -> Ordering
    $c< :: TexturePosition3D -> TexturePosition3D -> Bool
    < :: TexturePosition3D -> TexturePosition3D -> Bool
    $c<= :: TexturePosition3D -> TexturePosition3D -> Bool
    <= :: TexturePosition3D -> TexturePosition3D -> Bool
    $c> :: TexturePosition3D -> TexturePosition3D -> Bool
    > :: TexturePosition3D -> TexturePosition3D -> Bool
    $c>= :: TexturePosition3D -> TexturePosition3D -> Bool
    >= :: TexturePosition3D -> TexturePosition3D -> Bool
    $cmax :: TexturePosition3D -> TexturePosition3D -> TexturePosition3D
    max :: TexturePosition3D -> TexturePosition3D -> TexturePosition3D
    $cmin :: TexturePosition3D -> TexturePosition3D -> TexturePosition3D
    min :: TexturePosition3D -> TexturePosition3D -> TexturePosition3D
    Ord, Int -> TexturePosition3D -> ShowS
    [TexturePosition3D] -> ShowS
    TexturePosition3D -> String
    (Int -> TexturePosition3D -> ShowS)
    -> (TexturePosition3D -> String)
    -> ([TexturePosition3D] -> ShowS)
    -> Show TexturePosition3D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TexturePosition3D -> ShowS
    showsPrec :: Int -> TexturePosition3D -> ShowS
    $cshow :: TexturePosition3D -> String
    show :: TexturePosition3D -> String
    $cshowList :: [TexturePosition3D] -> ShowS
    showList :: [TexturePosition3D] -> ShowS
    Show )

    newtype TextureSize1D = TextureSize1D GLsizei
       deriving ( TextureSize1D -> TextureSize1D -> Bool
    (TextureSize1D -> TextureSize1D -> Bool)
    -> (TextureSize1D -> TextureSize1D -> Bool) -> Eq TextureSize1D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TextureSize1D -> TextureSize1D -> Bool
    == :: TextureSize1D -> TextureSize1D -> Bool
    $c/= :: TextureSize1D -> TextureSize1D -> Bool
    /= :: TextureSize1D -> TextureSize1D -> Bool
    Eq, Eq TextureSize1D
    Eq TextureSize1D =>
    (TextureSize1D -> TextureSize1D -> Ordering)
    -> (TextureSize1D -> TextureSize1D -> Bool)
    -> (TextureSize1D -> TextureSize1D -> Bool)
    -> (TextureSize1D -> TextureSize1D -> Bool)
    -> (TextureSize1D -> TextureSize1D -> Bool)
    -> (TextureSize1D -> TextureSize1D -> TextureSize1D)
    -> (TextureSize1D -> TextureSize1D -> TextureSize1D)
    -> Ord TextureSize1D
    TextureSize1D -> TextureSize1D -> Bool
    TextureSize1D -> TextureSize1D -> Ordering
    TextureSize1D -> TextureSize1D -> TextureSize1D
    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 :: TextureSize1D -> TextureSize1D -> Ordering
    compare :: TextureSize1D -> TextureSize1D -> Ordering
    $c< :: TextureSize1D -> TextureSize1D -> Bool
    < :: TextureSize1D -> TextureSize1D -> Bool
    $c<= :: TextureSize1D -> TextureSize1D -> Bool
    <= :: TextureSize1D -> TextureSize1D -> Bool
    $c> :: TextureSize1D -> TextureSize1D -> Bool
    > :: TextureSize1D -> TextureSize1D -> Bool
    $c>= :: TextureSize1D -> TextureSize1D -> Bool
    >= :: TextureSize1D -> TextureSize1D -> Bool
    $cmax :: TextureSize1D -> TextureSize1D -> TextureSize1D
    max :: TextureSize1D -> TextureSize1D -> TextureSize1D
    $cmin :: TextureSize1D -> TextureSize1D -> TextureSize1D
    min :: TextureSize1D -> TextureSize1D -> TextureSize1D
    Ord, Int -> TextureSize1D -> ShowS
    [TextureSize1D] -> ShowS
    TextureSize1D -> String
    (Int -> TextureSize1D -> ShowS)
    -> (TextureSize1D -> String)
    -> ([TextureSize1D] -> ShowS)
    -> Show TextureSize1D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TextureSize1D -> ShowS
    showsPrec :: Int -> TextureSize1D -> ShowS
    $cshow :: TextureSize1D -> String
    show :: TextureSize1D -> String
    $cshowList :: [TextureSize1D] -> ShowS
    showList :: [TextureSize1D] -> ShowS
    Show )

    data TextureSize2D = TextureSize2D !GLsizei !GLsizei
       deriving ( TextureSize2D -> TextureSize2D -> Bool
    (TextureSize2D -> TextureSize2D -> Bool)
    -> (TextureSize2D -> TextureSize2D -> Bool) -> Eq TextureSize2D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TextureSize2D -> TextureSize2D -> Bool
    == :: TextureSize2D -> TextureSize2D -> Bool
    $c/= :: TextureSize2D -> TextureSize2D -> Bool
    /= :: TextureSize2D -> TextureSize2D -> Bool
    Eq, Eq TextureSize2D
    Eq TextureSize2D =>
    (TextureSize2D -> TextureSize2D -> Ordering)
    -> (TextureSize2D -> TextureSize2D -> Bool)
    -> (TextureSize2D -> TextureSize2D -> Bool)
    -> (TextureSize2D -> TextureSize2D -> Bool)
    -> (TextureSize2D -> TextureSize2D -> Bool)
    -> (TextureSize2D -> TextureSize2D -> TextureSize2D)
    -> (TextureSize2D -> TextureSize2D -> TextureSize2D)
    -> Ord TextureSize2D
    TextureSize2D -> TextureSize2D -> Bool
    TextureSize2D -> TextureSize2D -> Ordering
    TextureSize2D -> TextureSize2D -> TextureSize2D
    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 :: TextureSize2D -> TextureSize2D -> Ordering
    compare :: TextureSize2D -> TextureSize2D -> Ordering
    $c< :: TextureSize2D -> TextureSize2D -> Bool
    < :: TextureSize2D -> TextureSize2D -> Bool
    $c<= :: TextureSize2D -> TextureSize2D -> Bool
    <= :: TextureSize2D -> TextureSize2D -> Bool
    $c> :: TextureSize2D -> TextureSize2D -> Bool
    > :: TextureSize2D -> TextureSize2D -> Bool
    $c>= :: TextureSize2D -> TextureSize2D -> Bool
    >= :: TextureSize2D -> TextureSize2D -> Bool
    $cmax :: TextureSize2D -> TextureSize2D -> TextureSize2D
    max :: TextureSize2D -> TextureSize2D -> TextureSize2D
    $cmin :: TextureSize2D -> TextureSize2D -> TextureSize2D
    min :: TextureSize2D -> TextureSize2D -> TextureSize2D
    Ord, Int -> TextureSize2D -> ShowS
    [TextureSize2D] -> ShowS
    TextureSize2D -> String
    (Int -> TextureSize2D -> ShowS)
    -> (TextureSize2D -> String)
    -> ([TextureSize2D] -> ShowS)
    -> Show TextureSize2D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TextureSize2D -> ShowS
    showsPrec :: Int -> TextureSize2D -> ShowS
    $cshow :: TextureSize2D -> String
    show :: TextureSize2D -> String
    $cshowList :: [TextureSize2D] -> ShowS
    showList :: [TextureSize2D] -> ShowS
    Show )

    data TextureSize3D = TextureSize3D !GLsizei !GLsizei !GLsizei
       deriving ( TextureSize3D -> TextureSize3D -> Bool
    (TextureSize3D -> TextureSize3D -> Bool)
    -> (TextureSize3D -> TextureSize3D -> Bool) -> Eq TextureSize3D
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TextureSize3D -> TextureSize3D -> Bool
    == :: TextureSize3D -> TextureSize3D -> Bool
    $c/= :: TextureSize3D -> TextureSize3D -> Bool
    /= :: TextureSize3D -> TextureSize3D -> Bool
    Eq, Eq TextureSize3D
    Eq TextureSize3D =>
    (TextureSize3D -> TextureSize3D -> Ordering)
    -> (TextureSize3D -> TextureSize3D -> Bool)
    -> (TextureSize3D -> TextureSize3D -> Bool)
    -> (TextureSize3D -> TextureSize3D -> Bool)
    -> (TextureSize3D -> TextureSize3D -> Bool)
    -> (TextureSize3D -> TextureSize3D -> TextureSize3D)
    -> (TextureSize3D -> TextureSize3D -> TextureSize3D)
    -> Ord TextureSize3D
    TextureSize3D -> TextureSize3D -> Bool
    TextureSize3D -> TextureSize3D -> Ordering
    TextureSize3D -> TextureSize3D -> TextureSize3D
    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 :: TextureSize3D -> TextureSize3D -> Ordering
    compare :: TextureSize3D -> TextureSize3D -> Ordering
    $c< :: TextureSize3D -> TextureSize3D -> Bool
    < :: TextureSize3D -> TextureSize3D -> Bool
    $c<= :: TextureSize3D -> TextureSize3D -> Bool
    <= :: TextureSize3D -> TextureSize3D -> Bool
    $c> :: TextureSize3D -> TextureSize3D -> Bool
    > :: TextureSize3D -> TextureSize3D -> Bool
    $c>= :: TextureSize3D -> TextureSize3D -> Bool
    >= :: TextureSize3D -> TextureSize3D -> Bool
    $cmax :: TextureSize3D -> TextureSize3D -> TextureSize3D
    max :: TextureSize3D -> TextureSize3D -> TextureSize3D
    $cmin :: TextureSize3D -> TextureSize3D -> TextureSize3D
    min :: TextureSize3D -> TextureSize3D -> TextureSize3D
    Ord, Int -> TextureSize3D -> ShowS
    [TextureSize3D] -> ShowS
    TextureSize3D -> String
    (Int -> TextureSize3D -> ShowS)
    -> (TextureSize3D -> String)
    -> ([TextureSize3D] -> ShowS)
    -> Show TextureSize3D
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TextureSize3D -> ShowS
    showsPrec :: Int -> TextureSize3D -> ShowS
    $cshow :: TextureSize3D -> String
    show :: TextureSize3D -> String
    $cshowList :: [TextureSize3D] -> ShowS
    showList :: [TextureSize3D] -> ShowS
    Show )

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

    texImage1D :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()
    texImage1D :: forall t a.
    OneDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> PixelInternalFormat
    -> TextureSize1D
    -> GLint
    -> PixelData a
    -> IO ()
    texImage1D t
    target Proxy
    proxy GLint
    level PixelInternalFormat
    int (TextureSize1D GLint
    w) GLint
    border PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> m ()
    glTexImage1D
             (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    proxy t
    target)
             GLint
    level (PixelInternalFormat -> GLint
    marshalPixelInternalFormat PixelInternalFormat
    int) GLint
    w GLint
    border

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

    texImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()
    texImage2D :: forall t a.
    TwoDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> PixelInternalFormat
    -> TextureSize2D
    -> GLint
    -> PixelData a
    -> IO ()
    texImage2D t
    target Proxy
    proxy GLint
    level PixelInternalFormat
    int (TextureSize2D GLint
    w GLint
    h) GLint
    border PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> m ()
    glTexImage2D (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    proxy t
    target) GLint
    level (PixelInternalFormat -> GLint
    marshalPixelInternalFormat PixelInternalFormat
    int) GLint
    w GLint
    h GLint
    border

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

    texImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()
    texImage3D :: forall t a.
    ThreeDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> PixelInternalFormat
    -> TextureSize3D
    -> GLint
    -> PixelData a
    -> IO ()
    texImage3D t
    target Proxy
    proxy GLint
    level PixelInternalFormat
    int (TextureSize3D GLint
    w GLint
    h GLint
    d) GLint
    border PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> m ()
    glTexImage3D
             (Proxy -> t -> GLenum
    forall t. ThreeDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalThreeDimensionalTextureTarget Proxy
    proxy t
    target)
             GLint
    level (PixelInternalFormat -> GLint
    marshalPixelInternalFormat PixelInternalFormat
    int) GLint
    w GLint
    h GLint
    d GLint
    border

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

    getTexImage :: GettableTextureTarget t => t -> Level -> PixelData a -> IO ()
    getTexImage :: forall t a.
    GettableTextureTarget t =>
    t -> GLint -> PixelData a -> IO ()
    getTexImage t
    target GLint
    level PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum -> GLint -> GLenum -> GLenum -> Ptr a -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum -> GLint -> GLenum -> GLenum -> Ptr a -> m ()
    glGetTexImage (t -> GLenum
    forall t. GettableTextureTarget t => t -> GLenum
    marshalGettableTextureTarget t
    target) GLint
    level

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

    copyTexImage1D :: OneDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()
    copyTexImage1D :: forall t.
    OneDimensionalTextureTarget t =>
    t
    -> GLint
    -> PixelInternalFormat
    -> Position
    -> TextureSize1D
    -> GLint
    -> IO ()
    copyTexImage1D t
    target GLint
    level PixelInternalFormat
    int (Position GLint
    x GLint
    y) (TextureSize1D GLint
    w) GLint
    border =
       GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> GLint -> m ()
    glCopyTexImage1D
          (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level
          (PixelInternalFormat -> GLenum
    marshalPixelInternalFormat' PixelInternalFormat
    int) GLint
    x GLint
    y GLint
    w GLint
    border

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

    copyTexImage2D :: TwoDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()
    copyTexImage2D :: forall t.
    TwoDimensionalTextureTarget t =>
    t
    -> GLint
    -> PixelInternalFormat
    -> Position
    -> TextureSize2D
    -> GLint
    -> IO ()
    copyTexImage2D t
    target GLint
    level PixelInternalFormat
    int (Position GLint
    x GLint
    y) (TextureSize2D GLint
    w GLint
    h) GLint
    border =
       GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> m ()
    glCopyTexImage2D
          (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level
          (PixelInternalFormat -> GLenum
    marshalPixelInternalFormat' PixelInternalFormat
    int) GLint
    x GLint
    y GLint
    w GLint
    h GLint
    border

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

    texSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()
    texSubImage1D :: forall t a.
    OneDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition1D
    -> TextureSize1D
    -> PixelData a
    -> IO ()
    texSubImage1D t
    target GLint
    level (TexturePosition1D GLint
    xOff) (TextureSize1D GLint
    w) PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint -> GLint -> GLint -> GLenum -> GLenum -> Ptr a -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint -> GLint -> GLint -> GLenum -> GLenum -> Ptr a -> m ()
    glTexSubImage1D (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    w

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

    texSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()
    texSubImage2D :: forall t a.
    TwoDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition2D
    -> TextureSize2D
    -> PixelData a
    -> IO ()
    texSubImage2D t
    target GLint
    level (TexturePosition2D GLint
    xOff GLint
    yOff) (TextureSize2D GLint
    w GLint
    h) PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> m ()
    glTexSubImage2D (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    w GLint
    h

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

    texSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()
    texSubImage3D :: forall t a.
    ThreeDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition3D
    -> TextureSize3D
    -> PixelData a
    -> IO ()
    texSubImage3D t
    target GLint
    level (TexturePosition3D GLint
    xOff GLint
    yOff GLint
    zOff) (TextureSize3D GLint
    w GLint
    h GLint
    d) PixelData a
    pd =
       PixelData a -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
    withPixelData PixelData a
    pd ((GLenum -> GLenum -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLenum -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLenum
    -> Ptr a
    -> m ()
    glTexSubImage3D (Proxy -> t -> GLenum
    forall t. ThreeDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalThreeDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    zOff GLint
    w GLint
    h GLint
    d

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

    copyTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()
    copyTexSubImage1D :: forall t.
    OneDimensionalTextureTarget t =>
    t
    -> GLint -> TexturePosition1D -> Position -> TextureSize1D -> IO ()
    copyTexSubImage1D t
    target GLint
    level (TexturePosition1D GLint
    xOff) (Position GLint
    x GLint
    y) (TextureSize1D GLint
    w) =
       GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> m ()
    glCopyTexSubImage1D (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    x GLint
    y GLint
    w

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

    copyTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()
    copyTexSubImage2D :: forall t.
    TwoDimensionalTextureTarget t =>
    t
    -> GLint -> TexturePosition2D -> Position -> TextureSize2D -> IO ()
    copyTexSubImage2D t
    target GLint
    level (TexturePosition2D GLint
    xOff GLint
    yOff) (Position GLint
    x GLint
    y) (TextureSize2D GLint
    w GLint
    h) =
       GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> m ()
    glCopyTexSubImage2D (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    x GLint
    y GLint
    w GLint
    h

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

    copyTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()
    copyTexSubImage3D :: forall t.
    ThreeDimensionalTextureTarget t =>
    t
    -> GLint -> TexturePosition3D -> Position -> TextureSize2D -> IO ()
    copyTexSubImage3D t
    target GLint
    level (TexturePosition3D GLint
    xOff GLint
    yOff GLint
    zOff) (Position GLint
    x GLint
    y) (TextureSize2D GLint
    w GLint
    h) =
       GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> m ()
    glCopyTexSubImage3D (Proxy -> t -> GLenum
    forall t. ThreeDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalThreeDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    zOff GLint
    x GLint
    y GLint
    w GLint
    h

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

    newtype CompressedTextureFormat = CompressedTextureFormat GLenum
       deriving ( CompressedTextureFormat -> CompressedTextureFormat -> Bool
    (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> Eq CompressedTextureFormat
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    == :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    $c/= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    /= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    Eq, Eq CompressedTextureFormat
    Eq CompressedTextureFormat =>
    (CompressedTextureFormat -> CompressedTextureFormat -> Ordering)
    -> (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> (CompressedTextureFormat -> CompressedTextureFormat -> Bool)
    -> (CompressedTextureFormat
        -> CompressedTextureFormat -> CompressedTextureFormat)
    -> (CompressedTextureFormat
        -> CompressedTextureFormat -> CompressedTextureFormat)
    -> Ord CompressedTextureFormat
    CompressedTextureFormat -> CompressedTextureFormat -> Bool
    CompressedTextureFormat -> CompressedTextureFormat -> Ordering
    CompressedTextureFormat
    -> CompressedTextureFormat -> CompressedTextureFormat
    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 :: CompressedTextureFormat -> CompressedTextureFormat -> Ordering
    compare :: CompressedTextureFormat -> CompressedTextureFormat -> Ordering
    $c< :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    < :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    $c<= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    <= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    $c> :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    > :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    $c>= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    >= :: CompressedTextureFormat -> CompressedTextureFormat -> Bool
    $cmax :: CompressedTextureFormat
    -> CompressedTextureFormat -> CompressedTextureFormat
    max :: CompressedTextureFormat
    -> CompressedTextureFormat -> CompressedTextureFormat
    $cmin :: CompressedTextureFormat
    -> CompressedTextureFormat -> CompressedTextureFormat
    min :: CompressedTextureFormat
    -> CompressedTextureFormat -> CompressedTextureFormat
    Ord, Int -> CompressedTextureFormat -> ShowS
    [CompressedTextureFormat] -> ShowS
    CompressedTextureFormat -> String
    (Int -> CompressedTextureFormat -> ShowS)
    -> (CompressedTextureFormat -> String)
    -> ([CompressedTextureFormat] -> ShowS)
    -> Show CompressedTextureFormat
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> CompressedTextureFormat -> ShowS
    showsPrec :: Int -> CompressedTextureFormat -> ShowS
    $cshow :: CompressedTextureFormat -> String
    show :: CompressedTextureFormat -> String
    $cshowList :: [CompressedTextureFormat] -> ShowS
    showList :: [CompressedTextureFormat] -> ShowS
    Show )

    compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]
    compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]
    compressedTextureFormats =
       GettableStateVar [CompressedTextureFormat]
    -> GettableStateVar [CompressedTextureFormat]
    forall a. IO a -> IO a
    makeGettableStateVar (GettableStateVar [CompressedTextureFormat]
     -> GettableStateVar [CompressedTextureFormat])
    -> GettableStateVar [CompressedTextureFormat]
    -> GettableStateVar [CompressedTextureFormat]
    forall a b. (a -> b) -> a -> b
    $ do
          n <- (GLint -> Int) -> PName1I -> IO Int
    forall p a. GetPName1I p => (GLint -> a) -> p -> IO a
    forall a. (GLint -> a) -> PName1I -> IO a
    getInteger1 GLint -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral PName1I
    GetNumCompressedTextureFormats
          getEnumN CompressedTextureFormat GetCompressedTextureFormats n

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

    data CompressedPixelData a =
         CompressedPixelData !CompressedTextureFormat GLsizei (Ptr a)
       deriving ( CompressedPixelData a -> CompressedPixelData a -> Bool
    (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> Eq (CompressedPixelData a)
    forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    == :: CompressedPixelData a -> CompressedPixelData a -> Bool
    $c/= :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    /= :: CompressedPixelData a -> CompressedPixelData a -> Bool
    Eq, Eq (CompressedPixelData a)
    Eq (CompressedPixelData a) =>
    (CompressedPixelData a -> CompressedPixelData a -> Ordering)
    -> (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> (CompressedPixelData a -> CompressedPixelData a -> Bool)
    -> (CompressedPixelData a
        -> CompressedPixelData a -> CompressedPixelData a)
    -> (CompressedPixelData a
        -> CompressedPixelData a -> CompressedPixelData a)
    -> Ord (CompressedPixelData a)
    CompressedPixelData a -> CompressedPixelData a -> Bool
    CompressedPixelData a -> CompressedPixelData a -> Ordering
    CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    forall a. Eq (CompressedPixelData a)
    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
    forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    forall a.
    CompressedPixelData a -> CompressedPixelData a -> Ordering
    forall a.
    CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    $ccompare :: forall a.
    CompressedPixelData a -> CompressedPixelData a -> Ordering
    compare :: CompressedPixelData a -> CompressedPixelData a -> Ordering
    $c< :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    < :: CompressedPixelData a -> CompressedPixelData a -> Bool
    $c<= :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    <= :: CompressedPixelData a -> CompressedPixelData a -> Bool
    $c> :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    > :: CompressedPixelData a -> CompressedPixelData a -> Bool
    $c>= :: forall a. CompressedPixelData a -> CompressedPixelData a -> Bool
    >= :: CompressedPixelData a -> CompressedPixelData a -> Bool
    $cmax :: forall a.
    CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    max :: CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    $cmin :: forall a.
    CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    min :: CompressedPixelData a
    -> CompressedPixelData a -> CompressedPixelData a
    Ord, Int -> CompressedPixelData a -> ShowS
    [CompressedPixelData a] -> ShowS
    CompressedPixelData a -> String
    (Int -> CompressedPixelData a -> ShowS)
    -> (CompressedPixelData a -> String)
    -> ([CompressedPixelData a] -> ShowS)
    -> Show (CompressedPixelData a)
    forall a. Int -> CompressedPixelData a -> ShowS
    forall a. [CompressedPixelData a] -> ShowS
    forall a. CompressedPixelData a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Int -> CompressedPixelData a -> ShowS
    showsPrec :: Int -> CompressedPixelData a -> ShowS
    $cshow :: forall a. CompressedPixelData a -> String
    show :: CompressedPixelData a -> String
    $cshowList :: forall a. [CompressedPixelData a] -> ShowS
    showList :: [CompressedPixelData a] -> ShowS
    Show )

    withCompressedPixelData ::
       CompressedPixelData a -> (GLenum -> GLsizei -> Ptr a -> b) -> b
    withCompressedPixelData :: forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData
       (CompressedPixelData (CompressedTextureFormat GLenum
    fmt) GLint
    size Ptr a
    ptr) GLenum -> GLint -> Ptr a -> b
    f =
       GLenum -> GLint -> Ptr a -> b
    f GLenum
    fmt GLint
    size Ptr a
    ptr

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

    compressedTexImage1D :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()
    compressedTexImage1D :: forall t a.
    OneDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> TextureSize1D
    -> GLint
    -> CompressedPixelData a
    -> IO ()
    compressedTexImage1D t
    target Proxy
    proxy GLint
    level (TextureSize1D GLint
    w) GLint
    border CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \GLenum
    fmt ->
          GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> m ()
    glCompressedTexImage1D
             (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    proxy t
    target) GLint
    level GLenum
    fmt GLint
    w GLint
    border

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

    -- Note that the spec currently disallows TextureRectangle, but then again the
    -- extension specification explicitly allows a relaxation in the future.
    compressedTexImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()
    compressedTexImage2D :: forall t a.
    TwoDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> TextureSize2D
    -> GLint
    -> CompressedPixelData a
    -> IO ()
    compressedTexImage2D t
    target Proxy
    proxy GLint
    level (TextureSize2D GLint
    w GLint
    h) GLint
    border CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \GLenum
    fmt ->
          GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> Ptr a
    -> m ()
    glCompressedTexImage2D (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    proxy t
    target) GLint
    level GLenum
    fmt GLint
    w GLint
    h GLint
    border

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

    compressedTexImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()
    compressedTexImage3D :: forall t a.
    ThreeDimensionalTextureTarget t =>
    t
    -> Proxy
    -> GLint
    -> TextureSize3D
    -> GLint
    -> CompressedPixelData a
    -> IO ()
    compressedTexImage3D t
    target Proxy
    proxy GLint
    level (TextureSize3D GLint
    w GLint
    h GLint
    d) GLint
    border CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \GLenum
    fmt ->
          GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> Ptr a
    -> m ()
    glCompressedTexImage3D
             (Proxy -> t -> GLenum
    forall t. ThreeDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalThreeDimensionalTextureTarget Proxy
    proxy t
    target) GLint
    level GLenum
    fmt GLint
    w GLint
    h GLint
    d GLint
    border

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

    getCompressedTexImage :: GettableTextureTarget t => t -> Level -> Ptr a -> IO ()
    getCompressedTexImage :: forall t a. GettableTextureTarget t => t -> GLint -> Ptr a -> IO ()
    getCompressedTexImage = GLenum -> GLint -> Ptr a -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum -> GLint -> Ptr a -> m ()
    glGetCompressedTexImage (GLenum -> GLint -> Ptr a -> IO ())
    -> (t -> GLenum) -> t -> GLint -> Ptr a -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . t -> GLenum
    forall t. GettableTextureTarget t => t -> GLenum
    marshalGettableTextureTarget

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

    compressedTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()
    compressedTexSubImage1D :: forall t a.
    OneDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition1D
    -> TextureSize1D
    -> CompressedPixelData a
    -> IO ()
    compressedTexSubImage1D t
    target GLint
    level (TexturePosition1D GLint
    xOff) (TextureSize1D GLint
    w) CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint -> GLint -> GLint -> GLenum -> GLint -> Ptr a -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint -> GLint -> GLint -> GLenum -> GLint -> Ptr a -> m ()
    glCompressedTexSubImage1D (Proxy -> t -> GLenum
    forall t. OneDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalOneDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    w

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

    compressedTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()
    compressedTexSubImage2D :: forall t a.
    TwoDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition2D
    -> TextureSize2D
    -> CompressedPixelData a
    -> IO ()
    compressedTexSubImage2D t
    target  GLint
    level (TexturePosition2D GLint
    xOff GLint
    yOff) (TextureSize2D GLint
    w GLint
    h) CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLint
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLint
    -> Ptr a
    -> m ()
    glCompressedTexSubImage2D (Proxy -> t -> GLenum
    forall t. TwoDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalTwoDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    w GLint
    h

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

    -- see texImage3D, but no proxies
    compressedTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()
    compressedTexSubImage3D :: forall t a.
    ThreeDimensionalTextureTarget t =>
    t
    -> GLint
    -> TexturePosition3D
    -> TextureSize3D
    -> CompressedPixelData a
    -> IO ()
    compressedTexSubImage3D t
    target GLint
    level (TexturePosition3D GLint
    xOff GLint
    yOff GLint
    zOff) (TextureSize3D GLint
    w GLint
    h GLint
    d) CompressedPixelData a
    cpd =
       CompressedPixelData a
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b.
    CompressedPixelData a -> (GLenum -> GLint -> Ptr a -> b) -> b
    withCompressedPixelData CompressedPixelData a
    cpd ((GLenum -> GLint -> Ptr a -> IO ()) -> IO ())
    -> (GLenum -> GLint -> Ptr a -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
          GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLint
    -> Ptr a
    -> IO ()
    forall (m :: * -> *) a.
    MonadIO m =>
    GLenum
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLint
    -> GLenum
    -> GLint
    -> Ptr a
    -> m ()
    glCompressedTexSubImage3D (Proxy -> t -> GLenum
    forall t. ThreeDimensionalTextureTarget t => Proxy -> t -> GLenum
    marshalThreeDimensionalTextureTarget Proxy
    NoProxy t
    target) GLint
    level GLint
    xOff GLint
    yOff GLint
    zOff GLint
    w GLint
    h GLint
    d

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

    data SampleLocations =
         FlexibleSampleLocations
       | FixedSampleLocations
       deriving ( SampleLocations -> SampleLocations -> Bool
    (SampleLocations -> SampleLocations -> Bool)
    -> (SampleLocations -> SampleLocations -> Bool)
    -> Eq SampleLocations
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SampleLocations -> SampleLocations -> Bool
    == :: SampleLocations -> SampleLocations -> Bool
    $c/= :: SampleLocations -> SampleLocations -> Bool
    /= :: SampleLocations -> SampleLocations -> Bool
    Eq, Eq SampleLocations
    Eq SampleLocations =>
    (SampleLocations -> SampleLocations -> Ordering)
    -> (SampleLocations -> SampleLocations -> Bool)
    -> (SampleLocations -> SampleLocations -> Bool)
    -> (SampleLocations -> SampleLocations -> Bool)
    -> (SampleLocations -> SampleLocations -> Bool)
    -> (SampleLocations -> SampleLocations -> SampleLocations)
    -> (SampleLocations -> SampleLocations -> SampleLocations)
    -> Ord SampleLocations
    SampleLocations -> SampleLocations -> Bool
    SampleLocations -> SampleLocations -> Ordering
    SampleLocations -> SampleLocations -> SampleLocations
    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 :: SampleLocations -> SampleLocations -> Ordering
    compare :: SampleLocations -> SampleLocations -> Ordering
    $c< :: SampleLocations -> SampleLocations -> Bool
    < :: SampleLocations -> SampleLocations -> Bool
    $c<= :: SampleLocations -> SampleLocations -> Bool
    <= :: SampleLocations -> SampleLocations -> Bool
    $c> :: SampleLocations -> SampleLocations -> Bool
    > :: SampleLocations -> SampleLocations -> Bool
    $c>= :: SampleLocations -> SampleLocations -> Bool
    >= :: SampleLocations -> SampleLocations -> Bool
    $cmax :: SampleLocations -> SampleLocations -> SampleLocations
    max :: SampleLocations -> SampleLocations -> SampleLocations
    $cmin :: SampleLocations -> SampleLocations -> SampleLocations
    min :: SampleLocations -> SampleLocations -> SampleLocations
    Ord, Int -> SampleLocations -> ShowS
    [SampleLocations] -> ShowS
    SampleLocations -> String
    (Int -> SampleLocations -> ShowS)
    -> (SampleLocations -> String)
    -> ([SampleLocations] -> ShowS)
    -> Show SampleLocations
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SampleLocations -> ShowS
    showsPrec :: Int -> SampleLocations -> ShowS
    $cshow :: SampleLocations -> String
    show :: SampleLocations -> String
    $cshowList :: [SampleLocations] -> ShowS
    showList :: [SampleLocations] -> ShowS
    Show )

    marshalSampleLocations :: SampleLocations -> GLboolean
    marshalSampleLocations :: SampleLocations -> GLboolean
    marshalSampleLocations = Bool -> GLboolean
    forall a. Num a => Bool -> a
    marshalGLboolean (Bool -> GLboolean)
    -> (SampleLocations -> Bool) -> SampleLocations -> GLboolean
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (SampleLocations
    FixedSampleLocations SampleLocations -> SampleLocations -> Bool
    forall a. Eq a => a -> a -> Bool
    ==)

    {-
    unmarshalSampleLocations :: GLboolean -> SampleLocations
    unmarshalSampleLocations x =
       if unmarshalGLboolean x
          then FixedSampleLocations
          else FlexibleSampleLocations
    -}

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

    texImage2DMultisample :: TextureTarget2DMultisample
                          -> Proxy
                          -> Samples
                          -> PixelInternalFormat
                          -> TextureSize2D
                          -> SampleLocations
                          -> IO ()
    texImage2DMultisample :: TextureTarget2DMultisample
    -> Proxy
    -> Samples
    -> PixelInternalFormat
    -> TextureSize2D
    -> SampleLocations
    -> IO ()
    texImage2DMultisample TextureTarget2DMultisample
    target Proxy
    proxy (Samples GLint
    s) PixelInternalFormat
    int (TextureSize2D GLint
    w GLint
    h) SampleLocations
    loc =
       GLenum -> GLint -> GLenum -> GLint -> GLint -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum -> GLint -> GLenum -> GLint -> GLint -> GLboolean -> m ()
    glTexImage2DMultisample
          (Proxy -> TextureTarget2DMultisample -> GLenum
    forall t. ParameterizedTextureTarget t => Proxy -> t -> GLenum
    marshalMultisample Proxy
    proxy TextureTarget2DMultisample
    target) GLint
    s (GLint -> GLenum
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (PixelInternalFormat -> GLint
    marshalPixelInternalFormat PixelInternalFormat
    int))
          GLint
    w GLint
    h (SampleLocations -> GLboolean
    marshalSampleLocations SampleLocations
    loc)

    marshalMultisample :: ParameterizedTextureTarget t => Proxy -> t -> GLenum
    marshalMultisample :: forall t. ParameterizedTextureTarget t => Proxy -> t -> GLenum
    marshalMultisample Proxy
    proxy = case Proxy
    proxy of
       Proxy
    NoProxy -> t -> GLenum
    forall t. ParameterizedTextureTarget t => t -> GLenum
    marshalParameterizedTextureTarget
       Proxy
    Proxy -> t -> GLenum
    forall t. ParameterizedTextureTarget t => t -> GLenum
    marshalParameterizedTextureTargetProxy

    texImage3DMultisample :: TextureTarget2DMultisampleArray
                          -> Proxy
                          -> Samples
                          -> PixelInternalFormat
                          -> TextureSize3D
                          -> SampleLocations
                          -> IO ()
    texImage3DMultisample :: TextureTarget2DMultisampleArray
    -> Proxy
    -> Samples
    -> PixelInternalFormat
    -> TextureSize3D
    -> SampleLocations
    -> IO ()
    texImage3DMultisample TextureTarget2DMultisampleArray
    target Proxy
    proxy (Samples GLint
    s) PixelInternalFormat
    int (TextureSize3D GLint
    w GLint
    h GLint
    d) SampleLocations
    loc =
       GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> GLboolean -> IO ()
    forall (m :: * -> *).
    MonadIO m =>
    GLenum
    -> GLint -> GLenum -> GLint -> GLint -> GLint -> GLboolean -> m ()
    glTexImage3DMultisample
          (Proxy -> TextureTarget2DMultisampleArray -> GLenum
    forall t. ParameterizedTextureTarget t => Proxy -> t -> GLenum
    marshalMultisample Proxy
    proxy TextureTarget2DMultisampleArray
    target) GLint
    s (GLint -> GLenum
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (PixelInternalFormat -> GLint
    marshalPixelInternalFormat PixelInternalFormat
    int))
          GLint
    w GLint
    h GLint
    d (SampleLocations -> GLboolean
    marshalSampleLocations SampleLocations
    loc)

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

    maxTextureSize :: GettableStateVar GLsizei
    maxTextureSize :: GettableStateVar GLint
    maxTextureSize = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxTextureSize

    maxCubeMapTextureSize :: GettableStateVar GLsizei
    maxCubeMapTextureSize :: GettableStateVar GLint
    maxCubeMapTextureSize = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxCubeMapTextureSize

    maxRectangleTextureSize :: GettableStateVar GLsizei
    maxRectangleTextureSize :: GettableStateVar GLint
    maxRectangleTextureSize = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxRectangleTextureSize

    max3DTextureSize :: GettableStateVar GLsizei
    max3DTextureSize :: GettableStateVar GLint
    max3DTextureSize = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMax3DTextureSize

    maxArrayTextureLayers :: GettableStateVar GLsizei
    maxArrayTextureLayers :: GettableStateVar GLint
    maxArrayTextureLayers = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxArrayTextureLayers

    maxSampleMaskWords :: GettableStateVar GLsizei
    maxSampleMaskWords :: GettableStateVar GLint
    maxSampleMaskWords = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxSampleMaskWords

    maxColorTextureSamples :: GettableStateVar GLsizei
    maxColorTextureSamples :: GettableStateVar GLint
    maxColorTextureSamples = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxColorTextureSamples

    maxDepthTextureSamples :: GettableStateVar GLsizei
    maxDepthTextureSamples :: GettableStateVar GLint
    maxDepthTextureSamples = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxDepthTextureSamples

    maxIntegerSamples :: GettableStateVar GLsizei
    maxIntegerSamples :: GettableStateVar GLint
    maxIntegerSamples = PName1I -> GettableStateVar GLint
    maxTextureSizeWith PName1I
    GetMaxIntegerSamples

    maxTextureSizeWith :: PName1I -> GettableStateVar GLsizei
    maxTextureSizeWith :: PName1I -> GettableStateVar GLint
    maxTextureSizeWith = GettableStateVar GLint -> GettableStateVar GLint
    forall a. IO a -> IO a
    makeGettableStateVar (GettableStateVar GLint -> GettableStateVar GLint)
    -> (PName1I -> GettableStateVar GLint)
    -> PName1I
    -> GettableStateVar GLint
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (GLint -> GLint) -> PName1I -> GettableStateVar GLint
    forall p a. GetPName1I p => (GLint -> a) -> p -> IO a
    forall a. (GLint -> a) -> PName1I -> IO a
    getInteger1 GLint -> GLint
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral