/* Must handle special case GL_TEXTURE_CUBE_MAP. */
if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
+ GLint rowStride;
/* Error checking */
if (texObj->NumLayers < 6) {
return;
}
+ rowStride = _mesa_image_image_stride(&ctx->Unpack, width, height,
+ format, type);
/* Copy in each face. */
for (i = 0; i < 6; ++i) {
texImage = texObj->Image[i][level];
level, xoffset, yoffset, zoffset,
width, height, 1, format,
type, pixels, true);
- pixels += _mesa_image_image_stride(&ctx->Unpack, width, height,
- format, type);
+ pixels = (GLubyte *) pixels + rowStride;
}
}
else {