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].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to