added Window-isms previously in gl.h
[mesa.git] / src / mesa / main / dd.h
index 14d27fbb57291462e25ee79f3f0b3a6869b8bf74..ac6ce764736c10a732d7020e0d4ff9dc506d72c5 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: dd.h,v 1.20 2000/03/20 23:45:59 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -434,13 +433,11 @@ struct dd_function_table {
     * Else, only write stencil[i] if mask[i] is non-zero.
     */
 
-
    void (*ReadStencilSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y,
                             GLstencil stencil[] );
    /* Read a horizontal span of stencil values from the stencil buffer.
     */
 
-
    void (*WriteStencilPixels)( GLcontext *ctx, GLuint n,
                                const GLint x[], const GLint y[],
                                const GLstencil stencil[],
@@ -457,18 +454,10 @@ struct dd_function_table {
     */
   
 
-
    /***
-    *** Accelerated point, line, polygon, glDrawPixels and glBitmap functions:
+    *** glDraw/Read/CopyPixels and glBitmap functions:
     ***/
 
-   points_func   PointsFunc;
-   line_func     LineFunc;
-   triangle_func TriangleFunc;
-   quad_func     QuadFunc;
-   rect_func     RectFunc;    
-   
-
    GLboolean (*DrawPixels)( GLcontext *ctx,
                             GLint x, GLint y, GLsizei width, GLsizei height,
                             GLenum format, GLenum type,
@@ -506,22 +495,17 @@ struct dd_function_table {
    /* This is called by glBitmap.  Works the same as DrawPixels, above.
     */
 
+
    /***
     *** Texture mapping functions:
     ***/
 
-   void (*TexEnv)( GLcontext *ctx, GLenum target, GLenum pname,
-                   const GLfloat *param );
-   /*
-    * Called whenever glTexEnv*() is called.
-    */
-
    void (*TexImage)( GLcontext *ctx, GLenum target,
                      struct gl_texture_object *tObj, GLint level,
                      GLint internalFormat,
                      const struct gl_texture_image *image );
-   /*
-    * Called whenever a texture object's image is changed.
+   /* XXX this function is obsolete */
+   /* Called whenever a texture object's image is changed.
     *    texObject is the number of the texture object being changed.
     *    level indicates the mipmap level.
     *    internalFormat is the format in which the texture is to be stored.
@@ -535,8 +519,8 @@ struct dd_function_table {
                         GLsizei width, GLsizei height,
                         GLint internalFormat,
                         const struct gl_texture_image *image );
-   /*
-    * Called from glTexSubImage() to define a sub-region of a texture.
+   /* XXX this function is obsolete */
+   /* Called from glTexSubImage() to define a sub-region of a texture.
     */
 
 
@@ -580,8 +564,7 @@ struct dd_function_table {
                                const GLvoid *pixels,
                                const struct gl_pixelstore_attrib *packing,
                                struct gl_texture_object *texObj,
-                               struct gl_texture_image *texImage,
-                               GLboolean *retainInternalCopy );
+                               struct gl_texture_image *texImage );
    GLboolean (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
                                GLint xoffset, GLint yoffset,
                                GLsizei width, GLsizei height,
@@ -589,8 +572,7 @@ struct dd_function_table {
                                const GLvoid *pixels,
                                const struct gl_pixelstore_attrib *packing,
                                struct gl_texture_object *texObj,
-                               struct gl_texture_image *texImage,
-                               GLboolean *retainInternalCopy );
+                               struct gl_texture_image *texImage );
    GLboolean (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
                                GLint xoffset, GLint yoffset, GLint zoffset,
                                GLsizei width, GLsizei height, GLint depth,
@@ -598,9 +580,7 @@ struct dd_function_table {
                                const GLvoid *pixels,
                                const struct gl_pixelstore_attrib *packing,
                                struct gl_texture_object *texObj,
-                               struct gl_texture_image *texImage,
-                               GLboolean *retainInternalCopy );
-
+                               struct gl_texture_image *texImage );
    /* Called by glTexSubImage1/2/3D.
     * Will not be called if any glPixelTransfer operations are enabled.
     * Arguments:
@@ -611,14 +591,10 @@ struct dd_function_table {
     *   <texImage> is the target texture image.  It will have the texture
     *      width, height, border and internalFormat information.
     * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
-    * should do the job.  If GL_FALSE is returned, this function will be
-    * called a second time after the texture image has been unpacked into
-    * GLubytes.  It may be easier for the driver to handle then.
+    * should do the job.  If GL_FALSE is returned, then TexImage1/2/3D will
+    * be called with the complete texture image.
     */
       
-
-
-
    GLboolean (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
                                 GLenum internalFormat, GLint x, GLint y,
                                 GLsizei width, GLint border );
@@ -649,6 +625,7 @@ struct dd_function_table {
     */
 
    GLvoid *(*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
+                           const struct gl_texture_object *texObj,
                            GLenum *formatOut, GLenum *typeOut,
                            GLboolean *freeImageOut );
    /* Called by glGetTexImage or by core Mesa when a texture image
@@ -663,59 +640,66 @@ struct dd_function_table {
     * Core Mesa will perform any image format/type conversions that are needed.
     */
 
+   void (*TexEnv)( GLcontext *ctx, GLenum target, GLenum pname,
+                   const GLfloat *param );
+   /* Called by glTexEnv*().
+    */
+
    void (*TexParameter)( GLcontext *ctx, GLenum target,
-                         struct gl_texture_object *tObj,
+                         struct gl_texture_object *texObj,
                          GLenum pname, const GLfloat *params );
-   /*
-    * Called whenever glTexParameter*() is called.
-    *    target is GL_TEXTURE_1D or GL_TEXTURE_2D
-    *    texObject is the texture object to modify
-    *    pname is one of GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER,
-    *       GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, or GL_TEXTURE_BORDER_COLOR.
-    *    params is dependant on pname.  See man glTexParameter.
+   /* Called by glTexParameter*().
+    *    <target> is user specified
+    *    <texObj> the texture object to modify
+    *    <pname> is one of GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER,
+    *       GL_TEXTURE_WRAP_[STR], or GL_TEXTURE_BORDER_COLOR.
+    *    <params> is user specified.
     */
 
    void (*BindTexture)( GLcontext *ctx, GLenum target,
                         struct gl_texture_object *tObj );
-   /*
-    * Called whenever glBindTexture() is called.  This specifies which
-    * texture is to be the current one.  No dirty flags will be set.
+   /* Called by glBindTexture().
     */
 
    void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
-   /*
-    * Called when a texture object is about to be deallocated.  Driver
+   /* Called when a texture object is about to be deallocated.  Driver
     * should free anything attached to the DriverData pointers.
     */
 
-   void (*UpdateTexturePalette)( GLcontext *ctx,
-                                 struct gl_texture_object *tObj );
-   /*
-    * Called when the texture's color lookup table is changed.
-    * If tObj is NULL then the shared texture palette ctx->Texture.Palette
-    * was changed.
+   GLboolean (*IsTextureResident)( GLcontext *ctx, 
+                                   struct gl_texture_object *t );
+   /* Called by glAreTextureResident().
     */
 
-   void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
-   /*
-    * Called by glActiveTextureARB to set current texture unit.
+   void (*PrioritizeTexture)( GLcontext *ctx,  struct gl_texture_object *t,
+                              GLclampf priority );
+   /* Called by glPrioritizeTextures().
     */
 
-
-   GLboolean (*IsTextureResident)( GLcontext *ctx, 
-                                  struct gl_texture_object *t );
-   /*
-    * Allows the driver to implement the AreTexturesResident tests without
-    * knowing about Mesa's internal hash tables for textures.
+   void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
+   /* Called by glActiveTextureARB to set current texture unit.
     */
 
-   void (*PrioritizeTexture)( GLcontext *ctx, 
-                             struct gl_texture_object *t,
-                             GLclampf priority );
-   /* Notify driver of priority change for a texture.
+   void (*UpdateTexturePalette)( GLcontext *ctx,
+                                 struct gl_texture_object *tObj );
+   /* Called when the texture's color lookup table is changed.
+    * If tObj is NULL then the shared texture palette ctx->Texture.Palette
+    * is to be updated.
     */
 
 
+
+   /***
+    *** Accelerated point, line, polygon, glDrawPixels and glBitmap functions:
+    ***/
+
+   points_func   PointsFunc;
+   line_func     LineFunc;
+   triangle_func TriangleFunc;
+   quad_func     QuadFunc;
+   rect_func     RectFunc;    
+   
+
    /***
     *** Transformation/Rendering functions
     ***/