On Wed, Dec 3, 2008 at 1:17 PM, josch <[EMAIL PROTECTED]> wrote: > > On Dec 3, 5:06 pm, "Casey Duncan" <[EMAIL PROTECTED]> wrote: > > Before you go too crazy re-implementing everything, you really should > > do some profiling to figure out what specific parts of yours (and/or > > pyglet's) code are slow. > > well all that is slow is the raw drawing - namely Batch.draw() which > again does nothing else than looping over a list of previously > prepared Vertexdomain.draw() and as i have a huge amount of groups per > draw due to the required ordering of objects there are quite a lot of > vertex domains to be drawn and i might lack creativity but how could > Vertexdomain.draw() be further optimized without rewriting stuff in > cython? > > as a quick try i monkey patched some of the involved pyglet.gl > functions with wrappers that i wrote in compiled cython extensions but > this didnt change the performance at all so all due to the fact that > still a lot of python type conversion has to be done. > > a scene does AT LEAST have 100 different groups and together with > state changes this are 200 set and unset calls and 100 vertex domain > drawings per batch.draw() > but even with only those 100 ordered groups i only get 30fps. > when resizing the window, going fullscreen or even zooming out there > is much more to be drawn. i will of course investigate all this > further.
I can't see from your posted image why you would need 100 groups. It looks like you probably need 2-3 groups to handle the terrain layers (but depth buffer would work fine here), and another 2-3 groups for the foreground objects. Is there any particular reason I am missing as to why you need so many? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---