On Fri, Aug 14, 2009 at 12:29 PM, jaber<[email protected]> wrote: > > I'm using cocos.draw.Canvas to draw primitives and stuff like that, > However if I constantly update it (update the drawings) along the game > every frames, my game slow down from 50fps to ~10fps. > Scheduling the canvas to update in intervals like every 1/10 second > drops lower framerates. > > My code looks like this: > class DrawingBoard(Canvas): > def __init__(self): > > Canvas.__init__(self) > self.verts = [] > self.previous = self.verts > > > def update(self): > "To be implemented > self.verts = [...] # update drawn verts > if self.verts != self.previous: # then update > self.end = (self.value,0) > self._dirty = True > self.draw() > > def render(self): > "Render" > for v in self.verts: > ... > # draw verts > >
Yes. the rendering of of cocos draw is SLOW. :) Lucio --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
