# This is the definition file for all GL 1.1 stuff

%COPY_INTERFACE

const
  // GL 1.1 texturing
  GL_PROXY_TEXTURE_1D                   = $8063;
  GL_PROXY_TEXTURE_2D                   = $8064;
  GL_TEXTURE_PRIORITY                   = $8066;
  GL_TEXTURE_RESIDENT                   = $8067;
  GL_TEXTURE_BINDING_1D                 = $8068;
  GL_TEXTURE_BINDING_2D                 = $8069;
  GL_TEXTURE_INTERNAL_FORMAT            = $1003;

  // Internal texture formats (GL 1.1)
  GL_ALPHA4                             = $803B;
  GL_ALPHA8                             = $803C;
  GL_ALPHA12                            = $803D;
  GL_ALPHA16                            = $803E;
  GL_LUMINANCE4                         = $803F;
  GL_LUMINANCE8                         = $8040;
  GL_LUMINANCE12                        = $8041;
  GL_LUMINANCE16                        = $8042;
  GL_LUMINANCE4_ALPHA4                  = $8043;
  GL_LUMINANCE6_ALPHA2                  = $8044;
  GL_LUMINANCE8_ALPHA8                  = $8045;
  GL_LUMINANCE12_ALPHA4                 = $8046;
  GL_LUMINANCE12_ALPHA12                = $8047;
  GL_LUMINANCE16_ALPHA16                = $8048;
  GL_INTENSITY                          = $8049;
  GL_INTENSITY4                         = $804A;
  GL_INTENSITY8                         = $804B;
  GL_INTENSITY12                        = $804C;
  GL_INTENSITY16                        = $804D;
  GL_R3_G3_B2                           = $2A10;
  GL_RGB4                               = $804F;
  GL_RGB5                               = $8050;
  GL_RGB8                               = $8051;
  GL_RGB10                              = $8052;
  GL_RGB12                              = $8053;
  GL_RGB16                              = $8054;
  GL_RGBA2                              = $8055;
  GL_RGBA4                              = $8056;
  GL_RGB5_A1                            = $8057;
  GL_RGBA8                              = $8058;
  GL_RGB10_A2                           = $8059;
  GL_RGBA12                             = $805A;
  GL_RGBA16                             = $805B;

%END


#=====================================================================
# Procedures and functions
#=====================================================================

%PROCS

// Miscellaneous
glEnableClientState: procedure(cap: GLenum);
glDisableClientState: procedure(cap: GLenum);
glPushClientAttrib: procedure(mask: GLbitfield);
glPopClientAttrib: procedure;

// Drawing Functions
glIndexub: procedure(c: Byte);
glIndexubv: procedure(var c: Byte);

// Vertex Arrays
glVertexPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
glNormalPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
glColorPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
glIndexPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
glTexCoordPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
glEdgeFlagPointer: procedure(stride: LongInt; var ptr);
glGetPointerv: procedure(pname: GLenum; var params: Pointer);
glArrayElement: procedure(i: LongInt);
glDrawArrays: procedure(mode: GLenum; first, count: LongInt);
glDrawElements: procedure(mode: GLenum; count: Integer; AType: GLenum; var indices);
glInterleavedArrays: procedure(format: GLenum; stride: LongInt; var pointer);

// Texture Mapping
glGenTextures: procedure(n: LongInt; var textures: LongWord);
glDeleteTextures: procedure(n: LongInt; var textures: LongWord);
glBindTexture: procedure(target: GLenum; texture: LongWord);
glPrioritizeTextures: procedure(n: LongInt; var textures: LongWord; var priorities: GLclampf);
glAreTexturesResident: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean;
glIsTexture: function(texture: LongWord): Boolean;
glTexSubImage1D: procedure(target: GLenum; level, xoffset, width: LongInt; format, AType: GLenum; var pixels);
glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, width, height: LongInt; format, AType: GLenum; var pixels);
glCopyTexImage1D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, border: LongInt);
glCopyTexImage2D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, height, border: LongInt);
glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y, width: LongInt);
glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y, width, height: LongInt);

%END
