Put all objects normal models in a single render batch

THis speeds things up a fair bit for build plates with multiple models

CURA-7106
This commit is contained in:
Jaime van Kessel 2020-06-24 10:42:35 +02:00
parent 03e66beafd
commit b1fe4793e4
No known key found for this signature in database
GPG key ID: 3710727397403C91
2 changed files with 4 additions and 2 deletions

View file

@ -29,7 +29,7 @@ class XRayPass(RenderPass):
batch = RenderBatch(self._shader, type = RenderBatch.RenderType.NoType, backface_cull = False, blend_mode = RenderBatch.BlendMode.Additive)
for node in DepthFirstIterator(self._scene.getRoot()):
if isinstance(node, CuraSceneNode) and node.getMeshData() and node.isVisible():
batch.addItem(node.getWorldTransformation(), node.getMeshData())
batch.addItem(node.getWorldTransformation(copy = False), node.getMeshData())
self.bind()