+ (winX + px);
for (row = 0; row < height; row++) {
- const GLubyte *src = (const GLubyte *) gl_pixel_addr_in_image( finalUnpack,
+ const GLubyte *src = (const GLubyte *) _mesa_image_address( finalUnpack,
bitmap, width, height, GL_COLOR_INDEX, GL_BITMAP, 0, row, 0 );
if (finalUnpack->LsbFirst) {
/* least significan bit first */
-/* $Id: colortab.c,v 1.9 2000/02/28 20:38:37 brianp Exp $ */
+/* $Id: colortab.c,v 1.10 2000/03/21 01:03:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
assert(palette);
- if (!gl_is_legal_format_and_type(format, type)) {
+ if (!_mesa_is_legal_format_and_type(format, type)) {
gl_error(ctx, GL_INVALID_ENUM, "glColorTable(format or type)");
return;
}
assert(palette);
- if (!gl_is_legal_format_and_type(format, type)) {
+ if (!_mesa_is_legal_format_and_type(format, type)) {
gl_error(ctx, GL_INVALID_ENUM, "glColorSubTable(format or type)");
return;
}
return;
}
- comps = gl_components_in_format(format);
+ comps = _mesa_components_in_format(format);
assert(comps > 0); /* error should be caught sooner */
if (start + count > palette->Size) {
return;
}
- gl_pack_rgba_span(ctx, palette->Size, (const GLubyte (*)[]) rgba,
- format, type, table, &ctx->Pack, GL_FALSE);
+ _mesa_pack_rgba_span(ctx, palette->Size, (const GLubyte (*)[]) rgba,
+ format, type, table, &ctx->Pack, GL_FALSE);
(void) format;
(void) type;
-/* $Id: drawpix.c,v 1.14 2000/03/03 17:54:56 brianp Exp $ */
+/* $Id: drawpix.c,v 1.15 2000/03/21 01:03:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
*/
for (row = 0; row < height; row++, y++) {
GLuint indexes[MAX_WIDTH];
- const GLvoid *source = gl_pixel_addr_in_image(&ctx->Unpack,
+ const GLvoid *source = _mesa_image_address(&ctx->Unpack,
pixels, width, height, GL_COLOR_INDEX, type, 0, row, 0);
_mesa_unpack_index_span(ctx, drawWidth, GL_UNSIGNED_INT, indexes,
type, source, &ctx->Unpack, GL_TRUE);
GLstencil values[MAX_WIDTH];
GLenum destType = (sizeof(GLstencil) == sizeof(GLubyte))
? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT;
- const GLvoid *source = gl_pixel_addr_in_image(&ctx->Unpack,
+ const GLvoid *source = _mesa_image_address(&ctx->Unpack,
pixels, width, height, GL_COLOR_INDEX, type, 0, row, 0);
_mesa_unpack_index_span(ctx, drawWidth, destType, values,
type, source, &ctx->Unpack, GL_TRUE);
GLint row;
for (row = 0; row < height; row++, y++) {
GLdepth zspan[MAX_WIDTH];
- const GLushort *zptr = gl_pixel_addr_in_image(&ctx->Unpack,
+ const GLushort *zptr = _mesa_image_address(&ctx->Unpack,
pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
GLint i;
for (i = 0; i < width; i++)
/* Special case: directly write 32-bit depth values */
GLint row;
for (row = 0; row < height; row++, y++) {
- const GLuint *zptr = gl_pixel_addr_in_image(&ctx->Unpack,
+ const GLuint *zptr = _mesa_image_address(&ctx->Unpack,
pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
gl_write_rgba_span( ctx, width, x, y, zptr, rgba, GL_BITMAP );
}
GLint row;
for (row = 0; row < height; row++, y++) {
GLdepth zspan[MAX_WIDTH];
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack,
pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
_mesa_unpack_depth_span( ctx, drawWidth, zspan, type, src,
&ctx->Unpack, GL_TRUE );
if (width > MAX_WIDTH)
width = MAX_WIDTH;
for (row = 0; row < height; row++, y++) {
- const GLvoid *source = gl_pixel_addr_in_image(unpack,
+ const GLvoid *source = _mesa_image_address(unpack,
pixels, width, height, format, type, 0, row, 0);
_mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA, (void*) rgba,
format, type, source, unpack, GL_TRUE);
-/* $Id: image.c,v 1.21 2000/03/21 00:48:53 brianp Exp $ */
+/* $Id: image.c,v 1.22 2000/03/21 01:03:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
/*
* Flip the 8 bits in each byte of the given array.
*/
-void gl_flip_bytes( GLubyte *p, GLuint n )
+static void
+flip_bytes( GLubyte *p, GLuint n )
{
register GLuint i, a, b;
/*
* Flip the order of the 2 bytes in each word in the given array.
*/
-void gl_swap2( GLushort *p, GLuint n )
+void
+_mesa_swap2( GLushort *p, GLuint n )
{
register GLuint i;
/*
* Flip the order of the 4 bytes in each word in the given array.
*/
-void gl_swap4( GLuint *p, GLuint n )
+void
+_mesa_swap4( GLuint *p, GLuint n )
{
register GLuint i, a, b;
* Return 0 if GL_BITMAP.
* Return -1 if invalid type enum.
*/
-GLint gl_sizeof_type( GLenum type )
+GLint _mesa_sizeof_type( GLenum type )
{
switch (type) {
case GL_BITMAP:
/*
- * Same as gl_sizeof_packed_type() but we also accept the
+ * Same as _mesa_sizeof_packed_type() but we also accept the
* packed pixel format datatypes.
*/
-GLint gl_sizeof_packed_type( GLenum type )
+GLint _mesa_sizeof_packed_type( GLenum type )
{
switch (type) {
case GL_BITMAP:
* Return the number of components in a GL enum pixel type.
* Return -1 if bad format.
*/
-GLint gl_components_in_format( GLenum format )
+GLint _mesa_components_in_format( GLenum format )
{
switch (format) {
case GL_COLOR_INDEX:
* Return bytes per pixel for given format and type
* Return -1 if bad format or type.
*/
-GLint gl_bytes_per_pixel( GLenum format, GLenum type )
+GLint _mesa_bytes_per_pixel( GLenum format, GLenum type )
{
- GLint comps = gl_components_in_format( format );
+ GLint comps = _mesa_components_in_format( format );
if (comps < 0)
return -1;
* Test if the given pixel format and type are legal.
* Return GL_TRUE for legal, GL_FALSE for illegal.
*/
-GLboolean gl_is_legal_format_and_type( GLenum format, GLenum type )
+GLboolean
+_mesa_is_legal_format_and_type( GLenum format, GLenum type )
{
switch (format) {
case GL_COLOR_INDEX:
* row, column - location of pixel in the image
* Return: address of pixel at (image,row,column) in image or NULL if error.
*/
-GLvoid *gl_pixel_addr_in_image( const struct gl_pixelstore_attrib *packing,
- const GLvoid *image, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- GLint img, GLint row, GLint column )
+GLvoid *
+_mesa_image_address( const struct gl_pixelstore_attrib *packing,
+ const GLvoid *image, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ GLint img, GLint row, GLint column )
{
GLint alignment; /* 1, 2 or 4 */
GLint pixels_per_row;
GLint bytes_per_image;
/* Compute bytes per component */
- bytes_per_comp = gl_sizeof_packed_type( type );
+ bytes_per_comp = _mesa_sizeof_packed_type( type );
if (bytes_per_comp<0) {
return NULL;
}
/* Compute number of components per pixel */
- comp_per_pixel = gl_components_in_format( format );
+ comp_per_pixel = _mesa_components_in_format( format );
if (comp_per_pixel<0 && type != GL_BITMAP) {
return NULL;
}
/* Non-BITMAP data */
GLint bytes_per_pixel, bytes_per_row, remainder, bytes_per_image;
- bytes_per_pixel = gl_bytes_per_pixel( format, type );
+ bytes_per_pixel = _mesa_bytes_per_pixel( format, type );
/* The pixel type and format should have been error checked earlier */
assert(bytes_per_pixel > 0);
}
else {
/* Non-BITMAP data */
- const GLint bytesPerPixel = gl_bytes_per_pixel(format, type);
+ const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
if (bytesPerPixel <= 0)
return -1; /* error */
if (packing->RowLength == 0) {
* packing - pixel packing parameters
* applyTransferOps - apply scale/bias/lookup-table ops?
*/
-void gl_pack_rgba_span( const GLcontext *ctx,
- GLuint n, CONST GLubyte rgba[][4],
- GLenum format, GLenum type, GLvoid *destination,
- const struct gl_pixelstore_attrib *packing,
- GLboolean applyTransferOps )
+void
+_mesa_pack_rgba_span( const GLcontext *ctx,
+ GLuint n, CONST GLubyte rgba[][4],
+ GLenum format, GLenum type, GLvoid *destination,
+ const struct gl_pixelstore_attrib *packing,
+ GLboolean applyTransferOps )
{
applyTransferOps &= (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag);
const GLfloat gscale = 1.0F / 255.0F;
const GLfloat bscale = 1.0F / 255.0F;
const GLfloat ascale = 1.0F / 255.0F;
- const GLint comps = gl_components_in_format(format);
+ const GLint comps = _mesa_components_in_format(format);
GLuint i;
assert(n <= MAX_WIDTH);
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
if (packing->SwapBytes) {
- gl_swap2( (GLushort *) dst, n * comps);
+ _mesa_swap2( (GLushort *) dst, n * comps);
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
if (packing->SwapBytes) {
- gl_swap2( (GLushort *) dst, n * comps );
+ _mesa_swap2( (GLushort *) dst, n * comps );
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
if (packing->SwapBytes) {
- gl_swap4( (GLuint *) dst, n * comps );
+ _mesa_swap4( (GLuint *) dst, n * comps );
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
if (packing->SwapBytes) {
- gl_swap4( (GLuint *) dst, n * comps );
+ _mesa_swap4( (GLuint *) dst, n * comps );
}
}
break;
}
break;
default:
- gl_problem(ctx, "bad format in gl_pack_rgba_span\n");
+ gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
}
if (packing->SwapBytes) {
- gl_swap4( (GLuint *) dst, n * comps );
+ _mesa_swap4( (GLuint *) dst, n * comps );
}
}
break;
}
break;
default:
- gl_problem( ctx, "bad type in gl_pack_rgba_span" );
+ gl_problem( ctx, "bad type in _mesa_pack_rgba_span" );
}
}
}
}
}
else if (dstFormat == srcFormat) {
- GLint comps = gl_components_in_format(srcFormat);
+ GLint comps = _mesa_components_in_format(srcFormat);
assert(comps > 0);
MEMCPY( dest, source, n * comps * sizeof(GLubyte) );
return;
GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
GLint dstLuminanceIndex, dstIntensityIndex;
- dstComponents = gl_components_in_format( dstFormat );
+ dstComponents = _mesa_components_in_format( dstFormat );
/* source & dest image formats should have been error checked by now */
assert(dstComponents > 0);
compsPerRow = 0;
}
else {
- const GLint bytesPerPixel = gl_bytes_per_pixel(format, type);
- const GLint components = gl_components_in_format(format);
+ const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
+ const GLint components = _mesa_components_in_format(format);
GLint bytesPerComp;
if (bytesPerPixel <= 0 || components <= 0)
return NULL; /* bad format or type. generate error later */
dst = destBuffer;
for (img = 0; img < depth; img++) {
for (row = 0; row < height; row++) {
- const GLvoid *src = gl_pixel_addr_in_image(unpack, pixels,
+ const GLvoid *src = _mesa_image_address(unpack, pixels,
width, height, format, type, img, row, 0);
MEMCPY(dst, src, bytesPerRow);
/* byte flipping/swapping */
if (flipBytes) {
- gl_flip_bytes((GLubyte *) dst, bytesPerRow);
+ flip_bytes((GLubyte *) dst, bytesPerRow);
}
else if (swap2) {
- gl_swap2((GLushort*) dst, compsPerRow);
+ _mesa_swap2((GLushort*) dst, compsPerRow);
}
else if (swap4) {
- gl_swap4((GLuint*) dst, compsPerRow);
+ _mesa_swap4((GLuint*) dst, compsPerRow);
}
dst += bytesPerRow;
}
width_in_bytes = CEILING( width, 8 );
dst = buffer;
for (row = 0; row < height; row++) {
- GLubyte *src = gl_pixel_addr_in_image( packing, pixels, width, height,
- GL_COLOR_INDEX, GL_BITMAP,
- 0, row, 0 );
+ GLubyte *src = _mesa_image_address( packing, pixels, width, height,
+ GL_COLOR_INDEX, GL_BITMAP,
+ 0, row, 0 );
if (!src) {
FREE(buffer);
return NULL;
if (packing->SkipPixels == 0) {
MEMCPY( dst, src, width_in_bytes );
if (packing->LsbFirst) {
- gl_flip_bytes( dst, width_in_bytes );
+ flip_bytes( dst, width_in_bytes );
}
}
else {
width_in_bytes = CEILING( width, 8 );
src = source;
for (row = 0; row < height; row++) {
- GLubyte *dst = gl_pixel_addr_in_image( packing, dest, width, height,
- GL_COLOR_INDEX, GL_BITMAP,
- 0, row, 0 );
+ GLubyte *dst = _mesa_image_address( packing, dest, width, height,
+ GL_COLOR_INDEX, GL_BITMAP,
+ 0, row, 0 );
if (!dst)
return;
if (packing->SkipPixels == 0) {
MEMCPY( dst, src, width_in_bytes );
if (packing->LsbFirst) {
- gl_flip_bytes( dst, width_in_bytes );
+ flip_bytes( dst, width_in_bytes );
}
}
else {
-/* $Id: image.h,v 1.5 2000/03/21 00:48:53 brianp Exp $ */
+/* $Id: image.h,v 1.6 2000/03/21 01:03:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
extern struct gl_pixelstore_attrib _mesa_native_packing;
-extern void gl_flip_bytes( GLubyte *p, GLuint n );
-
-
-extern void gl_swap2( GLushort *p, GLuint n );
-
-extern void gl_swap4( GLuint *p, GLuint n );
+extern void
+_mesa_swap2( GLushort *p, GLuint n );
+extern void
+_mesa_swap4( GLuint *p, GLuint n );
-extern GLint gl_sizeof_type( GLenum type );
+extern GLint
+_mesa_sizeof_type( GLenum type );
-extern GLint gl_sizeof_packed_type( GLenum type );
+extern GLint
+_mesa_sizeof_packed_type( GLenum type );
-extern GLint gl_components_in_format( GLenum format );
+extern GLint
+_mesa_components_in_format( GLenum format );
-extern GLint gl_bytes_per_pixel( GLenum format, GLenum type );
+extern GLint
+_mesa_bytes_per_pixel( GLenum format, GLenum type );
-extern GLboolean gl_is_legal_format_and_type( GLenum format, GLenum type );
+extern GLboolean
+_mesa_is_legal_format_and_type( GLenum format, GLenum type );
extern GLvoid *
-gl_pixel_addr_in_image( const struct gl_pixelstore_attrib *packing,
- const GLvoid *image, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- GLint img, GLint row, GLint column );
+_mesa_image_address( const struct gl_pixelstore_attrib *packing,
+ const GLvoid *image, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ GLint img, GLint row, GLint column );
extern GLint
extern void
-gl_pack_rgba_span( const GLcontext *ctx,
- GLuint n, CONST GLubyte rgba[][4],
- GLenum format, GLenum type, GLvoid *dest,
- const struct gl_pixelstore_attrib *packing,
- GLboolean applyTransferOps );
+_mesa_pack_rgba_span( const GLcontext *ctx,
+ GLuint n, CONST GLubyte rgba[][4],
+ GLenum format, GLenum type, GLvoid *dest,
+ const struct gl_pixelstore_attrib *packing,
+ GLboolean applyTransferOps );
extern void
-/* $Id: teximage.c,v 1.22 2000/03/21 00:49:33 brianp Exp $ */
+/* $Id: teximage.c,v 1.23 2000/03/21 01:03:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
/* This will cover the common GL_RGB, GL_RGBA, GL_ALPHA,
* GL_LUMINANCE_ALPHA, etc. texture formats.
*/
- const GLubyte *src = (const GLubyte *) gl_pixel_addr_in_image(
+ const GLubyte *src = (const GLubyte *) _mesa_image_address(
unpacking, pixels, width, height, srcFormat, srcType, 0, 0, 0);
const GLint srcStride = _mesa_image_row_stride(unpacking, width,
srcFormat, srcType);
}
else if (srcFormat == GL_RGBA && internalFormat == GL_RGB) {
/* commonly used by Quake */
- const GLubyte *src = (const GLubyte *) gl_pixel_addr_in_image(
+ const GLubyte *src = (const GLubyte *) _mesa_image_address(
unpacking, pixels, width, height, srcFormat, srcType, 0, 0, 0);
const GLint srcStride = _mesa_image_row_stride(unpacking, width,
srcFormat, srcType);
GLint img, row;
for (img = 0; img < depth; img++) {
for (row = 0; row < height; row++) {
- const GLvoid *source = gl_pixel_addr_in_image(unpacking,
+ const GLvoid *source = _mesa_image_address(unpacking,
pixels, width, height, srcFormat, srcType, img, row, 0);
_mesa_unpack_index_span(ctx, width, dstType, dest,
srcType, source, unpacking, GL_TRUE);
GLint img, row;
for (img = 0; img < depth; img++) {
for (row = 0; row < height; row++) {
- const GLvoid *source = gl_pixel_addr_in_image(unpacking,
+ const GLvoid *source = _mesa_image_address(unpacking,
pixels, width, height, srcFormat, srcType, img, row, 0);
_mesa_unpack_ubyte_color_span(ctx, width, dstFormat, dest,
srcFormat, srcType, source, unpacking, GL_TRUE);
return GL_TRUE;
}
- if (!gl_is_legal_format_and_type( format, type )) {
+ if (!_mesa_is_legal_format_and_type( format, type )) {
/* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there
* is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4.
*/
}
}
- if (!gl_is_legal_format_and_type(format, type)) {
+ if (!_mesa_is_legal_format_and_type(format, type)) {
char message[100];
sprintf(message, "glTexSubImage%dD(format or type)", dimensions);
gl_error(ctx, GL_INVALID_ENUM, message);
assert(destComponents > 0);
numPixels = texImage->Width * texImage->Height * texImage->Depth;
assert(numPixels > 0);
- srcBytesPerTexel = gl_bytes_per_pixel(imgFormat, imgType);
+ srcBytesPerTexel = _mesa_bytes_per_pixel(imgFormat, imgType);
assert(srcBytesPerTexel > 0);
if (!texImage->Data) {
return;
}
- if (gl_sizeof_type(type) <= 0) {
+ if (_mesa_sizeof_type(type) <= 0) {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" );
return;
}
- if (gl_components_in_format(format) <= 0) {
+ if (_mesa_components_in_format(format) <= 0) {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" );
return;
}
for (row = 0; row < height; row++) {
/* compute destination address in client memory */
- GLvoid *dest = gl_pixel_addr_in_image( &ctx->Unpack, pixels,
+ GLvoid *dest = _mesa_image_address( &ctx->Unpack, pixels,
width, height,
format, type, 0, row, 0);
assert(dest);
if (texImage->Format == GL_RGBA) {
const GLubyte *src = texImage->Data + row * width * 4 * sizeof(GLubyte);
- gl_pack_rgba_span( ctx, width, (CONST GLubyte (*)[4]) src,
- format, type, dest,
- &ctx->Pack, GL_TRUE );
+ _mesa_pack_rgba_span( ctx, width, (CONST GLubyte (*)[4]) src,
+ format, type, dest, &ctx->Pack, GL_TRUE );
}
else {
/* fetch RGBA row from texture image then pack it in client mem */
default:
gl_problem( ctx, "bad format in gl_GetTexImage" );
}
- gl_pack_rgba_span( ctx, width, (const GLubyte (*)[4])rgba,
- format, type, dest, &ctx->Pack, GL_TRUE );
+ _mesa_pack_rgba_span( ctx, width, (const GLubyte (*)[4])rgba,
+ format, type, dest, &ctx->Pack, GL_TRUE );
}
}
GLubyte *dst = destTex->Data + xoffsetb * texComponents;
if (texFormat == GL_COLOR_INDEX) {
/* color index texture */
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, 1, format, type, 0, 0, 0);
_mesa_unpack_index_span(ctx, width, GL_UNSIGNED_BYTE, dst,
type, src, &ctx->Unpack, GL_TRUE);
}
else {
/* color texture */
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, 1, format, type, 0, 0, 0);
_mesa_unpack_ubyte_color_span(ctx, width, texFormat, dst,
format, type, src, &ctx->Unpack, GL_TRUE);
const GLint stride = destTex->Width * sizeof(GLubyte);
GLint row;
for (row = 0; row < height; row++) {
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, height, format, type, 0, row, 0);
_mesa_unpack_index_span(ctx, width, GL_UNSIGNED_BYTE, dst,
type, src, &ctx->Unpack, GL_TRUE);
const GLint stride = destTex->Width * texComponents * sizeof(GLubyte);
GLint row;
for (row = 0; row < height; row++) {
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, height, format, type, 0, row, 0);
_mesa_unpack_ubyte_color_span(ctx, width, texFormat, dst,
format, type, src, &ctx->Unpack, GL_TRUE);
GLint img, row;
for (img = 0; img < depth; img++) {
for (row = 0; row < height; row++) {
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, height, format, type, img, row, 0);
_mesa_unpack_index_span(ctx, width, GL_UNSIGNED_BYTE, dst,
type, src, &ctx->Unpack, GL_TRUE);
GLint img, row;
for (img = 0; img < depth; img++) {
for (row = 0; row < height; row++) {
- const GLvoid *src = gl_pixel_addr_in_image(&ctx->Unpack, pixels,
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, pixels,
width, height, format, type, img, row, 0);
_mesa_unpack_ubyte_color_span(ctx, width, texFormat, dst,
format, type, src, &ctx->Unpack, GL_TRUE);