pyglet when using draw() instead of eventloop
问题 I'm trying to draw a circle with pyglet. But it is not visible when I use the draw() function instad of the app.run() loop. Any suggestions what I can do? thanks from math import * from pyglet.gl import * window = pyglet.window.Window() def makeCircle(x_pos, y_pos, radius, numPoints): verts = [] glClear(pyglet.gl.GL_COLOR_BUFFER_BIT) glColor3f(1,1,0) for i in range(numPoints): angle = radians(float(i)/numPoints * 360.0) x = radius *cos(angle) + x_pos y = radius *sin(angle) + y_pos verts += [x