59 width = image->upload_width;
60 height = image->upload_height;
62 if (image->flags & IF_TURBULENT) {
67 b = image->width * image->height;
70 if (image->type == IT_WALL) {
71 image->pixels[0] = R_Malloc(MIPSIZE(b) *
TEX_BYTES);
72 image->pixels[1] = image->pixels[0] + b *
TEX_BYTES;
73 image->pixels[2] = image->pixels[1] + b *
TEX_BYTES / 4;
74 image->pixels[3] = image->pixels[2] + b *
TEX_BYTES / 16;
76 if (!(
r_config.flags & QVF_GAMMARAMP))
79 if (
width == image->width &&
height == image->height) {
83 image->upload_width = image->width;
84 image->upload_height = image->height;
87 IMG_MipMap(image->pixels[1], image->pixels[0], image->width >> 0, image->height >> 0);
88 IMG_MipMap(image->pixels[2], image->pixels[1], image->width >> 1, image->height >> 1);
89 IMG_MipMap(image->pixels[3], image->pixels[2], image->width >> 2, image->height >> 2);
93 image->pixels[0] = pic;
95 if (!(image->flags & IF_OPAQUE)) {
96 for (i = 0; i <
c; i++) {
99 image->flags |= IF_TRANSPARENT;
105 if (image->type == IT_SKIN && !(
r_config.flags & QVF_GAMMARAMP))