On Tue, Apr 7, 2009 at 1:39 PM, Kao Cardoso Felix <[email protected]> wrote: > I tried to run the code, but I'm having some problem with > readline.get_current_history_length because I'm on windows and all of > the python readline ports I found don't define this function. Is there > anyway to run it on windows? > > Also, the 'Unable to share contexts' pyglet error showed up out of > nowhere. It's strange because it never happened before and my video > driver is fairly up to date. Any ideas on what could be causing this?
Well, I managed to run it (setting the PYGLET_SHADOW_WINDOW env var to 0 and creating a stub readline.get_current_history_length = lambda : 1) and test it. When I click F3 to go to stamp mode it is painfully slow to build the stamp list. It seems that the texture atlases are constantly failing construction and trying with a larger size: MODE: stamp trying with atlas: 256, 256 No more space in <atlas.MyAllocator object at 0x0278A370> for box 103x173 trying with atlas: 512, 512 No more space in <atlas.MyAllocator object at 0x02F4AC90> for box 103x173 trying with atlas: 768, 768 No more space in <atlas.MyAllocator object at 0x02F4AE30> for box 103x173 trying with atlas: 1024, 1024 No more space in <atlas.MyAllocator object at 0x02F4AD30> for box 103x173 trying with atlas: 1280, 1280 I hacked around the code a little bit and I noticed a few things: - The tiledir seems to be unique. - 2 expensive operations are done when activating the stamp mode: creating the atlas and atlas.fix_image() So I've changed the ImgSelector to receive an atlas and the atlas itself is created on the StampMode class that pass it as a parameter to ImgSelector. That way the expensive operations are done only once and the response time on my machine is instantaneous now :) Well, I didn't commit this change, of course. I wanted to ask you guys if there's any good reason not to do it (like wasting memory with the atlas, or something like that). To me it seems that the stamps will be chosen frequently, so it is nice to have them cached somewhere instead of recreating everytime we need them. -- Kao Cardoso Félix Página pessoal: http://www.inf.ufrgs.br/~kcfelix Blog: http://kaofelix.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" 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/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
