Thanks, that was what I needed. I don't know anything about opengl yet,
so this is a bit mystical for me, but I will have to learn some of it in
the future, to do things like "show green ellipse around selected
agents" etc.
What was meant in the comments about group? I didn't understand this:
## TODO:
## needs a proper group for the batch,
## push / pop of attribute bit probably want to go to the group
On 09.11.2013 18:57, claudio canepa wrote:
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.