diff options
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index cc6fe4e9ebd..841600d7262 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2443,7 +2443,7 @@ void node_rename_but(char *s) #endif -void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) +void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) { if((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) { @@ -2453,12 +2453,12 @@ void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) float x, y; /* somehow the offset has to be calculated inverse */ - //glaDefine2DArea(&sa->winrct); + glaDefine2DArea(&ar->winrct); /* ortho at pixel level curarea */ - //myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375); + wmOrtho2(-0.375, ar->winx-0.375, -0.375, ar->winy-0.375); - x = (sa->winx-ibuf->x)/2 + snode->xof; - y = (sa->winy-ibuf->y)/2 + snode->yof; + x = (ar->winx-ibuf->x)/2 + snode->xof; + y = (ar->winy-ibuf->y)/2 + snode->yof; if(ibuf->rect) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); @@ -2466,9 +2466,8 @@ void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float); /* sort this out, this should not be needed */ - //myortho2(snode->v2d.cur.xmin, snode->v2d.cur.xmax, snode->v2d.cur.ymin, snode->v2d.cur.ymax); - //bwin_clear_viewmat(sa->win); /* clear buttons view */ - // glLoadIdentity(); + wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax); + glLoadIdentity(); } } } |