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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-08-20 23:46:53 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-20 23:46:53 +0400
commit86e38ef6f7d9d1970826b8b5e944b189d0065fd9 (patch)
tree3c64d9cef33965bcab6327a35799aae5b5e36e27
parentc1100361e20ad174aea83160e2072427d12d4fd3 (diff)
2.5 Paint:
* Evil backbuf drawing strikes again. In paint modes, it was causing the tool panel to flash black, bad glScissor.
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
3 files changed, 6 insertions, 1 deletions
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);