with
     Interfaces.C.Pointers,
     System;

package GL.lean
--
--  Provides types, constants and functions specific to the openGL 'Embedded' profile.
--
is
   ---------
   --  Types
   --

   subtype GLchar     is GL_Types.GLchar;
   subtype GLfixed    is GL_Types.GLfixed;

   type    GLintptr   is new Integer;
   type    GLsizeiptr is new Integer;


   --  GLchar_Pointer
   --
   type    GLchar_array    is array (C.size_t range <>) of aliased GLchar;
   package GLchar_Pointers is new C.Pointers (Index              => C.size_t,
                                              Element            => GLchar,
                                              Element_Array      => GLchar_array,
                                              Default_Terminator => C.nul);
   subtype GLchar_Pointer  is GLchar_Pointers.Pointer;

   subtype GLfloat_Address is system.Address;


   -------------
   --  Constants
   --

   GL_ACTIVE_ATTRIBUTES                  : constant := 16#8B89#;
   GL_ACTIVE_ATTRIBUTE_MAX_LENGTH        : constant := 16#8B8A#;
   GL_ACTIVE_UNIFORMS                    : constant := 16#8B86#;
   GL_ACTIVE_UNIFORM_MAX_LENGTH          : constant := 16#8B87#;
   GL_ARRAY_BUFFER                       : constant := 16#8892#;
   GL_ARRAY_BUFFER_BINDING               : constant := 16#8894#;
   GL_ATTACHED_SHADERS                   : constant := 16#8B85#;
   GL_BLEND_COLOR                        : constant := 16#8005#;
   GL_BLEND_DST_ALPHA                    : constant := 16#80CA#;
   GL_BLEND_DST_RGB                      : constant := 16#80C8#;
   GL_BLEND_EQUATION                     : constant := 16#8009#;
   GL_BLEND_EQUATION_ALPHA               : constant := 16#883D#;
   GL_BLEND_EQUATION_RGB                 : constant := 16#8009#;   -- Same as BLEND_EQUATION.
   GL_BLEND_SRC_ALPHA                    : constant := 16#80CB#;
   GL_BLEND_SRC_RGB                      : constant := 16#80C9#;
   GL_BOOL                               : constant := 16#8B56#;
   GL_BOOL_VEC2                          : constant := 16#8B57#;
   GL_BOOL_VEC3                          : constant := 16#8B58#;
   GL_BOOL_VEC4                          : constant := 16#8B59#;
   GL_BUFFER_SIZE                        : constant := 16#8764#;
   GL_BUFFER_USAGE                       : constant := 16#8765#;
   GL_COLOR_ATTACHMENT0                  : constant := 16#8CE0#;
   GL_COMPILE_STATUS                     : constant := 16#8B81#;
   GL_COMPRESSED_TEXTURE_FORMATS         : constant := 16#86A3#;
   GL_CONSTANT_ALPHA                     : constant := 16#8003#;
   GL_CONSTANT_COLOR                     : constant := 16#8001#;
   GL_CURRENT_PROGRAM                    : constant := 16#8B8D#;
   GL_CURRENT_VERTEX_ATTRIB              : constant := 16#8626#;
   GL_DECR_WRAP                          : constant := 16#8508#;
   GL_DELETE_STATUS                      : constant := 16#8B80#;
   GL_DEPTH_ATTACHMENT                   : constant := 16#8D00#;
   GL_DEPTH_COMPONENT                    : constant := 16#1902#;
   GL_DEPTH_COMPONENT16                  : constant := 16#81A5#;
   GL_DITHER                             : constant := 16#0BD0#;
   GL_DST_ALPHA                          : constant := 16#0304#;
   GL_DST_COLOR                          : constant := 16#0306#;
   GL_DYNAMIC_DRAW                       : constant := 16#88E8#;
   GL_ELEMENT_ARRAY_BUFFER               : constant := 16#8893#;
   GL_ELEMENT_ARRAY_BUFFER_BINDING       : constant := 16#8895#;
   GL_ES_VERSION_2_0                     : constant := 1;
   GL_FIXED                              : constant := 16#140C#;
   GL_FLOAT_MAT2                         : constant := 16#8B5A#;
   GL_FLOAT_MAT3                         : constant := 16#8B5B#;
   GL_FLOAT_MAT4                         : constant := 16#8B5C#;
   GL_FLOAT_VEC2                         : constant := 16#8B50#;
   GL_FLOAT_VEC3                         : constant := 16#8B51#;
   GL_FLOAT_VEC4                         : constant := 16#8B52#;
   GL_FRAGMENT_SHADER                    : constant := 16#8B30#;
   GL_FRAMEBUFFER                        : constant := 16#8D40#;
   GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : constant := 16#8CD1#;
   GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : constant := 16#8CD0#;
   GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
                                         : constant := 16#8CD3#;
   GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
                                         : constant := 16#8CD2#;
   GL_FRAMEBUFFER_BINDING                : constant := 16#8CA6#;
   GL_FRAMEBUFFER_COMPLETE               : constant := 16#8CD5#;
   GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT  : constant := 16#8CD6#;
   GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS  : constant := 16#8CD9#;
   GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
                                         : constant := 16#8CD7#;
   GL_FRAMEBUFFER_UNSUPPORTED            : constant := 16#8CDD#;
   GL_FUNC_ADD                           : constant := 16#8006#;
   GL_FUNC_REVERSE_SUBTRACT              : constant := 16#800B#;
   GL_FUNC_SUBTRACT                      : constant := 16#800A#;
   GL_GENERATE_MIPMAP_HINT               : constant := 16#8192#;
   GL_HIGH_FLOAT                         : constant := 16#8DF2#;
   GL_HIGH_INT                           : constant := 16#8DF5#;
   GL_IMPLEMENTATION_COLOR_READ_FORMAT   : constant := 16#8B9B#;
   GL_IMPLEMENTATION_COLOR_READ_TYPE     : constant := 16#8B9A#;
   GL_INCR_WRAP                          : constant := 16#8507#;
   GL_INFO_LOG_LENGTH                    : constant := 16#8B84#;
   GL_INT_VEC2                           : constant := 16#8B53#;
   GL_INT_VEC3                           : constant := 16#8B54#;
   GL_INT_VEC4                           : constant := 16#8B55#;
   GL_INVALID_FRAMEBUFFER_OPERATION      : constant := 16#0506#;
   GL_LINK_STATUS                        : constant := 16#8B82#;
   GL_LOW_FLOAT                          : constant := 16#8DF0#;
   GL_LOW_INT                            : constant := 16#8DF3#;
   GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS   : constant := 16#8B4D#;
   GL_MAX_CUBE_MAP_TEXTURE_SIZE          : constant := 16#851C#;
   GL_MAX_FRAGMENT_UNIFORM_VECTORS       : constant := 16#8DFD#;
   GL_MAX_RENDERBUFFER_SIZE              : constant := 16#84E8#;
   GL_MAX_TEXTURE_IMAGE_UNITS            : constant := 16#8872#;
   GL_MAX_VARYING_VECTORS                : constant := 16#8DFC#;
   GL_MAX_VERTEX_ATTRIBS                 : constant := 16#8869#;
   GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS     : constant := 16#8B4C#;
   GL_MAX_VERTEX_UNIFORM_VECTORS         : constant := 16#8DFB#;
   GL_MEDIUM_FLOAT                       : constant := 16#8DF1#;
   GL_MEDIUM_INT                         : constant := 16#8DF4#;
   GL_MIRRORED_REPEAT                    : constant := 16#8370#;
   GL_NONE                               : constant := 0;
   GL_NUM_COMPRESSED_TEXTURE_FORMATS     : constant := 16#86A2#;
   GL_NUM_SHADER_BINARY_FORMATS          : constant := 16#8DF9#;
   GL_ONE_MINUS_CONSTANT_ALPHA           : constant := 16#8004#;
   GL_ONE_MINUS_CONSTANT_COLOR           : constant := 16#8002#;
   GL_ONE_MINUS_DST_ALPHA                : constant := 16#0305#;
   GL_ONE_MINUS_DST_COLOR                : constant := 16#0307#;
   GL_ONE_MINUS_SRC_COLOR                : constant := 16#0301#;
   GL_RENDERBUFFER                       : constant := 16#8D41#;
   GL_RENDERBUFFER_ALPHA_SIZE            : constant := 16#8D53#;
   GL_RENDERBUFFER_BINDING               : constant := 16#8CA7#;
   GL_RENDERBUFFER_BLUE_SIZE             : constant := 16#8D52#;
   GL_RENDERBUFFER_DEPTH_SIZE            : constant := 16#8D54#;
   GL_RENDERBUFFER_GREEN_SIZE            : constant := 16#8D51#;
   GL_RENDERBUFFER_HEIGHT                : constant := 16#8D43#;
   GL_RENDERBUFFER_INTERNAL_FORMAT       : constant := 16#8D44#;
   GL_RENDERBUFFER_RED_SIZE              : constant := 16#8D50#;
   GL_RENDERBUFFER_STENCIL_SIZE          : constant := 16#8D55#;
   GL_RENDERBUFFER_WIDTH                 : constant := 16#8D42#;
   GL_RGB565                             : constant := 16#8D62#;
   GL_RGB5_A1                            : constant := 16#8057#;
   GL_RGBA4                              : constant := 16#8056#;
   GL_SAMPLER_2D                         : constant := 16#8B5E#;
   GL_SAMPLER_CUBE                       : constant := 16#8B60#;
   GL_SAMPLES                            : constant := 16#80A9#;
   GL_SAMPLE_ALPHA_TO_COVERAGE           : constant := 16#809E#;
   GL_SAMPLE_BUFFERS                     : constant := 16#80A8#;
   GL_SAMPLE_COVERAGE                    : constant := 16#80A0#;
   GL_SAMPLE_COVERAGE_INVERT             : constant := 16#80AB#;
   GL_SAMPLE_COVERAGE_VALUE              : constant := 16#80AA#;
   GL_SHADER_BINARY_FORMATS              : constant := 16#8DF8#;
   GL_SHADER_COMPILER                    : constant := 16#8DFA#;
   GL_SHADER_SOURCE_LENGTH               : constant := 16#8B88#;
   GL_SHADER_TYPE                        : constant := 16#8B4F#;
   GL_SHADING_LANGUAGE_VERSION           : constant := 16#8B8C#;
   GL_SHORT                              : constant := 16#1402#;
   GL_SRC_COLOR                          : constant := 16#0300#;
   GL_STATIC_DRAW                        : constant := 16#88E4#;
   GL_STENCIL_ATTACHMENT                 : constant := 16#8D20#;
   GL_STENCIL_BACK_FAIL                  : constant := 16#8801#;
   GL_STENCIL_BACK_FUNC                  : constant := 16#8800#;
   GL_STENCIL_BACK_PASS_DEPTH_FAIL       : constant := 16#8802#;
   GL_STENCIL_BACK_PASS_DEPTH_PASS       : constant := 16#8803#;
   GL_STENCIL_BACK_REF                   : constant := 16#8CA3#;
   GL_STENCIL_BACK_VALUE_MASK            : constant := 16#8CA4#;
   GL_STENCIL_BACK_WRITEMASK             : constant := 16#8CA5#;
   GL_STENCIL_INDEX8                     : constant := 16#8D48#;
   GL_STREAM_DRAW                        : constant := 16#88E0#;
   GL_TEXTURE                            : constant := 16#1702#;
   GL_TEXTURE_BINDING_CUBE_MAP           : constant := 16#8514#;
   GL_TEXTURE_CUBE_MAP                   : constant := 16#8513#;
   GL_TEXTURE_CUBE_MAP_NEGATIVE_X        : constant := 16#8516#;
   GL_TEXTURE_CUBE_MAP_NEGATIVE_Y        : constant := 16#8518#;
   GL_TEXTURE_CUBE_MAP_NEGATIVE_Z        : constant := 16#851A#;
   GL_TEXTURE_CUBE_MAP_POSITIVE_X        : constant := 16#8515#;
   GL_TEXTURE_CUBE_MAP_POSITIVE_Y        : constant := 16#8517#;
   GL_TEXTURE_CUBE_MAP_POSITIVE_Z        : constant := 16#8519#;
   GL_UNSIGNED_SHORT                     : constant := 16#1403#;
   GL_UNSIGNED_SHORT_4_4_4_4             : constant := 16#8033#;
   GL_UNSIGNED_SHORT_5_5_5_1             : constant := 16#8034#;
   GL_UNSIGNED_SHORT_5_6_5               : constant := 16#8363#;
   GL_VALIDATE_STATUS                    : constant := 16#8B83#;
   GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : constant := 16#889F#;
   GL_VERTEX_ATTRIB_ARRAY_ENABLED        : constant := 16#8622#;
   GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     : constant := 16#886A#;
   GL_VERTEX_ATTRIB_ARRAY_Pointer        : constant := 16#8645#;
   GL_VERTEX_ATTRIB_ARRAY_Size           : constant := 16#8623#;
   GL_VERTEX_ATTRIB_ARRAY_STRIDE         : constant := 16#8624#;
   GL_VERTEX_ATTRIB_ARRAY_TYPE           : constant := 16#8625#;
   GL_VERTEX_SHADER                      : constant := 16#8B31#;


   -------------
   --  Functions
   --

   procedure glAttachShader            (Program         : in     GLuint;
                                        Shader          : in     GLuint);
   procedure glBindAttribLocation      (Program         : in     GLuint;
                                        Index           : in     GLuint;
                                        Name            : access GLchar);
   procedure glBindBuffer              (Target          : in     GLenum;
                                        Buffer          : in     GLuint);
   procedure glBindFramebuffer         (Target          : in     GLenum;
                                        FrameBuffer     : in     GLuint);
   procedure glBindRenderbuffer        (Target          : in     GLenum;
                                        RenderBuffer    : in     GLuint);
   procedure glBlendColor              (Red             : in     GLclampf;
                                        Green           : in     GLclampf;
                                        Blue            : in     GLclampf;
                                        Alpha           : in     GLclampf);
   procedure glBlendEquation           (Mode            : in     GLenum);
   procedure glBlendEquationSeparate   (modeRGB         : in     GLenum;
                                        modeAlpha       : in     GLenum);
   procedure glBlendFuncSeparate       (srcRGB          : in     GLenum;
                                        dstRGB          : in     GLenum;
                                        srcAlpha        : in     GLenum;
                                        dstAlpha        : in     GLenum);
   procedure glBufferData              (Target          : in     GLenum;
                                        Size            : in     GLsizeiptr;
                                        Data            : access GLvoid;
                                        Usage           : in     GLenum);
   procedure glBufferSubData           (Target          : in     GLenum;
                                        Offset          : in     GLintptr;
                                        Size            : in     GLsizeiptr;
                                        Data            : access GLvoid);
   function  glCheckFramebufferStatus  (Target          : in     GLenum) return GLenum;
   procedure glCompileShader           (Shader          : in     GLuint);
   procedure glCompressedTexImage2D    (Target          : in     GLenum;
                                        Level           : in     GLint;
                                        internalFormat  : in     GLenum;
                                        Width           : in     GLsizei;
                                        Height          : in     GLsizei;
                                        Border          : in     GLint;
                                        imageSize       : in     GLsizei;
                                        Data            : access GLvoid);
   procedure glCompressedTexSubImage2D (Target          : in     GLenum;
                                        Level           : in     GLint;
                                        xOffset         : in     GLint;
                                        yOffset         : in     GLint;
                                        Width           : in     GLsizei;
                                        Height          : in     GLsizei;
                                        format          : in     GLenum;
                                        imageSize       : in     GLsizei;
                                        Data            : access GLvoid);
   procedure glCopyTexImage2D          (Target          : in     GLenum;
                                        Level           : in     GLint;
                                        internalFormat  : in     GLenum;
                                        X               : in     GLint;
                                        Y               : in     GLint;
                                        Width           : in     GLsizei;
                                        Height          : in     GLsizei;
                                        Border          : in     GLint);
   procedure glCopyTexSubImage2D       (Target          : in     GLenum;
                                        Level           : in     GLint;
                                        xOffset         : in     GLint;
                                        yOffset         : in     GLint;
                                        X               : in     GLint;
                                        Y               : in     GLint;
                                        Width           : in     GLsizei;
                                        Height          : in     GLsizei);
   function  glCreateProgram return GLuint;
   function  glCreateShader             (the_Type       : in     GLenum) return GLuint;
   procedure glDeleteBuffers            (N              : in     GLsizei;
                                         Buffers        : access GLuint);
   procedure glDeleteFramebuffers       (N              : in     GLsizei;
                                         FrameBuffers   : access GLuint);
   procedure glDeleteProgram            (Program        : in     GLuint);
   procedure glDeleteRenderbuffers      (N              : in     GLsizei;
                                         RenderBuffers  : access GLuint);
   procedure glDeleteShader             (Shader         : in     GLuint);
   procedure glDeleteTextures           (N              : in     GLsizei;
                                         Textures       : access GLuint);
   procedure glDetachShader             (Program        : in     GLuint;
                                         Shader         : in     GLuint);
   procedure glDisableVertexAttribArray (Index          : in     GLuint);
   procedure glEnableVertexAttribArray  (Index          : in     GLuint);
   procedure glFramebufferRenderbuffer  (Target         : in     GLenum;
                                         Attachment     : in     GLenum;
                                         RenderBufferTarget
                                                        : in     GLenum;
                                         RenderBuffer   : in     GLuint);
   procedure glFramebufferTexture2D     (Target         : in     GLenum;
                                         Attachment     : in     GLenum;
                                         TexTarget      : in     GLenum;
                                         Texture        : in     GLuint;
                                         Level          : in     GLint);
   procedure glGenBuffers               (N              : in     GLsizei;
                                         Buffers        : access GLuint);
   procedure glGenFramebuffers          (N              : in     GLsizei;
                                         FrameBuffers   : access GLuint);
   procedure glGenRenderbuffers         (N              : in     GLsizei;
                                         RenderBuffers  : access GLuint);
   procedure glGenerateMipmap           (Target         : in     GLenum);
   procedure glGetActiveAttrib          (Program        : in     GLuint;
                                         Index          : in     GLuint;
                                         BufSize        : in     GLsizei;
                                         Length         : access GLsizei;
                                         Size           : access GLint;
                                         the_Type       : access GLenum;
                                         Name           : access GLchar);
   procedure glGetActiveUniform         (Program        : in     GLuint;
                                         Index          : in     GLuint;
                                         BufSize        : in     GLsizei;
                                         Length         : access GLsizei;
                                         Size           : access GLint;
                                         the_Type       : access GLenum;
                                         Name           : access GLchar);
   procedure glGetAttachedShaders       (Program        : in     GLuint;
                                         maxCount       : in     GLsizei;
                                         Count          : access GLsizei;
                                         Shaders        : access GLuint);
   function glGetAttribLocation         (Program        : in     GLuint;
                                         Name           : access GLchar) return Interfaces.C.int;
   procedure glGetBufferParameteriv     (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetFramebufferAttachmentParameteriv
                                        (Target         : in     GLenum;
                                         Attachment     : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetProgramiv             (Program        : in     GLuint;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetProgramInfoLog        (Program        : in     GLuint;
                                         BufSize        : in     GLsizei;
                                         Length         : access GLsizei;
                                         infoLog        : access GLchar);
   procedure glGetRenderbufferParameteriv
                                        (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetShaderiv              (Shader         : in     GLuint;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetShaderInfoLog         (Shader         : in     GLuint;
                                         BufSize        : in     GLsizei;
                                         Length         : access GLsizei;
                                         infoLog        : access GLchar);
   procedure glGetShaderPrecisionFormat (ShaderType     : in     GLenum;
                                         PrecisionType  : in     GLenum;
                                         the_Range      : access GLint;
                                         Precision      : access GLint);
   procedure glGetShaderSource          (Shader         : in     GLuint;
                                         BufSize        : in     GLsizei;
                                         Length         : access GLsizei;
                                         Source         : access GLchar);
   procedure glGetTexParameterfv        (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : in     GLfloat_Address);
   procedure glGetUniformfv             (Program        : in     GLuint;
                                         Location       : in     GLint;
                                         Params         : in     GLfloat_Address);
   procedure glGetUniformiv             (Program        : in     GLuint;
                                         Location       : in     GLint;
                                         Params         : access GLint);
   function  glGetUniformLocation       (Program        : in     GLuint;
                                         Name           : access GLchar) return Interfaces.C.int;
   procedure glGetVertexAttribfv        (Index          : in     GLuint;
                                         pName          : in     GLenum;
                                         Params         : in     GLfloat_Address);
   procedure glGetVertexAttribiv        (Index          : in     GLuint;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glGetVertexAttribPointerv  (Index          : in     GLuint;
                                         pName          : in     GLenum;
                                         Pointer        : access GLvoid);
   function  glIsBuffer                 (Buffer         : in     GLuint) return GLboolean;
   function  glIsFramebuffer            (FrameBuffer    : in     GLuint) return GLboolean;
   function  glIsProgram                (Program        : in     GLuint) return GLboolean;
   function  glIsRenderbuffer           (RenderBuffer   : in     GLuint) return GLboolean;
   function  glIsShader                 (Shader         : in     GLuint) return GLboolean;
   function  glIsTexture                (Texture        : in     GLuint) return GLboolean;
   procedure glLinkProgram              (Program        : in     GLuint);
   procedure glReleaseShaderCompiler;
   procedure glRenderbufferStorage      (Target         : in     GLenum;
                                         internalFormat : in     GLenum;
                                         Width          : in     GLsizei;
                                         Height         : in     GLsizei);
   procedure glSampleCoverage           (Value          : in     GLclampf;
                                         Invert         : in     GLboolean);
   procedure glShaderBinary             (N              : in     GLint;
                                         Shaders        : access GLuint;
                                         BinaryFormat   : in     GLenum;
                                         Binary         : access GLvoid;
                                         Length         : in     GLint);
   procedure glShaderSource             (Shader         : in     GLuint;
                                         Count          : in     GLsizei;
                                         String         : access GLchar_Pointer;
                                         Length         : access GLint);
   procedure glStencilFuncSeparate      (Face           : in     GLenum;
                                         Func           : in     GLenum;
                                         Ref            : in     GLint;
                                         Mask           : in     GLuint);
   procedure glStencilMaskSeparate      (Face           : in     GLenum;
                                         Mask           : in     GLuint);
   procedure glStencilOpSeparate        (Face           : in     GLenum;
                                         Fail           : in     GLenum;
                                         zFail          : in     GLenum;
                                         zPass          : in     GLenum);
   procedure glTexParameterf            (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Param          : in     GLfloat);
   procedure glTexParameterfv           (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : in     GLfloat_Address);
   procedure glTexParameteriv           (Target         : in     GLenum;
                                         pName          : in     GLenum;
                                         Params         : access GLint);
   procedure glUniform1f                (Location       : in     GLint;
                                         X              : in     GLfloat);
   procedure glUniform1fv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : in     GLfloat_Address);
   procedure glUniform1i                (Location       : in     GLint;
                                         X              : in     GLint);
   procedure glUniform1iv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : access GLint);
   procedure glUniform2f                (Location       : in     GLint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat);
   procedure glUniform2fv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : in     GLfloat_Address);
   procedure glUniform2i                (Location       : in     GLint;
                                         X              : in     GLint;
                                         Y              : in     GLint);
   procedure glUniform2iv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : access GLint);
   procedure glUniform3f                (Location       : in     GLint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat;
                                         Z              : in     GLfloat);
   procedure glUniform3fv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : in     GLfloat_Address);
   procedure glUniform3i                (Location       : in     GLint;
                                         X              : in     GLint;
                                         Y              : in     GLint;
                                         Z              : in     GLint);
   procedure glUniform3iv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : access GLint);
   procedure glUniform4f                (Location       : in     GLint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat;
                                         Z              : in     GLfloat;
                                         W              : in     GLfloat);
   procedure glUniform4fv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : in     GLfloat_Address);
   procedure glUniform4i                (Location       : in     GLint;
                                         X              : in     GLint;
                                         Y              : in     GLint;
                                         Z              : in     GLint;
                                         W              : in     GLint);
   procedure glUniform4iv               (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         V              : access GLint);
   procedure glUniformMatrix2fv         (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         Transpose      : in     GLboolean;
                                         Value          : in     GLfloat_Address);
   procedure glUniformMatrix3fv         (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         Transpose      : in     GLboolean;
                                         Value          : in     GLfloat_Address);
   procedure glUniformMatrix4fv         (Location       : in     GLint;
                                         Count          : in     GLsizei;
                                         Transpose      : in GLboolean;
                                         Value          : in     GLfloat_Address);
   procedure glUseProgram               (Program        : in     GLuint);
   procedure glValidateProgram          (Program        : in     GLuint);
   procedure glVertexAttrib1f           (Index          : in     GLuint;
                                         X              : in     GLfloat);
   procedure glVertexAttrib1fv          (Index          : in     GLuint;
                                         Values         : in     GLfloat_Address);
   procedure glVertexAttrib2f           (Index          : in     GLuint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat);
   procedure glVertexAttrib2fv          (Index          : in     GLuint;
                                         Values         : in     GLfloat_Address);
   procedure glVertexAttrib3f           (Index          : in     GLuint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat;
                                         Z              : in     GLfloat);
   procedure glVertexAttrib3fv          (Index          : in     GLuint;
                                         Values         : in     GLfloat_Address);
   procedure glVertexAttrib4f           (Index          : in     GLuint;
                                         X              : in     GLfloat;
                                         Y              : in     GLfloat;
                                         Z              : in     GLfloat;
                                         W              : in     GLfloat);
   procedure glVertexAttrib4fv          (Index          : in     GLuint;
                                         Values         : in     GLfloat_Address);
   procedure glVertexAttribPointer      (Index          : in     GLuint;
                                         Size           : in     GLint;
                                         the_Type       : in     GLenum;
                                         Normalized     : in     GLboolean;
                                         Stride         : in     GLsizei;
                                         Ptr            : access GLvoid);

