Hey everyone!
Hoping to get some help with my problem here.
Im drawing a hexagonal-grid with batches.
I've got an Hexagon class with init as following. Im passing along a batch
because I taught it would be nice to add all my hexagons to a single batch.
class Hexagon(object):
def __init__(self, x, y, size, batch, color):
...
After all the math I have a tuple with the vertices and adds it to the batch
self.batch.add(
6,
GL_LINE_LOOP,
None,
('v2f', vertices_tuple),
('c3f', color * 6)
)
When this gets drawn to the screen I get this:
<https://lh5.googleusercontent.com/-sP22Z23BMzI/VFJGiyqXJII/AAAAAAAAABc/69u1yPv3SlE/s1600/hexb1.PNG>
<https://lh5.googleusercontent.com/-sP22Z23BMzI/VFJGiyqXJII/AAAAAAAAABc/69u1yPv3SlE/s1600/hexb1.PNG>
If I create a new batch for each hexagon and fill it with the exact same
values and later loop over all the hexagons and draw their batches.
I get the following:
<https://lh5.googleusercontent.com/-xwzU58TmLyE/VFJHhUXFsTI/AAAAAAAAABk/mf_Y2oS2nGk/s1600/hexb2.PNG>
I hope Ive described the problem well enough and looking forward to any
help!
/ BR Tommy
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.