diff options
author | Ton Roosendaal <ton@blender.org> | 2009-05-20 15:07:34 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-05-20 15:07:34 +0400 |
commit | 56b726917d35ac51c86c3fd10580ac740124494d (patch) | |
tree | 6dc587f893424789800101c84d460b1f35f54fc2 /source/blender/editors/space_node | |
parent | f1286b15a3ce11c1b85b7d387fb7f3e1a243bff5 (diff) |
2.5
Fix: Node Editor backdrop drawing messed up viewport, making drawing of
UI elements not pixel accurate anymore.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 9c2cf5dc5dd..cfbb03b9865 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2440,6 +2440,9 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); if(ibuf) { float x, y; + + wmPushMatrix(); + /* somehow the offset has to be calculated inverse */ glaDefine2DArea(&ar->winrct); @@ -2454,9 +2457,7 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) else if(ibuf->channels==4) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float); - /* sort this out, this should not be needed */ - wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax); - glLoadIdentity(); + wmPopMatrix(); } } } |