forked from bartvdbraak/blender
Orange; last commit didnt draw passepartout correctly. Also added a limit,
so you cannot screw up the entire view :)
This commit is contained in:
parent
987a3216c3
commit
406b3ae63b
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user