diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/butspace.c | 2 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawimasel.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawtext.c | 2 | ||||
-rw-r--r-- | source/blender/src/editscreen.c | 2 | ||||
-rw-r--r-- | source/blender/src/mywindow.c | 13 | ||||
-rw-r--r-- | source/blender/src/space.c | 4 |
7 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c index c5d87cc951e..5488c71d8c7 100644 --- a/source/blender/src/butspace.c +++ b/source/blender/src/butspace.c @@ -455,7 +455,7 @@ void drawbutspace(ScrArea *sa, void *spacedata) sbuts->mainbo= sbuts->mainb; sbuts->tabo= sbuts->tab[sbuts->mainb]; - myortho2(-0.5, (float)(sa->winx)-.05, -0.5, (float)(sa->winy)-0.5); + myortho2(-0.5, (float)(sa->winx)-0.5, -0.5, (float)(sa->winy)-0.5); draw_area_emboss(sa); myortho2(v2d->cur.xmin, v2d->cur.xmax, v2d->cur.ymin, v2d->cur.ymax); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 199ef01fa11..8ce3fcf71c2 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -1068,7 +1068,7 @@ static void render_panel_anim() uiBlockSetCol(block, TH_AUTO); uiDefBut(block, BUT,B_PLAYANIM, "PLAY", 692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)"); - uiDefButS(block, NUM, B_RTCHANGED, "rt:", 790,40,95,33, &G.rt, 0.0, 256.0, 0, 0, "General testing/debug button"); + uiDefButS(block, NUM, B_RTCHANGED, "rt:", 790,40,95,33, &G.rt, -1000.0, 1000.0, 0, 0, "General testing/debug button"); uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 692,10,94,24, &G.scene->r.sfra,1.0,18000.0, 0, 0, "The start frame of the animation"); uiDefButS(block, NUM,REDRAWSEQ,"End:", 790,10,95,24, &G.scene->r.efra,1.0,18000.0, 0, 0, "The end frame of the animation"); diff --git a/source/blender/src/drawimasel.c b/source/blender/src/drawimasel.c index 2e371bcda1f..3c73ca8061e 100644 --- a/source/blender/src/drawimasel.c +++ b/source/blender/src/drawimasel.c @@ -142,7 +142,7 @@ void viewgate(short sx, short sy, short ex, short ey) wx = curarea->winrct.xmin; wy = curarea->winrct.ymin; glViewport(wx+sx, wy+sy, (wx+ex )-(wx+sx)+1, (wy+ey )-(wy+sy)+1); glScissor(wx+sx, wy+sy, (wx+ex )-(wx+sx)+1, (wy+ey )-(wy+sy)+1); - myortho2((float)sx+0.5 , (float)ex+0.5, (float)sy+0.5, (float)ey+0.5); + myortho2((float)sx-0.5 , (float)ex-0.5, (float)sy-0.5, (float)ey-0.5); } void areaview (void) diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 63006bef32e..0a7e1ed15bc 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -552,7 +552,7 @@ void drawtextspace(ScrArea *sa, void *spacedata) BIF_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - myortho2(-0.5, (float)(sa->winx)-.05, -0.5, (float)(sa->winy)-0.5); + myortho2(-0.5, (float)(sa->winx)-0.5, -0.5, (float)(sa->winy)-0.5); draw_area_emboss(sa); diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index cdf542f6dd4..bce1253b354 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -2926,7 +2926,7 @@ void drawscreen(void) ScrArea *sa; mywinset(G.curscreen->mainwin); - myortho2(-0.5, (float)G.curscreen->sizex-0.5, -0.51, (float)G.curscreen->sizey-0.51); + myortho2(-0.5, (float)G.curscreen->sizex-0.5, -0.5, (float)G.curscreen->sizey-0.5); sa= G.curscreen->areabase.first; while(sa) { diff --git a/source/blender/src/mywindow.c b/source/blender/src/mywindow.c index a4a5e8267fc..a9bc8d756d8 100644 --- a/source/blender/src/mywindow.c +++ b/source/blender/src/mywindow.c @@ -97,7 +97,7 @@ void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey) mainwindow.ymax= ory+sizey-1; mainwindow.qevents= NULL; - myortho2(-0.5, (float)sizex-0.5, -0.6, (float)sizey-0.6); + myortho2(-0.5, (float)sizex-0.5, -0.5, (float)sizey-0.5); glLoadIdentity(); glGetFloatv(GL_PROJECTION_MATRIX, (float *)mainwindow.winmat); @@ -427,10 +427,15 @@ void mywinposition(int winid, int xmin, int xmax, int ymin, int ymax) /* watch: void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, float f) { bWindow *bwin= bwin_from_winid(winid); + float offs= 0.125; glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glOrtho(x1, x2, y1, y2, n, f); + // in blender it's always called with -0.5... according to opengl + // manual it should be (-)0.375 for correctness. + + //offs= 0.01*G.rt; + glOrtho(x1+offs, x2+offs, y1+offs, y2+offs, n, f); glGetFloatv(GL_PROJECTION_MATRIX, (float *)bwin->winmat); glMatrixMode(GL_MODELVIEW); @@ -438,9 +443,7 @@ void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, floa void bwin_ortho2(int win, float x1, float x2, float y1, float y2) { - // in blender it's always called with -0.5... according to opengl - // manual it should 0.375 for correctness. added for test - bwin_ortho(win, x1+0.125, x2+0.125, y1+0.125, y2+0.125, -1, 1); + bwin_ortho(win, x1, x2, y1, y2, -1, 1); } void bwin_frustum(int winid, float x1, float x2, float y1, float y2, float n, float f) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index daa18412227..7e73f924f81 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2436,7 +2436,7 @@ void drawinfospace(ScrArea *sa, void *spacedata) uiDrawBlock(block); - myortho2(-0.5, (float)(sa->winx)-.05, -0.5, (float)(sa->winy)-0.5); + myortho2(-0.5, (float)(sa->winx)-0.5, -0.5, (float)(sa->winy)-0.5); draw_area_emboss(sa); myortho2(0.0, 1280.0, 0.0, curarea->winy/fac); sa->win_swap= WIN_BACK_OK; @@ -2537,7 +2537,7 @@ static void changebutspace(ScrArea *sa, void *spacedata) if(G.v2d==0) return; test_view2d(G.v2d, curarea->winx, curarea->winy); - myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin-0.6, G.v2d->cur.ymax+0.6); + myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); } void winqreadbutspace(ScrArea *sa, void *spacedata, BWinEvent *evt) |