Refactor: Do not keep a copy of depth buffer in RegionView3D
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
This commit is contained in:
@@ -1467,7 +1467,6 @@ static void direct_link_region(BlendDataReader *reader, ARegion *region, int spa
|
||||
BLO_read_data_address(reader, &rv3d->localvd);
|
||||
BLO_read_data_address(reader, &rv3d->clipbb);
|
||||
|
||||
rv3d->depths = NULL;
|
||||
rv3d->render_engine = NULL;
|
||||
rv3d->sms = NULL;
|
||||
rv3d->smooth_timer = NULL;
|
||||
|
Reference in New Issue
Block a user