Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lookdev.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_motion_blur.c12
-rw-r--r--source/blender/draw/engines/external/external_engine.c8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c26
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_mesh.c2
-rw-r--r--source/blender/draw/engines/select/select_engine.c2
7 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index b5ec5ce21a9..7be6fc2d030 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -88,7 +88,7 @@ void EEVEE_lookdev_cache_init(EEVEE_Data *vedata,
rect = &fallback_rect;
}
else {
- rect = ED_region_visible_rect(draw_ctx->ar);
+ rect = ED_region_visible_rect(draw_ctx->region);
}
/* Make the viewport width scale the lookdev spheres a bit.
diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c
index fc5af62d45f..80c38839b71 100644
--- a/source/blender/draw/engines/eevee/eevee_motion_blur.c
+++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c
@@ -48,7 +48,7 @@ static struct {
extern char datatoc_effect_motion_blur_frag_glsl[];
static void eevee_motion_blur_camera_get_matrix_at_time(Scene *scene,
- ARegion *ar,
+ ARegion *region,
RegionView3D *rv3d,
View3D *v3d,
Object *camera,
@@ -83,7 +83,7 @@ static void eevee_motion_blur_camera_get_matrix_at_time(Scene *scene,
if (v3d != NULL) {
BKE_camera_params_from_view3d(&params, draw_ctx->depsgraph, v3d, rv3d);
- BKE_camera_params_compute_viewplane(&params, ar->winx, ar->winy, 1.0f, 1.0f);
+ BKE_camera_params_compute_viewplane(&params, region->winx, region->winy, 1.0f, 1.0f);
}
else {
BKE_camera_params_from_object(&params, &cam_cpy);
@@ -115,7 +115,7 @@ int EEVEE_motion_blur_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
View3D *v3d = draw_ctx->v3d;
RegionView3D *rv3d = draw_ctx->rv3d;
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
if (scene_eval->eevee.flag & SCE_EEVEE_MOTION_BLUR_ENABLED) {
/* Update Motion Blur Matrices */
@@ -151,7 +151,7 @@ int EEVEE_motion_blur_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
/* Current matrix */
if (effects->motion_blur_mat_cached == false) {
eevee_motion_blur_camera_get_matrix_at_time(
- scene, ar, rv3d, v3d, ob_camera_eval, ctime, effects->current_world_to_ndc);
+ scene, region, rv3d, v3d, ob_camera_eval, ctime, effects->current_world_to_ndc);
}
/* Only continue if camera is not being keyed */
@@ -160,12 +160,12 @@ int EEVEE_motion_blur_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
/* Past matrix */
if (effects->motion_blur_mat_cached == false) {
eevee_motion_blur_camera_get_matrix_at_time(
- scene, ar, rv3d, v3d, ob_camera_eval, ctime - delta, effects->past_world_to_ndc);
+ scene, region, rv3d, v3d, ob_camera_eval, ctime - delta, effects->past_world_to_ndc);
#if 0 /* for future high quality blur */
/* Future matrix */
eevee_motion_blur_camera_get_matrix_at_time(
- scene, ar, rv3d, v3d, ob_camera_eval, ctime + delta, effects->future_world_to_ndc);
+ scene, region, rv3d, v3d, ob_camera_eval, ctime + delta, effects->future_world_to_ndc);
#endif
invert_m4_m4(effects->current_ndc_to_world, effects->current_world_to_ndc);
}
diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c
index ac3e5550030..bef49efd3f9 100644
--- a/source/blender/draw/engines/external/external_engine.c
+++ b/source/blender/draw/engines/external/external_engine.c
@@ -100,7 +100,7 @@ static void external_engine_init(void *vedata)
{
EXTERNAL_StorageList *stl = ((EXTERNAL_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
/* Depth prepass */
if (!e_data.depth_sh) {
@@ -117,7 +117,7 @@ static void external_engine_init(void *vedata)
/* Progressive render samples are tagged with no rebuild, in that case we
* can skip updating the depth buffer */
- if (ar && (ar->do_draw & RGN_DRAW_NO_REBUILD)) {
+ if (region && (region->do_draw & RGN_DRAW_NO_REBUILD)) {
stl->g_data->update_depth = false;
}
}
@@ -182,7 +182,7 @@ static void external_draw_scene_do(void *vedata)
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
RegionView3D *rv3d = draw_ctx->rv3d;
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
RenderEngineType *type;
DRW_state_reset_ex(DRW_STATE_DEFAULT & ~DRW_STATE_DEPTH_LESS_EQUAL);
@@ -205,7 +205,7 @@ static void external_draw_scene_do(void *vedata)
/* Rendered draw. */
GPU_matrix_push_projection();
GPU_matrix_push();
- ED_region_pixelspace(ar);
+ ED_region_pixelspace(region);
/* Render result draw. */
type = rv3d->render_engine->type;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 51a63a00c24..a2016b9c1e6 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -379,7 +379,7 @@ GPUBatch *gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
RegionView3D *rv3d = draw_ctx->rv3d;
ToolSettings *ts = scene->toolsettings;
Object *ob = draw_ctx->obact;
@@ -413,13 +413,13 @@ GPUBatch *gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness)
ED_gp_get_drawing_reference(scene, ob, gpl, ts->gpencil_v3d_align, origin);
for (int i = 0; i < totpoints; i++, tpt++) {
- ED_gpencil_tpoint_to_point(ar, origin, tpt, &pt);
+ ED_gpencil_tpoint_to_point(region, origin, tpt, &pt);
ED_gp_project_point_to_plane(scene, ob, rv3d, origin, ts->gp_sculpt.lock_axis - 1, &pt);
/* first point for adjacency (not drawn) */
if (i == 0) {
if (gpd->runtime.sbuffer_sflag & GP_STROKE_CYCLIC && totpoints > 2) {
- ED_gpencil_tpoint_to_point(ar, origin, &points[totpoints - 1], &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, &points[totpoints - 1], &pt2);
gpencil_set_stroke_point(vbo,
&pt2,
idx,
@@ -432,7 +432,7 @@ GPUBatch *gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness)
idx++;
}
else {
- ED_gpencil_tpoint_to_point(ar, origin, &points[1], &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, &points[1], &pt2);
gpencil_set_stroke_point(vbo,
&pt2,
idx,
@@ -455,19 +455,19 @@ GPUBatch *gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness)
/* last adjacency point (not drawn) */
if (gpd->runtime.sbuffer_sflag & GP_STROKE_CYCLIC && totpoints > 2) {
/* draw line to first point to complete the cycle */
- ED_gpencil_tpoint_to_point(ar, origin, &points[0], &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, &points[0], &pt2);
gpencil_set_stroke_point(
vbo, &pt2, idx, pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
idx++;
/* now add adjacency point (not drawn) */
- ED_gpencil_tpoint_to_point(ar, origin, &points[1], &pt3);
+ ED_gpencil_tpoint_to_point(region, origin, &points[1], &pt3);
gpencil_set_stroke_point(
vbo, &pt3, idx, pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
idx++;
}
/* last adjacency point (not drawn) */
else {
- ED_gpencil_tpoint_to_point(ar, origin, &points[totpoints - 2], &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, &points[totpoints - 2], &pt2);
gpencil_set_stroke_point(
vbo, &pt2, idx, pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
idx++;
@@ -481,7 +481,7 @@ GPUBatch *gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
RegionView3D *rv3d = draw_ctx->rv3d;
ToolSettings *ts = scene->toolsettings;
Object *ob = draw_ctx->obact;
@@ -513,7 +513,7 @@ GPUBatch *gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness)
ED_gp_get_drawing_reference(scene, ob, gpl, ts->gpencil_v3d_align, origin);
for (int i = 0; i < totpoints; i++, tpt++) {
- ED_gpencil_tpoint_to_point(ar, origin, tpt, &pt);
+ ED_gpencil_tpoint_to_point(region, origin, tpt, &pt);
ED_gp_project_point_to_plane(scene, ob, rv3d, origin, ts->gp_sculpt.lock_axis - 1, &pt);
/* use previous point to determine stroke direction (drawing path) */
@@ -524,7 +524,7 @@ GPUBatch *gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness)
if (totpoints > 1) {
/* extrapolate a point before first point */
tGPspoint *tpt2 = &points[1];
- ED_gpencil_tpoint_to_point(ar, origin, tpt2, &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, tpt2, &pt2);
ED_gp_project_point_to_plane(scene, ob, rv3d, origin, ts->gp_sculpt.lock_axis - 1, &pt2);
interp_v3_v3v3(ref_pt, &pt2.x, &pt.x, 1.5f);
@@ -535,7 +535,7 @@ GPUBatch *gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness)
}
else {
tGPspoint *tpt2 = &points[i - 1];
- ED_gpencil_tpoint_to_point(ar, origin, tpt2, &pt2);
+ ED_gpencil_tpoint_to_point(region, origin, tpt2, &pt2);
ED_gp_project_point_to_plane(scene, ob, rv3d, origin, ts->gp_sculpt.lock_axis - 1, &pt2);
copy_v3_v3(ref_pt, &pt2.x);
@@ -638,7 +638,7 @@ GPUBatch *gpencil_get_buffer_fill_geom(bGPdata *gpd)
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
- ARegion *ar = draw_ctx->ar;
+ ARegion *region = draw_ctx->region;
ToolSettings *ts = scene->toolsettings;
Object *ob = draw_ctx->obact;
@@ -684,7 +684,7 @@ GPUBatch *gpencil_get_buffer_fill_geom(bGPdata *gpd)
for (int i = 0; i < tot_triangles; i++) {
for (int j = 0; j < 3; j++) {
tpt = &points[tmp_triangles[i][j]];
- ED_gpencil_tpoint_to_point(ar, origin, tpt, &pt);
+ ED_gpencil_tpoint_to_point(region, origin, tpt, &pt);
GPU_vertbuf_attr_set(vbo, pos_id, idx, &pt.x);
GPU_vertbuf_attr_set(vbo, color_id, idx, gpd->runtime.sfill);
idx++;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index fc5f04e658d..96560d986a0 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -739,7 +739,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
bGPdata *gpd_orig = (bGPdata *)DEG_get_original_id(&gpd->id);
if ((draw_ctx->obact == ob) &&
- ((gpd_orig->runtime.ar == NULL) || (gpd_orig->runtime.ar == draw_ctx->ar))) {
+ ((gpd_orig->runtime.ar == NULL) || (gpd_orig->runtime.ar == draw_ctx->region))) {
gpencil_populate_buffer_strokes(&e_data, vedata, ts, ob);
}
diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.c b/source/blender/draw/engines/overlay/overlay_edit_mesh.c
index ee1b606bee5..6c838568260 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_mesh.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.c
@@ -333,7 +333,7 @@ void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob)
if (DRW_state_show_text() && (pd->edit_mesh.flag & OVERLAY_EDIT_TEXT)) {
const DRWContextState *draw_ctx = DRW_context_state_get();
- DRW_text_edit_mesh_measure_stats(draw_ctx->ar, draw_ctx->v3d, ob, &draw_ctx->scene->unit);
+ DRW_text_edit_mesh_measure_stats(draw_ctx->region, draw_ctx->v3d, ob, &draw_ctx->scene->unit);
}
}
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c
index f56482235b3..389133b0d84 100644
--- a/source/blender/draw/engines/select/select_engine.c
+++ b/source/blender/draw/engines/select/select_engine.c
@@ -136,7 +136,7 @@ static void select_engine_init(void *vedata)
DRW_view_viewmat_get(view_default, viewmat, false);
DRW_view_winmat_get(view_default, winmat, false);
projmat_from_subregion(winmat,
- (int[2]){draw_ctx->ar->winx, draw_ctx->ar->winy},
+ (int[2]){draw_ctx->region->winx, draw_ctx->region->winy},
e_data.context.last_rect.xmin,
e_data.context.last_rect.xmax,
e_data.context.last_rect.ymin,