Add LineWidthNode

This commit is contained in:
David Vierra 2015-07-14 12:28:11 -10:00
parent 628c2a808c
commit 379ffea897

View File

@ -28,6 +28,22 @@ class PolygonModeNode(Node):
self.mode = mode
class LineWidthRenderNode(RenderstateRenderNode):
def enter(self):
GL.glPushAttrib(GL.GL_LINE_BIT)
GL.glLineWidth(self.sceneNode.lineWidth)
def exit(self):
GL.glPopAttrib()
class LineWidthNode(Node):
RenderNodeClass = LineWidthRenderNode
def __init__(self, lineWidth):
super(LineWidthNode, self).__init__()
self.lineWidth = lineWidth
class ClearRenderNode(RenderNode):
def drawSelf(self):
color = self.sceneNode.clearColor