Jonathan Hartley
Jonathan Hartley

Reputation: 16034

why might my pyglet vertex lists and batches be very slow on Windows?

I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps for the same geometry. In Linux the vertex_list is about the same speed as glVertex, which is disappointing, and batch methods are about twice as fast, which is a little better but not as much gain as I was hoping for.

Upvotes: 0

Views: 1160

Answers (2)

Jonathan Hartley
Jonathan Hartley

Reputation: 16034

Don't forget to invoke your pyglet scripts with 'python -O myscript.py', the '-O' flag can make a huge performance difference.

See pyglet docs here and here.

Upvotes: 5

Steve Landey
Steve Landey

Reputation: 2609

I don't know personally, but I noticed that you haven't posted to the pyglet mailing list about this. More Pyglet users, as well as the primary developer, read that list.

Upvotes: 1

Related Questions