package gl.Binding
--
--  Provides functions common to all openGL profiles.
--
is

   procedure glActiveTexture (Texture  : in     GLenum);
   procedure glBindTexture   (Target   : in     GLenum;
                              Texture  : in     GLuint);
   procedure glBlendFunc     (sFactor  : in     GLenum;
                              dFactor  : in     GLenum);
   procedure glClear         (Mask     : in     GLbitfield);
   procedure glClearColor    (Red      : in     GLclampf;
                              Green    : in     GLclampf;
                              Blue     : in     GLclampf;
                              Alpha    : in     GLclampf);
   procedure glClearDepthf   (Depth    : in     GLclampf);
   procedure glClearStencil  (S        : in     GLint);
   procedure glColorMask     (Red      : in     GLboolean;
                              Green    : in     GLboolean;
                              Blue     : in     GLboolean;
                              Alpha    : in     GLboolean);
   procedure glCullFace      (Mode     : in     GLenum);
   procedure glDepthFunc     (Func     : in     GLenum);
   procedure glDepthMask     (Flag     : in     GLboolean);
   procedure glDepthRangef   (zNear    : in     GLclampf;
                              zFar     : in     GLclampf);
   procedure glDisable       (Cap      : in     GLenum);
   procedure glDrawArrays    (Mode     : in     GLenum;
                              First    : in     GLint;
                              Count    : in     GLsizei);
   procedure glDrawElements  (Mode     : in     GLenum;
                              Count    : in     GLsizei;
                              the_Type : in     GLenum;
                              Indices  : access GLvoid);
   procedure glEnable        (Cap      : in     GLenum);
   procedure glFinish;
   procedure glFlush;
   procedure glFrontFace     (Mode     : in     GLenum);
   procedure glGenTextures   (N        : in     GLsizei;
                              Textures : access GLuint);
   function  glGetError                  return GLenum;
   procedure glGetBooleanv   (pName    : in     GLenum;
                              Params   : access GLboolean);
   procedure glGetFloatv     (pName    : in     GLenum;
                              Params   : access GLfloat);
   procedure glGetIntegerv   (pName    : in     GLenum;
                              Params   : access GLint);
   function  glGetString     (Name     : in     GLenum)  return access GLubyte;
   procedure glGetTexParameteriv
                             (Target   : in     GLenum;
                              pName    : in     GLenum;
                              Params   : access GLint);
   procedure glHint          (Target   : in     GLenum;
                              Mode     : in     GLenum);
   function  glIsEnabled     (Cap      : in     GLenum)   return GLboolean;
   procedure glLineWidth     (Width    : in     GLfloat);
   procedure glPixelStorei   (pName    : in     GLenum;
                              Param    : in     GLint);
   procedure glPolygonOffset (Factor   : in     GLfloat;
                              Units    : in     GLfloat);
   procedure glReadPixels    (X        : in     GLint;
                              Y        : in     GLint;
                              Width    : in     GLsizei;
                              Height   : in     GLsizei;
                              Format   : in     GLenum;
                              the_Type : in     GLenum;
                              Pixels   : access GLvoid);
   procedure glScissor       (X        : in     GLint;
                              Y        : in     GLint;
                              Width    : in     GLsizei;
                              Height   : in     GLsizei);
   procedure glStencilFunc   (Func     : in     GLenum;
                              Ref      : in     GLint;
                              Mask     : in     GLuint);
   procedure glStencilMask   (Mask     : in     GLuint);
   procedure glStencilOp     (Fail     : in     GLenum;
                              zFail    : in     GLenum;
                              zPass    : in     GLenum);
   procedure glTexImage2D    (Target   : in     GLenum;
                              Level    : in     GLint;
                              internalFormat
                                       : in     GLenum;
                              Width    : in     GLsizei;
                              Height   : in     GLsizei;
                              Border   : in     GLint;
                              Format   : in     GLenum;
                              the_Type : in     GLenum;
                              Pixels   : access GLvoid);
   procedure glTexSubImage2D (Target   : in     GLenum;
                              Level    : in     GLint;
                              xOffset  : in     GLint;
                              yOffset  : in     GLint;
                              Width    : in     GLsizei;
                              Height   : in     GLsizei;
                              Format   : in     GLenum;
                              the_Type : in     GLenum;
                              Pixels   : access GLvoid);
   procedure glTexParameteri (Target   : in     GLenum;
                              pName    : in     GLenum;
                              Param    : in     GLint);
   procedure glViewport      (X        : in     GLint;
                              Y        : in     GLint;
                              Width    : in     GLsizei;
                              Height   : in     GLsizei);


private

   pragma Import (StdCall, glActiveTexture,     "glActiveTexture");
   pragma Import (Stdcall, glBindTexture,       "glBindTexture");
   pragma Import (Stdcall, glBlendFunc,         "glBlendFunc");
   pragma Import (Stdcall, glClear,             "glClear");
   pragma Import (Stdcall, glClearColor,        "glClearColor");
   pragma Import (Stdcall, glClearDepthf,       "glClearDepthf");
   pragma Import (Stdcall, glClearStencil,      "glClearStencil");
   pragma Import (Stdcall, glColorMask,         "glColorMask");
   pragma Import (Stdcall, glCullFace,          "glCullFace");
   pragma Import (Stdcall, glDepthFunc,         "glDepthFunc");
   pragma Import (Stdcall, glDepthMask,         "glDepthMask");
   pragma Import (Stdcall, glDepthRangef,       "glDepthRangef");
   pragma Import (Stdcall, glDisable,           "glDisable");
   pragma Import (Stdcall, glDrawArrays,        "glDrawArrays");
   pragma Import (Stdcall, glDrawElements,      "glDrawElements");
   pragma Import (Stdcall, glEnable,            "glEnable");
   pragma Import (Stdcall, glFinish,            "glFinish");
   pragma Import (Stdcall, glFlush,             "glFlush");
   pragma Import (Stdcall, glFrontFace,         "glFrontFace");
   pragma Import (Stdcall, glGenTextures,       "glGenTextures");
   pragma Import (Stdcall, glGetError,          "glGetError");
   pragma Import (StdCall, glGetBooleanv,       "glGetBooleanv");
   pragma Import (StdCall, glGetFloatv,         "glGetFloatv");
   pragma Import (StdCall, glGetIntegerv,       "glGetIntegerv");
   pragma Import (StdCall, glGetString,         "glGetString");
   pragma Import (StdCall, glGetTexParameteriv, "glGetTexParameteriv");
   pragma Import (Stdcall, glHint,              "glHint");
   pragma Import (Stdcall, glIsEnabled,         "glIsEnabled");
   pragma Import (Stdcall, glLineWidth,         "glLineWidth");
   pragma Import (Stdcall, glPixelStorei,       "glPixelStorei");
   pragma Import (Stdcall, glPolygonOffset,     "glPolygonOffset");
   pragma Import (StdCall, glReadPixels,        "glReadPixels");
   pragma Import (Stdcall, glScissor,           "glScissor");
   pragma Import (Stdcall, glStencilFunc,       "glStencilFunc");
   pragma Import (Stdcall, glStencilMask,       "glStencilMask");
   pragma Import (Stdcall, glStencilOp,         "glStencilOp");
   pragma Import (StdCall, glTexImage2D,        "glTexImage2D");
   pragma Import (StdCall, glTexSubImage2D,     "glTexSubImage2D");
   pragma Import (Stdcall, glTexParameteri,     "glTexParameteri");
   pragma Import (Stdcall, glViewport,          "glViewport");

end gl.Binding;
