On Sat, Nov 9, 2013 at 11:37 AM, Paul Pittlerson <[email protected]>wrote:
> def make_frame(self): > > for column in xrange(4): > CL = ColorLayer(*Colors.grey, width=1, height=24*96) > CL.position = column*96, 0 > self.add(CL) > > for row in xrange(24): > CL = ColorLayer(*Colors.grey, height=1, width=4*96) > CL.position = 0, row*96 > self.add(CL) > > Trying to make a grid for a menu, but that code makes the FPS from from > >300 to ~55. > > Is there a better way to do it, since colorlayer is not batchablenode? > I would use a custom CocosNode that internally use a batch. An example near what you want can be this test_batch_vertex_list.py, http://pastebin.com/D8itcKYF Be sure to read the comments in that code. -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" 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/cocos-discuss. For more options, visit https://groups.google.com/groups/opt_out.
