MCPcopy Create free account
hub / github.com/csaez/mscreen / draw

Method draw

mscreen.py:535–554  ·  view source on GitHub ↗
(self, view, renderer)

Source from the content-addressed store, hash-verified

533 self._points.append(point)
534
535 def draw(self, view, renderer):
536 super(TrianglePrim, self).draw(view, renderer)
537
538 view.beginGL()
539 glFT = renderer.glFunctionTable()
540 glFT.glPushAttrib(omr.MGL_LINE_BIT)
541 glFT.glBegin(omr.MGL_TRIANGLES)
542
543 for i, point in enumerate(self._points):
544 # unpacking the color in a color 3f
545 if self._is_color_list():
546 glFT.glColor3f(*self.colors[i])
547 else:
548 glFT.glColor3f(*self.colors)
549 # drawing the point
550 glFT.glVertex3f(point.x, point.y, point.z)
551
552 glFT.glEnd()
553 glFT.glPopAttrib()
554 view.endGL()
555
556
557# === Scene Manager ===

Callers

nothing calls this directly

Calls 2

_is_color_listMethod · 0.95
drawMethod · 0.45

Tested by

no test coverage detected