success = GL_FALSE;
}
else {
- success = _mesa_convert_texsubimage2d(mesaTexFormat->IntFormat,
+ success = _mesa_convert_texsubimage2d(mesaTexFormat->MesaFormat,
0, 0, /* xoffset, yoffset */
mml->width, mml->height,
mml->width, /* destImageWidth */
_mesa_rescale_teximage2d(texFormat,
width, height, mml->width, mml->height,
tempImage, rescaledImage);
- success = _mesa_convert_texsubimage2d(mesaTexFormat->IntFormat,
+ success = _mesa_convert_texsubimage2d(mesaTexFormat->MesaFormat,
0, 0, /* xoffset, yoffset */
mml->width, mml->height,
mml->width, /* destImageWidth */
FREE(rescaledImage);
}
else {
- success = _mesa_convert_texsubimage2d(mesaTexFormat->IntFormat,
+ success = _mesa_convert_texsubimage2d(mesaTexFormat->MesaFormat,
0, 0, /* xoffset, yoffset */
mml->width, mml->height,
mml->width, /* destImageWidth */
success = GL_FALSE;
}
else {
- success = _mesa_convert_texsubimage2d(texImage->TexFormat->IntFormat,
+ success = _mesa_convert_texsubimage2d(texImage->TexFormat->MesaFormat,
xoffset, yoffset,
width, height,
mml->width,
_mesa_rescale_teximage2d(texImage->TexFormat,
width, height, newWidth, newHeight,
tempImage, rescaledImage);
- success = _mesa_convert_texsubimage2d(texImage->TexFormat->IntFormat,
+ success = _mesa_convert_texsubimage2d(texImage->TexFormat->MesaFormat,
xoffset * wScale, yoffset * hScale,
newWidth, newHeight,
mml->width, /* destImageWidth */
FREE(rescaledImage);
}
else {
- success = _mesa_convert_texsubimage2d(texImage->TexFormat->IntFormat,
- xoffset, yoffset,
- width, height,
- mml->width,
- simpleFormat, CHAN_TYPE,
- &_mesa_native_packing,
- tempImage, texImage->Data);
+ success = _mesa_convert_texsubimage2d(texImage->TexFormat->MesaFormat,
+ xoffset, yoffset,
+ width, height,
+ mml->width,
+ simpleFormat, CHAN_TYPE,
+ &_mesa_native_packing,
+ tempImage, texImage->Data);
}
/* the conversion had better of worked! */
assert(success);
-/* $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
* 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 */
-/* $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
{
ASSERT(img);
img->Format = 0;
+ img->IntFormat = 0;
img->Border = 0;
img->Width = 0;
img->Height = 0;
{
ASSERT(img);
img->Format = _mesa_base_tex_format( ctx, internalFormat );
+ img->IntFormat = internalFormat;
img->Border = border;
img->Width = width;
img->Height = height;
}
}
- 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);