Hey all,

Thought I'd take the weekend to learn a bit of OpenGL with pyglet, so I'm 
working on a minecraft-like thingy.

I'm trying to add a bunch of indexed vertex lists to a batch, but they seem 
to be interfering with each other / sharing vertices across lists. Here's 
the code: https://gist.github.com/79337c2249255207abad (ignore the terrible 
world generation stuff please :) )

As-is, the code intentionally renders only the top faces of visible 
cubes. It works fine (albeit slowly) if I put each list it its own group 
(replace None on line 136 with pyglet.graphics.Group()) but I'm certain this 
is an abuse of groups.

My only lead is this presentation ( 
http://tartley.com/files/stretching_pyglets_wings/presentation/ ) which 
claims that "vertex arrays passed to the creation of a batch need delimiting 
with duplicated start and end vertices", but I can't find any code in the 
wild that does this, and the docs don't mention this, except in the case of 
the GL_TRIANGLE_STRIP mode etc.

Any thoughts? Thanks for your help in advance.

Jesse

-- 
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