def on_draw(_):
    window.clear()
    gl.glLineWidth(2)
    gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE)
    gl.glEnable(gl.GL_LINE_SMOOTH)
    program.draw(gl.GL_TRIANGLES,
                 indices.reshape(-1).astype(np.uint32).view(gloo.IndexBuffer))
def on_draw(dt):
    window.clear()

    polygon["color"] = 0.95, 0.95, 0.95, 1.00
    gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL)
    polygon.draw(gl.GL_TRIANGLES, I)

    gl.glLineWidth(1.0)
    polygon["color"] = 0.50, 0.50, 0.50, 1.00
    gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE)
    polygon.draw(gl.GL_TRIANGLES, I)

    gl.glLineWidth(3.0)
    polygon["color"] = 0.00, 0.00, 0.00, 1.00
    polygon.draw(gl.GL_LINE_LOOP, O)
def on_init():
    gl.glEnable(gl.GL_DEPTH_TEST)
    gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE)
def on_draw(_):
    window.clear()
    gl.glLineWidth(2)
    gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE)
    gl.glEnable(gl.GL_LINE_SMOOTH)
    program.draw(gl.GL_TRIANGLES, indices.reshape(-1).astype(np.uint32).view(gloo.IndexBuffer))