Hello All,
First post and I'm new to Pyglet and very new to OpenGL. So far I was
mostly able to reverse engineer the basics of OpenGL through the Pyglet
examples... but I am getting stuck on this one block of code that's located
in the Astraea module... It's around line 729 and is inside the main draw
loop.
for (x, y) in ((0, ARENA_HEIGHT), # Top
(-ARENA_WIDTH, 0), # Left
(0, 0), # Center
(ARENA_WIDTH, 0), # Right
(0, -ARENA_HEIGHT)): # Bottom
glLoadIdentity()
glTranslatef(x, y, 0)
wrapping_batch.draw()
...By doing some of the fiddling you would do to code that you don't
understand in a dev environment, I got so far to discern that this is
messing with the modelview matrix. And it translates it in a way so that
the bounds are outside of the projected view so that way the meteors don't
just wrap to the other side while still in view? Am I wrong? How do these 5
translations actually work? Why do it this way rather than setting the
wrapping points to be +/-50 pixels outside of each bound?
--
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 https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.