Cleanup: remove unnecessary 'use_opengl_context' parameter

The argument passed is always false.
This commit is contained in:
Germano Cavalcante 2022-01-11 10:28:32 -03:00 committed by Philipp Oeser
parent 9d6680e7f9
commit edc85e182e
Notes: blender-bot 2023-02-14 00:20:19 +01:00
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 3 additions and 13 deletions

View File

@ -2565,18 +2565,13 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph,
ARegion *region,
View3D *v3d,
GPUViewport *viewport,
const bool use_opengl_context)
GPUViewport *viewport)
{
Scene *scene = DEG_get_evaluated_scene(depsgraph);
RenderEngineType *engine_type = ED_view3d_engine_type(scene, v3d->shading.type);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
RegionView3D *rv3d = region->regiondata;
if (use_opengl_context) {
DRW_opengl_context_enable();
}
DST.options.is_depth = true;
/* Instead of 'DRW_context_state_init(C, &DST.draw_ctx)', assign from args */
@ -2658,11 +2653,6 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph,
drw_engines_disable();
drw_manager_exit(&DST);
/* Changing context. */
if (use_opengl_context) {
DRW_opengl_context_disable();
}
}
/**
@ -2692,7 +2682,7 @@ void DRW_draw_depth_loop(struct Depsgraph *depsgraph,
}
}
drw_draw_depth_loop_impl(depsgraph, region, v3d, viewport, false);
drw_draw_depth_loop_impl(depsgraph, region, v3d, viewport);
}
/**
@ -2713,7 +2703,7 @@ void DRW_draw_depth_loop_gpencil(struct Depsgraph *depsgraph,
use_drw_engine(&draw_engine_gpencil_type);
drw_draw_depth_loop_impl(depsgraph, region, v3d, viewport, false);
drw_draw_depth_loop_impl(depsgraph, region, v3d, viewport);
}
void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect)