I haven't look at the rest of the source code, but I think this is one of 
those situations where there are many ways to tackle the same problem.

I'm sorry I can't answer your question, but I would like to suggest you 
check out this nice Minecraft-style demo in pyglet: 
https://github.com/fogleman/Minecraft
It does a decent job of showing off how to do simple 3D stuff in OpenGL. 



On Thursday, February 18, 2016 at 6:00:48 AM UTC+9, Collin McLean wrote:
>
> 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.

Reply via email to