3 May 2011 18:20
Re: What is more Efficient?
veers <veers <at> gmx.ch>
2011-05-03 16:20:45 GMT
2011-05-03 16:20:45 GMT
Why do you want to render the tile map to a buffer? Did you try to use pyglets sprites with a batch and a texture atlas/grid? I would expect that to be at least as fast as drawing the one big prerendered texture. Cheers, Jonas On May 1, 8:42 pm, Alejandro Castellanos <alejandrocastellanosjarami... <at> gmail.com> wrote: > I'm wondering because I'm kinda curious about working with the image > buffer. I'm working on a tile engine where I assemble an image from > many smaller images so that pyglet only has to draw a single thing > instead of a buttload of small sprites that slow everything to a > crawl. > > At the moment I'm using PIL to assemble my image by using a grid, from > there I can either save it to a file or keep it in memory (the buffer > of sorts) where I can work over it and then feed it to Pyglet. So far > everything seems to be working fine, but it means I do have to depend > on something other than good ol' Pyglet. The advantages are that it is > a very straight forward process and I can easily modify small regions > of the larger image on the fly if I so wish, with relative ease. Yet I > still have to keep making the conversions between the PIL buffer and > the Pyglet one. > > But just a few moments ago I started playing aorund with the whole > 'pyglet image texture' stuff where, if I understand correctly, I can > create textures and then either blit some stuff onto them, or blit the > textures directly to the screen, and I'm assuming I may be able to get > something similar working using just the actual pyglet buffer, just > slightly less straight forward (than what I'm used to). > > My issue is in discerning what should be better, to keep using PIL, > which is a graphics library in itself, or substitute it for a full-on > pyglet application. Any thoughts? -- -- 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 <at> googlegroups.com. To unsubscribe from this group, send email to pyglet-users+unsubscribe <at> googlegroups.com. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
RSS Feed