Re: Modifying vertex list data after adding it to a batch.

44 views
Skip to first unread message

elliot

unread,
May 14, 2013, 8:25:04 PM5/14/13
to pyglet...@googlegroups.com
Are you certain you are assigning a tuple of integers to self.player.vertices in update()?  I find I need to be explicit.

Also, why are box_verts, vertlist, and newvertlist prepended with self?  Do you really need those from other methods?  

What is vertlist.update()? You define vertlist as a normal list, which doesn't have an update method.  There seems to be a lot of pouring from one empty bucket into another going on.

elliot

unread,
May 15, 2013, 12:48:07 PM5/15/13
to pyglet...@googlegroups.com
Also, I had a problem like this once because I was modifying vertexlist.verticies instead of vertexlist.vertices.  I didn't get an error because I was just creating a new attribute for the object, but I also wasn't changing any vertices. I don't see anything like that in the code you posted but the code you posted also wouldn't execute (due to trying to call the update() method of a list) so in whatever code you actually are running you may want to make sure you are writing to where you think you are.
Reply all
Reply to author
Forward
0 new messages