Cleanup: improve 'view3d_opengl_read_Z_pixels' comment
The comment implies that the operation is slow because it creates and destroys a framebuffer. Actually the slowness comes from forcing CPU-GPU synchronization.
This commit is contained in:
@@ -2219,8 +2219,8 @@ static void validate_object_select_id(Depsgraph *depsgraph,
|
||||
v3d->runtime.flag |= V3D_RUNTIME_DEPTHBUF_OVERRIDDEN;
|
||||
}
|
||||
|
||||
/* TODO: Creating, attaching texture, and destroying a framebuffer is quite slow.
|
||||
* Calling this function should be avoided during interactive drawing. */
|
||||
/* Avoid calling this function multiple times in sequence to prevent frequent CPU-GPU
|
||||
* synchronization (which can be very slow). */
|
||||
static void view3d_opengl_read_Z_pixels(GPUViewport *viewport, rcti *rect, void *data)
|
||||
{
|
||||
GPUTexture *depth_tx = GPU_viewport_depth_texture(viewport);
|
||||
|
||||
Reference in New Issue
Block a user