Bug in BillboardRenderer on 64-bit arch

19 views
Skip to first unread message

Daniel Pope

unread,
Apr 17, 2013, 6:29:12 PM4/17/13
to py-lept...@googlegroups.com
Lepton's BillboardRenderer has a bug on 64-bit architectures. It assumes a 4-byte packing for VertItem and ColorItem structs, and so passes an incorrect stride value to glVertexPointer/glColorPointer.

The attached patch fixes the problem for me.

Dan
lepton.diff

Casey Duncan

unread,
Apr 19, 2013, 2:10:18 PM4/19/13
to py-lept...@googlegroups.com
Thanks for the patch. If you don't mind me asking, what are you using lepton for?

Thanks.

-Casey



--
You received this message because you are subscribed to the Google Groups "General discussion of the Lepton particle engine for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py-lepton-use...@googlegroups.com.
To post to this group, send email to py-lept...@googlegroups.com.
Visit this group at http://groups.google.com/group/py-lepton-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Pope

unread,
Sep 6, 2013, 6:22:11 PM9/6/13
to py-lept...@googlegroups.com
Sorry, I wasn't subscribed for responses to this thread.

I've used lepton in various Pyweek entries:

http://www.pyweek.org/e/wasabi/ - but due to the 64-bit stride bug, I rendered the particles with Pyglet sprites

http://www.pyweek.org/e/wasabi-idli/ - this is where I fixed the stride issue but I noticed there was a strange bug in the randomisation, which I never fixed

Our entry for the current competition is http://www.pyweek.org/e/wasabi-idli2/ - I've now fixed the bug in the randomisation on 64-bit arch (by substituting long for int32_t/unsigned long for uint32_t).

I've committed my changes to Mercurial so I can keep track of them - branch is at https://bitbucket.org/lordmauve/lepton

Dan
Reply all
Reply to author
Forward
0 new messages