I suppose if the existing Sprites are kept as a fallback, it would make a lot of sense to optimize them. (Sorry Jason for deraiing the thread. Maybe this should be moved to a new discussion).
Leif, what you've pointed out is totally correct. I was bit by that on my first test of pyglet. Switching to a single set_position call resulted in a doubling of performance. I've had some ideas for refactoring the Sprite class. All calls to _update_position would be removed, and x/y/position/scale/rotation would become simple attributes. The self._vertex_list.vertices addtibute would be hidden behind a @property, which would call the _update_position method "on demand", whenever the vertices are checked. This would have the added bonus of increasing access speed to all Sprite attributes, because they wouldn't need to be accessed through properties. I'm not sure if this is possible because of the way the batching works (I've not studied that code yet), but it seems to me that there really should be direct access to the common Sprite attributes in either case. -Ben On Friday, November 13, 2015 at 6:33:03 AM UTC+9, Jason Spashett wrote: > > > > On Thursday, 12 November 2015 17:39:28 UTC, Leif Theden wrote: >> >> AFAIK, there is no GUI library for pyglet, so if you plan on doing that, >> you'll certainly be doing a lot of manual work there. >> >> > It going to be a simple industrial style GUI with big buttons and some > screens, and no windows, on a touch screen, with a little 'pretty' added in > with some tests. That's the way the shop floor likes it. Might not end up > using pyglet, but it's a good candidate for what the 'client' wants to do. > Besides, Sublime text managed it to great effect, in a surprisingly simple > way, apart of course from the text rendering which is another story. > > > Shaders could be used of varying version for different cards with fallback > for Sprites. It might be a good way of building a base by which to > introduce more shader goodness at a later day, with an eventual transition > to OpenGL 3.2+ in a similar way to Orge3d does with it's "techniques" (or > used to do when I looked last). But as you say probably needs a few more > people to work on that sort of thing. > > > > > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
