diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 6cb7593e07d..22a3e737277 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -58,6 +58,7 @@ void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, char *context, int contextnr); void ED_region_header_init(struct ARegion *ar); void ED_region_header(const struct bContext *C, struct ARegion *ar); +void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct); /* spaces */ void ED_spacetypes_init(void); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index ea1541a4e02..320574fe8b3 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -249,7 +249,7 @@ void ED_area_overdraw(bContext *C) } /* get scissor rect, checking overlapping regions */ -static void region_scissor_winrct(ARegion *ar, rcti *winrct) +void region_scissor_winrct(ARegion *ar, rcti *winrct) { *winrct= ar->winrct; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3140ae76d4b..905657910b8 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1092,6 +1092,7 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) { RegionView3D *rv3d= ar->regiondata; struct Base *base = scene->basact; + rcti winrct; /*for 2.43 release, don't use glext and just define the constant. this to avoid possibly breaking platforms before release.*/ @@ -1137,6 +1138,9 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) glDisable(GL_DITHER); + region_scissor_winrct(ar, &winrct); + glScissor(winrct.xmin, winrct.ymin, winrct.xmax - winrct.xmin, winrct.ymax - winrct.ymin); + glClearColor(0.0, 0.0, 0.0, 0.0); if(v3d->zbuf) { glEnable(GL_DEPTH_TEST);