Using Pyglet for OpenGL

suggest change
import pyglet
from pyglet.gl import *

win = pyglet.window.Window()

@win.event()
def on_draw():
    #OpenGL goes here. Use OpenGL as normal.

pyglet.app.run()

The body of on_draw is only a comment. A comment is not a statement, so this is a syntax error.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents