diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-12-01 19:51:46 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-12-14 15:56:32 +0300 |
commit | 7395f37efe049b4b053048a70e151546a915dedd (patch) | |
tree | 665e3bbb26ce4a618942c214d7ef3d32a831888e /cura/ConvexHullNode.py | |
parent | 090f912a556eab5fdd0d3c275dc676de1f9495d8 (diff) |
Update BuildVolume and ConvexHullNode to use new API
Diffstat (limited to 'cura/ConvexHullNode.py')
-rw-r--r-- | cura/ConvexHullNode.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index e7a585d412..c7a8257ef0 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -7,6 +7,8 @@ from UM.Math.Color import Color from UM.Math.Vector import Vector from UM.Mesh.MeshData import MeshData +from UM.View.GL.OpenGL import OpenGL + import numpy class ConvexHullNode(SceneNode): @@ -62,14 +64,14 @@ class ConvexHullNode(SceneNode): return self._node def render(self, renderer): - if not self._material: - self._material = renderer.createMaterial(Resources.getPath(Resources.Shaders, "basic.vert"), Resources.getPath(Resources.Shaders, "color.frag")) + if not self._shader: + self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "default.shader")) if self.getParent(): self._material.setUniformValue("u_color", self._color) - renderer.queueNode(self, material = self._material, transparent = True) + renderer.queueNode(self, transparent = True, shader = self._shader) if self._convex_hull_head_mesh: - renderer.queueNode(self, material = self._material,transparent = True, mesh = self._convex_hull_head_mesh) + renderer.queueNode(self, shader = self._shader, transparent = True, mesh = self._convex_hull_head_mesh) return True |