diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 17cbb226e7b..603e7023f23 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -937,14 +937,15 @@ static void drawviewborder(void) glEnable(GL_BLEND); glColor4f(0, 0, 0, ca->passepartalpha); - if (x1 > 0.0) { + if (x1 > 0.0) glRectf(0.0, (float)curarea->winy, x1, 0.0); + if (x2 < (float)curarea->winx) glRectf(x2, (float)curarea->winy, (float)curarea->winx, 0.0); - } - if (y1 > 0.0) { + if (y2 < (float)curarea->winy) glRectf(x1, (float)curarea->winy, x2, y2); + if (y2 > 0.0) glRectf(x1, y1, x2, 0.0); - } + glDisable(GL_BLEND); } diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 1fb162465c3..d62fc90ee05 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -699,6 +699,8 @@ void viewmove(int mode) G.vd->camdx += (mvalo[0]-mval[0])/(max); G.vd->camdy += (mvalo[1]-mval[1])/(max); + CLAMP(G.vd->camdx, -1.0f, 1.0f); + CLAMP(G.vd->camdy, -1.0f, 1.0f); } else { window_to_3d(dvec, mval[0]-mvalo[0], mval[1]-mvalo[1]);