Thanks Bruce, that was indeed the problem. I used 1-8 for the indices due to the OBJ format... interesting.
Cheers, Xav On Sat, Feb 13, 2010 at 9:52 AM, Bruce Smith <[email protected]> wrote: > I think you need to use the numbers 0-7 for the 8 vertices, not 1-8. > > - Bruce Smith > > On Fri, Feb 12, 2010 at 3:12 PM, Xavier Ho <[email protected]> wrote: > >> Hello Pyglet group. New to the list here. >> >> I started mucking around with the Batch class and sending some vertices to >> the video memory. But I'm getting funny results. Hopefully some of you can >> give me some quick pointers for common mistakes. >> >> The problem is, some of the trianges get stuck to the world origin, like >> this simple cube: >> http://xavierho.com/temp/Cube.png >> >> My code looks something like this: >> >> count = 8 >> indices = (4, 3, 2, >> 4, 2, 1, >> 2, 6, 5, >> 2, 5, 1, >> 3, 7, 6, >> 3, 6, 2, >> 8, 7, 3, >> 8, 3, 4, >> 5, 8, 4, >> 5, 4, 1, >> 6, 7, 8, >> 6, 8, 5) >> vertices = (0.5, -0.5, 0.5, >> -0.5, -0.5, 0.5, >> -0.5, 0.5, 0.5, >> 0.5, 0.5, 0.5, >> 0.5, -0.5, -0.5, >> -0.5, -0.5, -0.5, >> -0.5, 0.5, -0.5, >> 0.5, 0.5, -0.5) >> >> I can't figure out why some of the vertices point to the origin instead of >> one of the 8 vertices. If this is a common thing, can someone explain why, >> and the proper way of doing it? >> >> Cheers, >> Xav >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pyglet-users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<pyglet-users%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/pyglet-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "pyglet-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<pyglet-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/pyglet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "pyglet-users" 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/pyglet-users?hl=en.
