So I am creating a grid of images but having all the images load on
each draw event is very slow, I was wondering if there were a way to
combine all the images into one big image on the fly?

My current code is as follows
    def draw_mini_grid(self):
        y1=0
        for y in range(0,self.mini_grid.grid.height,1):
            x1=0
            for x in range(0,self.mini_grid.grid.width,1):
                MINI_TYPE[self.mini_grid.grid.tiles[x]
[y].tile_type].blit(x1,y1)
                x1+=self.mini_grid.tile_size
            y1+=self.mini_grid.tile_size
        y1=0

I would like something like this...
    def draw_mini_grid(self):
        new_image=0
        y1=0
        for y in range(0,self.mini_grid.grid.height,1):
            x1=0
            for x in range(0,self.mini_grid.grid.width,1):
                new_image+=MINI_TYPE[self.mini_grid.grid.tiles[x]
[y].tile_type].image_data.blit(x1,y1).
                x1+=self.mini_grid.tile_size
            y1+=self.mini_grid.tile_size
        y1=0

where it would be blit into a memory location instead of screen.. Or
something equivalent.

Any ideas?

Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to