summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-05 16:32:23 -0600
committerBrian Paul <[email protected]>2012-06-06 07:55:59 -0600
commit8f5fffe75d2f8ae7c7ee706b53379a25bc673ae4 (patch)
tree03874713de5f5f611a8d6f7569b658a5ce3f9700 /src/mesa/main/dd.h
parent3a62e8bcac75ca296619adb7fe4ea806a98beef9 (diff)
mesa: consolidate internal glTexImage1/2/3D code
The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r--src/mesa/main/dd.h44
1 files changed, 11 insertions, 33 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 582eb5d492b..711143c5594 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -198,43 +198,21 @@ struct dd_function_table {
GLenum srcFormat, GLenum srcType );
/**
- * Called by glTexImage1D(). Simply copy the source texture data into the
- * destination texture memory. The gl_texture_image fields, etc. will be
- * fully initialized.
- * The parameters are the same as glTexImage1D(), plus:
+ * Called by glTexImage[123]D() and glCopyTexImage[12]D()
+ * Allocate texture memory and copy the user's image to the buffer.
+ * The gl_texture_image fields, etc. will be fully initialized.
+ * The parameters are the same as glTexImage3D(), plus:
+ * \param dims 1, 2, or 3 indicating glTexImage1/2/3D()
* \param packing describes how to unpack the source data.
* \param texImage is the destination texture image.
*/
- void (*TexImage1D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
+ void (*TexImage)(struct gl_context *ctx, GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint internalFormat,
+ GLint width, GLint height, GLint depth, GLint border,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing);
- /**
- * Called by glTexImage2D().
- *
- * \sa dd_function_table::TexImage1D.
- */
- void (*TexImage2D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
-
- /**
- * Called by glTexImage3D().
- *
- * \sa dd_function_table::TexImage1D.
- */
- void (*TexImage3D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint depth, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
/**
* Called by glTexSubImage1D(). Replace a subset of the target texture