+ case 0:
+ // immediately update the part of the texture, no combining
+ R_UploadPartialTexture(glt, data, x, y, z, width, height, depth);
+ break;
+ case 1:
+ // keep track of the region that is modified, decide later how big the partial update area is
+ if (glt->buffermodified)
+ {
+ glt->modified_mins[0] = min(glt->modified_mins[0], x);
+ glt->modified_mins[1] = min(glt->modified_mins[1], y);
+ glt->modified_mins[2] = min(glt->modified_mins[2], z);
+ glt->modified_maxs[0] = max(glt->modified_maxs[0], x + width);
+ glt->modified_maxs[1] = max(glt->modified_maxs[1], y + height);
+ glt->modified_maxs[2] = max(glt->modified_maxs[2], z + depth);
+ }
+ else
+ {
+ glt->buffermodified = true;
+ glt->modified_mins[0] = x;
+ glt->modified_mins[1] = y;
+ glt->modified_mins[2] = z;
+ glt->modified_maxs[0] = x + width;
+ glt->modified_maxs[1] = y + height;
+ glt->modified_maxs[2] = z + depth;
+ }
+ glt->dirty = true;
+ break;
+ default:
+ case 2:
+ // mark the entire texture as dirty, it will be uploaded later
+ glt->buffermodified = true;
+ glt->modified_mins[0] = 0;
+ glt->modified_mins[1] = 0;
+ glt->modified_mins[2] = 0;
+ glt->modified_maxs[0] = glt->tilewidth;
+ glt->modified_maxs[1] = glt->tileheight;
+ glt->modified_maxs[2] = glt->tiledepth;
+ glt->dirty = true;
+ break;