[Bf-blender-cvs] [fb8a1a58d9a] blender2.8: UI: Node Editor: Batch nodelinks together.

Clément Foucault noreply at git.blender.org
Thu Apr 5 16:08:32 CEST 2018


Commit: fb8a1a58d9a6ce68937111f1d9763ec6c09e0235
Author: Clément Foucault
Date:   Thu Apr 5 15:43:07 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBfb8a1a58d9a6ce68937111f1d9763ec6c09e0235

UI: Node Editor: Batch nodelinks together.

This will do only one drawcall for every 256 nodelinks.

===================================================================

M	source/blender/editors/space_node/node_draw.c

===================================================================

diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 1d7e0e0b721..c82c56ea648 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -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 */



More information about the Bf-blender-cvs mailing list