diff options
author | Gareth Hughes <gareth@valinux.com> | 2001-03-28 21:36:31 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@valinux.com> | 2001-03-28 21:36:31 +0000 |
commit | 16a8e986cebae6560d00992b6b9f54549e1d03c6 (patch) | |
tree | 7cd0d5527effe3b5a15ef5832bd82309ee604133 /src/mesa/main | |
parent | d082417daeb3f8a35a490eb44b6c88463289fa5d (diff) | |
download | external_mesa3d-16a8e986cebae6560d00992b6b9f54549e1d03c6.zip external_mesa3d-16a8e986cebae6560d00992b6b9f54549e1d03c6.tar.gz external_mesa3d-16a8e986cebae6560d00992b6b9f54549e1d03c6.tar.bz2 |
- Restore texImage->IntFormat.
- Fix FX driver texture image conversions.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 6 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6ecb33d..32bf65c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1,4 +1,4 @@ -/* $Id: mtypes.h,v 1.34 2001/03/28 20:40:51 gareth Exp $ */ +/* $Id: mtypes.h,v 1.35 2001/03/28 21:36:31 gareth Exp $ */ /* * Mesa 3-D graphics library @@ -804,6 +804,7 @@ struct gl_texture_image { * GL_INTENSITY, GL_RGB, GL_RGBA, * GL_COLOR_INDEX or GL_DEPTH_COMPONENT only. */ + GLint IntFormat; /* Internal format as given by the user */ GLuint Border; /* 0 or 1 */ GLuint Width; /* = 2^WidthLog2 + 2*Border */ GLuint Height; /* = 2^HeightLog2 + 2*Border */ diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 4f9e276..d14f577 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,4 +1,4 @@ -/* $Id: teximage.c,v 1.88 2001/03/28 20:40:51 gareth Exp $ */ +/* $Id: teximage.c,v 1.89 2001/03/28 21:36:31 gareth Exp $ */ /* * Mesa 3-D graphics library @@ -558,6 +558,7 @@ clear_teximage_fields(struct gl_texture_image *img) { ASSERT(img); img->Format = 0; + img->IntFormat = 0; img->Border = 0; img->Width = 0; img->Height = 0; @@ -587,6 +588,7 @@ init_teximage_fields(GLcontext *ctx, { ASSERT(img); img->Format = _mesa_base_tex_format( ctx, internalFormat ); + img->IntFormat = internalFormat; img->Border = border; img->Width = width; img->Height = height; @@ -872,7 +874,7 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions, } } - if (!is_compressed_format(ctx, destTex->TexFormat->IntFormat) && + if (!is_compressed_format(ctx, destTex->IntFormat) && !_mesa_is_legal_format_and_type(format, type)) { char message[100]; sprintf(message, "glTexSubImage%dD(format or type)", dimensions); diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 5e98965..398e23d 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.40 2001/03/28 20:40:51 gareth Exp $ */ +/* $Id: texstate.c,v 1.41 2001/03/28 21:36:31 gareth Exp $ */ /* * Mesa 3-D graphics library @@ -957,7 +957,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, *params = img->Depth; return; case GL_TEXTURE_INTERNAL_FORMAT: - *params = img->TexFormat->IntFormat; + *params = img->IntFormat; return; case GL_TEXTURE_BORDER: *params = img->Border; |