fix GL_BACK color material bug
[mesa.git] / src / mesa / main / dd.h
index 36acfb17051fe6839c83e0deb29bc19312409799..ad389df4a5d6da5e688e522c99fc754352c6f218 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: dd.h,v 1.23 2000/03/23 16:22:36 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -626,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
@@ -640,6 +640,75 @@ struct dd_function_table {
     * Core Mesa will perform any image format/type conversions that are needed.
     */
 
+   GLboolean (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
+                                      GLint level, const GLvoid *data,
+                                      struct gl_texture_object *texObj,
+                                      struct gl_texture_image *texImage,
+                                      GLboolean *retainInternalCopy);
+   GLboolean (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
+                                      GLint level, const GLvoid *data,
+                                      struct gl_texture_object *texObj,
+                                      struct gl_texture_image *texImage,
+                                      GLboolean *retainInternalCopy);
+   GLboolean (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
+                                      GLint level, const GLvoid *data,
+                                      struct gl_texture_object *texObj,
+                                      struct gl_texture_image *texImage,
+                                      GLboolean *retainInternalCopy);
+   /* Called by glCompressedTexImage1/2/3D.
+    * Arguments:
+    *   <target>, <level>, <internalFormat>, <data> are user specified.
+    *   <texObj> is the target texture object.
+    *   <texImage> is the target texture image.  It will have the texture
+    *      width, height, depth, border and internalFormat information.
+    *   <retainInternalCopy> is returned by this function and indicates whether
+    *      core Mesa should keep an internal copy of the texture image.
+    * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
+    * should do the job.
+    */
+
+   GLboolean (*CompressedTexSubImage1D)( GLcontext *ctx, GLenum target,
+                                         GLint level, GLint xoffset,
+                                         GLsizei width, GLenum format,
+                                         GLsizei imageSize, const GLvoid *data,
+                                         struct gl_texture_object *texObj,
+                                         struct gl_texture_image *texImage );
+   GLboolean (*CompressedTexSubImage2D)( GLcontext *ctx, GLenum target,
+                                         GLint level, GLint xoffset,
+                                         GLint yoffset, GLsizei width,
+                                         GLint height, GLenum format,
+                                         GLsizei imageSize, const GLvoid *data,
+                                         struct gl_texture_object *texObj,
+                                         struct gl_texture_image *texImage );
+   GLboolean (*CompressedTexSubImage3D)( GLcontext *ctx, GLenum target,
+                                         GLint level, GLint xoffset,
+                                         GLint yoffset, GLint zoffset,
+                                         GLsizei width, GLint height,
+                                         GLint depth, GLenum format,
+                                         GLsizei imageSize, const GLvoid *data,
+                                         struct gl_texture_object *texObj,
+                                         struct gl_texture_image *texImage );
+   /* Called by glCompressedTexSubImage1/2/3D.
+    * Arguments:
+    *   <target>, <level>, <x/z/zoffset>, <width>, <height>, <depth>,
+    *      <imageSize>, and <data> are user specified.
+    *   <texObj> is the target texture object.
+    *   <texImage> is the target texture image.  It will have the texture
+    *      width, height, depth, border and internalFormat information.
+    * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
+    * should do the job.
+    */
+
+   void (*GetCompressedTexImage)( GLcontext *ctx, GLenum target,
+                                  GLint lod, void *image,
+                                  const struct gl_texture_object *texObj,
+                                  struct gl_texture_image *texImage );
+   /* Called by glGetCompressedTexImageARB.
+    * <target>, <lod>, <image> are specified by user.
+    * <texObj> is the source texture object.
+    * <texImage> is the source texture image.
+    */
+
    void (*TexEnv)( GLcontext *ctx, GLenum target, GLenum pname,
                    const GLfloat *param );
    /* Called by glTexEnv*().