diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 16:44:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 16:44:13 +0300 |
commit | 37d8d4787cfa3d04b09f935c5600f1a3ea7b74e7 (patch) | |
tree | b60dfc428ccd61b5b3af6a06cee6ddbe69d3973e /source/blender/editors/space_node | |
parent | 9abacf38fd4f3b0de4b6d9a4644b9cb1155482c9 (diff) | |
parent | 6f633dec5d105ad91dcb5774a6fd4fb06bf264a5 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index bee2379cd81..67584fbe1f1 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2154,8 +2154,9 @@ static void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNo if (node->custom1 == 0) { const float backdropWidth = backdrop->x; const float backdropHeight = backdrop->y; - const float cx = x + snode->zoom * backdropWidth * node->custom3; + const float cx = x + snode->zoom * backdropWidth * node->custom3; const float cy = y + snode->zoom * backdropHeight * node->custom4; + const float cross_size = 12 * U.pixelsize; Gwn_VertFormat *format = immVertexFormat(); unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); @@ -2165,10 +2166,10 @@ static void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNo immUniformColor3f(1.0f, 1.0f, 1.0f); immBegin(GWN_PRIM_LINES, 4); - immVertex2f(pos, cx - 25, cy - 25); - immVertex2f(pos, cx + 25, cy + 25); - immVertex2f(pos, cx + 25, cy - 25); - immVertex2f(pos, cx - 25, cy + 25); + immVertex2f(pos, cx - cross_size, cy - cross_size); + immVertex2f(pos, cx + cross_size, cy + cross_size); + immVertex2f(pos, cx + cross_size, cy - cross_size); + immVertex2f(pos, cx - cross_size, cy + cross_size); immEnd(); immUnbindProgram(); |