On Oct 5, 1:01 pm, Tristam MacDonald <[email protected]> wrote:
>
> The easiest route would be to subclass pyglet.sprite.Sprite to add a
> z-coodinate, and override the rendering methods as necessary to set it.

Ok, I gave that a try. I can't work out how to upload things to this
Google Group so the 35K zip file is up here instead:

http://www.twilightsembrace.com/_misc/07October09/zsprite.zip

Unzip the lot into a new directory and run depthbuffertest.py.
Hopefully the use of one sloping tile and a couple of taller tiles
will demonstrate that it's working, even when the code shuffles the
sprites and renders them in an arbitrary order.

I'm not much of an OpenGL coder so I expect there to be bugs. Also, I
am not greatly familiar with the depths of pyglet so I may have missed
a trick or two. So if one or two of you could cast your eye over it
I'd be grateful. Much of it is copy and pasted code since the existing
classes don't lend themselves terribly well to extension.

(Legalese: the included tile gfx are by Dan Cook at lostgarden.com,
and fall under the Creative Common Attributions 3.0 licence. Consider
my code to be BSD-licensed, like pyglet.)

--
Ben Sizer

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