+ /* Cloudwalk FIXME: Broken shit, disabled for now.
+ // TODO: Optimize this further.
+ if(!gl_nopartialtextureupdates.integer)
+ {
+ // Calculate the modified region, and resize it as it gets bigger.
+ if(!glt->buffermodified)
+ {
+ glt->modified_offset_x = x;
+ glt->modified_offset_y = y;
+ glt->modified_offset_z = z;
+
+ glt->modified_width = width;
+ glt->modified_height = height;
+ glt->modified_depth = depth;
+ }
+ else
+ {
+ if(x < glt->modified_offset_x) glt->modified_offset_x = x;
+ if(y < glt->modified_offset_y) glt->modified_offset_y = y;
+ if(z < glt->modified_offset_z) glt->modified_offset_z = z;
+
+ if(width + x > glt->modified_width) glt->modified_width = width + x;
+ if(height + y > glt->modified_height) glt->modified_height = height + y;
+ if(depth + z > glt->modified_depth) glt->modified_depth = depth + z;
+ }
+
+ if(!&glt->modifiedpixels || &output < &glt->modifiedpixels)
+ glt->modifiedpixels = output;
+ }
+ */
+