diff options
author | Brian Paul <[email protected]> | 2004-04-22 00:27:31 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-04-22 00:27:31 +0000 |
commit | f959f6e1dc27c71fc0ccc56e09b29101b3bf3b97 (patch) | |
tree | 15b4171c2b3396e3a05f2776cc24d90cb37c8f84 /src/mesa/main/texstore.h | |
parent | 05a6f2fd484bab59c6e6a381f58808adc26619f1 (diff) |
New glTexImage code.
The gl_texture_format struct now has a StoreTexImageFunc that's called
by glTex[Sub]Image[123]D to convert the user's texture data into the
specific texture format layout. Now it's much easier to add new texture
formats (like the 16/32-bit floating point formats).
The texutil.[ch] and texutil_tmp.h files are obsolete.
Diffstat (limited to 'src/mesa/main/texstore.h')
-rw-r--r-- | src/mesa/main/texstore.h | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h index 72da2a08f96..8ba8101c481 100644 --- a/src/mesa/main/texstore.h +++ b/src/mesa/main/texstore.h @@ -1,15 +1,8 @@ -/** - * \file texstore.h - * Texture image storage. - * - * \author Brian Paul - */ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -30,12 +23,55 @@ */ +/** + * \file texstore.h + * Texture image storage routines. + * + * \author Brian Paul + */ + + #ifndef TEXSTORE_H #define TEXSTORE_H #include "mtypes.h" +/*** NEWTEXSTORE ***/ + +/* Macro just to save some typing */ +#define STORE_PARAMS \ + GLcontext *ctx, GLuint dims, \ + GLenum baseInternalFormat, \ + const struct gl_texture_format *dstFormat, \ + GLvoid *dstAddr, \ + GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \ + GLint dstRowStride, GLint dstImageStride, \ + GLint srcWidth, GLint srcHeight, GLint srcDepth, \ + GLenum srcFormat, GLenum srcType, \ + const GLvoid *srcAddr, \ + const struct gl_pixelstore_attrib *srcPacking + + +extern GLboolean _mesa_texstore_rgba(STORE_PARAMS); +extern GLboolean _mesa_texstore_color_index(STORE_PARAMS); +extern GLboolean _mesa_texstore_depth_component16(STORE_PARAMS); +extern GLboolean _mesa_texstore_depth_component_float32(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgb565(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgba8888(STORE_PARAMS); +extern GLboolean _mesa_texstore_argb8888(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgb888(STORE_PARAMS); +extern GLboolean _mesa_texstore_argb4444(STORE_PARAMS); +extern GLboolean _mesa_texstore_argb1555(STORE_PARAMS); +extern GLboolean _mesa_texstore_al88(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgb332(STORE_PARAMS); +extern GLboolean _mesa_texstore_a8(STORE_PARAMS); +extern GLboolean _mesa_texstore_ci8(STORE_PARAMS); +extern GLboolean _mesa_texstore_ycbcr(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgba_float32(STORE_PARAMS); +extern GLboolean _mesa_texstore_rgba_float16(STORE_PARAMS); + +#if !NEWTEXSTORE extern void _mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, @@ -49,6 +85,8 @@ _mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, const GLvoid *srcAddr, const struct gl_pixelstore_attrib *srcPacking); +#endif /* NEWTEXSTORE */ + extern void _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, |