UI: Node Editor: Batch nodelinks together.

This will do only one drawcall for every 256 nodelinks.
This commit is contained in:
Clément Foucault 2018-04-05 15:43:07 +02:00
parent 72bfa849ee
commit fb8a1a58d9
1 changed files with 2 additions and 2 deletions

View File

@ -1244,12 +1244,12 @@ void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeT
/* node lines */
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
nodelink_batch_start(snode);
for (link = ntree->links.first; link; link = link->next) {
if (!nodeLinkIsHidden(link))
node_draw_link(&ar->v2d, snode, link);
}
glDisable(GL_LINE_SMOOTH);
nodelink_batch_end(snode);
glDisable(GL_BLEND);
/* draw foreground nodes, last nodes in front */