On Wed, Apr 16, 2008 at 10:40 AM, rollbak <[EMAIL PROTECTED]> wrote: > > Hi, did you have some example code to share, i'm using pymunk+pyglet > and i 'm having lots of performance problems when i have to draw a lot > of circles (i use raw open gl to do that). > Thanks. >
Fluid dynamics (even `psuedo-', as you say) in Python is going to be slow ... period. You can't optimize the function call overhead with display lists, for one, because your circles will likely move independently of one another. :( There are certainly opportunities for clever cheats in the context of games where you can overlay textures (or use 3d textures ... or use some shader), but you not going to achieve decent performance with a bunch of circles (unless you write it in C - and you'll still have very finite bound on the number of circles you can get by with ... just much less finite than with Python). There could very well be other approaches yielding good results in Python - maybe use a B-spline for the surface? I'm a dilettante on theses matters - complex OpenGL operations make my head explode. Anyhow the future might offer us more directly on the GPU: http://www.bulletphysics.com/Bullet/wordpress/uncategorized/gpu-physics-demos-in-the-cuda-11-sdk -- \\\\\/\"/\\\\\\\\\\\ \\\\/ // //\/\\\\\\\ \\\/ \\// /\ \/\\\\ \\/ /\/ / /\/ /\ \\\ \/ / /\/ /\ /\\\ \\ / /\\\ /\\\ \\\\\/\ \/\\\\\/\\\\\/\\\\\\ d.p.s --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
