def render(self, time, frame_time):
    angle = time
    self.ctx.clear(1.0, 1.0, 1.0)
    self.ctx.enable(moderngl.DEPTH_TEST)
    camera_pos = ((np.cos(angle) * 5.0), (np.sin(angle) * 5.0), 2.0)
    proj = Matrix44.perspective_projection(45.0, self.aspect_ratio, 0.1, 1000.0)
    lookat = Matrix44.look_at(camera_pos, (0.0, 0.0, 0.5), (0.0, 0.0, 1.0))
    self.mvp.write((proj * lookat).astype('f4').tobytes())
    self.light.value = camera_pos
    self.vao.render()
def render(self, time, frame_time):
    angle = time
    self.ctx.clear(1.0, 1.0, 1.0)
    self.ctx.enable(moderngl.DEPTH_TEST)
    camera_pos = ((np.cos(angle) * 5.0), (np.sin(angle) * 5.0), 2.0)
    proj = Matrix44.perspective_projection(45.0, self.aspect_ratio, 0.1, 1000.0)
    lookat = Matrix44.look_at(camera_pos, (0.0, 0.0, 0.5), (0.0, 0.0, 1.0))
    self.mvp.write((proj * lookat).astype('f4').tobytes())
    self.light.value = camera_pos
    self.vao.render()