private

   for GLintptr  'Size use standard'Address_Size;
   for GLsizeiptr'Size use standard'Address_Size;


   -------------
   --  Functions
   --
   pragma Import (StdCall, glAttachShader,               "glAttachShader");
   pragma Import (StdCall, glBindAttribLocation,         "glBindAttribLocation");
   pragma Import (StdCall, glBindBuffer,                 "glBindBuffer");
   pragma Import (StdCall, glBindFramebuffer,            "glBindFramebuffer");
   pragma Import (StdCall, glBindRenderbuffer,           "glBindRenderbuffer");
   pragma Import (StdCall, glBlendColor,                 "glBlendColor");
   pragma Import (StdCall, glBlendEquation,              "glBlendEquation");
   pragma Import (StdCall, glBlendEquationSeparate,      "glBlendEquationSeparate");
   pragma Import (StdCall, glBlendFuncSeparate,          "glBlendFuncSeparate");
   pragma Import (StdCall, glBufferData,                 "glBufferData");
   pragma Import (StdCall, glBufferSubData,              "glBufferSubData");
   pragma Import (StdCall, glCheckFramebufferStatus,     "glCheckFramebufferStatus");
   pragma Import (StdCall, glCompileShader,              "glCompileShader");
   pragma Import (StdCall, glCompressedTexImage2D,       "glCompressedTexImage2D");
   pragma Import (StdCall, glCompressedTexSubImage2D,    "glCompressedTexSubImage2D");
   pragma Import (StdCall, glCopyTexImage2D,             "glCopyTexImage2D");
   pragma Import (StdCall, glCopyTexSubImage2D,          "glCopyTexSubImage2D");
   pragma Import (StdCall, glCreateProgram,              "glCreateProgram");
   pragma Import (StdCall, glCreateShader,               "glCreateShader");
   pragma Import (StdCall, glDeleteBuffers,              "glDeleteBuffers");
   pragma Import (StdCall, glDeleteFramebuffers,         "glDeleteFramebuffers");
   pragma Import (StdCall, glDeleteProgram,              "glDeleteProgram");
   pragma Import (StdCall, glDeleteRenderbuffers,        "glDeleteRenderbuffers");
   pragma Import (StdCall, glDeleteShader,               "glDeleteShader");
   pragma Import (StdCall, glDeleteTextures,             "glDeleteTextures");
   pragma Import (StdCall, glDetachShader,               "glDetachShader");
   pragma Import (StdCall, glDisableVertexAttribArray,   "glDisableVertexAttribArray");
   pragma Import (StdCall, glEnableVertexAttribArray,    "glEnableVertexAttribArray");
   pragma Import (StdCall, glFramebufferRenderbuffer,    "glFramebufferRenderbuffer");
   pragma Import (StdCall, glFramebufferTexture2D,       "glFramebufferTexture2D");
   pragma Import (StdCall, glGenBuffers,                 "glGenBuffers");
   pragma Import (StdCall, glGenerateMipmap,             "glGenerateMipmap");
   pragma Import (StdCall, glGenFramebuffers,            "glGenFramebuffers");
   pragma Import (StdCall, glGenRenderbuffers,           "glGenRenderbuffers");
   pragma Import (StdCall, glGetActiveAttrib,            "glGetActiveAttrib");
   pragma Import (StdCall, glGetActiveUniform,           "glGetActiveUniform");
   pragma Import (StdCall, glGetAttachedShaders,         "glGetAttachedShaders");
   pragma Import (StdCall, glGetAttribLocation,          "glGetAttribLocation");
   pragma Import (StdCall, glGetBufferParameteriv,       "glGetBufferParameteriv");
   pragma Import (StdCall, glGetFramebufferAttachmentParameteriv,
                                                         "glGetFramebufferAttachmentParameteriv");
   pragma Import (StdCall, glGetProgramiv,               "glGetProgramiv");
   pragma Import (StdCall, glGetProgramInfoLog,          "glGetProgramInfoLog");
   pragma Import (StdCall, glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv");
   pragma Import (StdCall, glGetShaderiv,                "glGetShaderiv");
   pragma Import (StdCall, glGetShaderInfoLog,           "glGetShaderInfoLog");
   pragma Import (StdCall, glGetShaderPrecisionFormat,   "glGetShaderPrecisionFormat");
   pragma Import (StdCall, glGetShaderSource,            "glGetShaderSource");
   pragma Import (StdCall, glGetTexParameterfv,          "glGetTexParameterfv");
   pragma Import (StdCall, glGetUniformfv,               "glGetUniformfv");
   pragma Import (StdCall, glGetUniformiv,               "glGetUniformiv");
   pragma Import (StdCall, glGetUniformLocation,         "glGetUniformLocation");
   pragma Import (StdCall, glGetVertexAttribfv,          "glGetVertexAttribfv");
   pragma Import (StdCall, glGetVertexAttribiv,          "glGetVertexAttribiv");
   pragma Import (StdCall, glGetVertexAttribPointerv,    "glGetVertexAttribPointerv");
   pragma Import (StdCall, glIsBuffer,                   "glIsBuffer");
   pragma Import (StdCall, glIsFramebuffer,              "glIsFramebuffer");
   pragma Import (StdCall, glIsProgram,                  "glIsProgram");
   pragma Import (StdCall, glIsRenderbuffer,             "glIsRenderbuffer");
   pragma Import (StdCall, glIsShader,                   "glIsShader");
   pragma Import (StdCall, glIsTexture,                  "glIsTexture");
   pragma Import (StdCall, glLinkProgram,                "glLinkProgram");
   pragma Import (StdCall, glReleaseShaderCompiler,      "glReleaseShaderCompiler");
   pragma Import (StdCall, glRenderbufferStorage,        "glRenderbufferStorage");
   pragma Import (StdCall, glSampleCoverage,             "glSampleCoverage");
   pragma Import (StdCall, glShaderBinary,               "glShaderBinary");
   pragma Import (StdCall, glShaderSource,               "glShaderSource");
   pragma Import (StdCall, glStencilFuncSeparate,        "glStencilFuncSeparate");
   pragma Import (StdCall, glStencilMaskSeparate,        "glStencilMaskSeparate");
   pragma Import (StdCall, glStencilOpSeparate,          "glStencilOpSeparate");
   pragma Import (StdCall, glTexParameterf,              "glTexParameterf");
   pragma Import (StdCall, glTexParameterfv,             "glTexParameterfv");
   pragma Import (StdCall, glTexParameteriv,             "glTexParameteriv");
   pragma Import (StdCall, glUniform1f,                  "glUniform1f");
   pragma Import (StdCall, glUniform1fv,                 "glUniform1fv");
   pragma Import (StdCall, glUniform1i,                  "glUniform1i");
   pragma Import (StdCall, glUniform1iv,                 "glUniform1iv");
   pragma Import (StdCall, glUniform2f,                  "glUniform2f");
   pragma Import (StdCall, glUniform2fv,                 "glUniform2fv");
   pragma Import (StdCall, glUniform2i,                  "glUniform2i");
   pragma Import (StdCall, glUniform2iv,                 "glUniform2iv");
   pragma Import (StdCall, glUniform3f,                  "glUniform3f");
   pragma Import (StdCall, glUniform3fv,                 "glUniform3fv");
   pragma Import (StdCall, glUniform3i,                  "glUniform3i");
   pragma Import (StdCall, glUniform3iv,                 "glUniform3iv");
   pragma Import (StdCall, glUniform4f,                  "glUniform4f");
   pragma Import (StdCall, glUniform4fv,                 "glUniform4fv");
   pragma Import (StdCall, glUniform4i,                  "glUniform4i");
   pragma Import (StdCall, glUniform4iv,                 "glUniform4iv");
   pragma Import (StdCall, glUniformMatrix2fv,           "glUniformMatrix2fv");
   pragma Import (StdCall, glUniformMatrix3fv,           "glUniformMatrix3fv");
   pragma Import (StdCall, glUniformMatrix4fv,           "glUniformMatrix4fv");
   pragma Import (StdCall, glUseProgram,                 "glUseProgram");
   pragma Import (StdCall, glValidateProgram,            "glValidateProgram");
   pragma Import (StdCall, glVertexAttrib1f,             "glVertexAttrib1f");
   pragma Import (StdCall, glVertexAttrib1fv,            "glVertexAttrib1fv");
   pragma Import (StdCall, glVertexAttrib2f,             "glVertexAttrib2f");
   pragma Import (StdCall, glVertexAttrib2fv,            "glVertexAttrib2fv");
   pragma Import (StdCall, glVertexAttrib3f,             "glVertexAttrib3f");
   pragma Import (StdCall, glVertexAttrib3fv,            "glVertexAttrib3fv");
   pragma Import (StdCall, glVertexAttrib4f,             "glVertexAttrib4f");
   pragma Import (StdCall, glVertexAttrib4fv,            "glVertexAttrib4fv");
   pragma Import (StdCall, glVertexAttribPointer,        "glVertexAttribPointer");

end GL.lean;
