On Wed, Dec 3, 2008 at 2:39 PM, josch <[EMAIL PROTECTED]> wrote:

> @tristam
> terrain layer actually is only one group as it is flat.
> well i dont understand how one could draw things with only 2-3 groups.
> imagine a texturegion from texture A being one map object and a
> texture region from texture B being another object. in some cases A is
> dawn in front of B and in other cases the other way round. this is why
> i have a parent ordered group for all the texture groups.
> this is also the reason why i just cant order all texture regions from
> texture A, draw them, order those from texture B and draw them too.
> this way incorrect ordering in some cases would be the result. maybe A
> is correctly drawn in front of B in the first case but in the second
> it was supposed to be the other way round and this is why i order
> them.
>
> actually the ordering is done in a very simple way: the higher the y
> coordinate of a map object the higher the order, so that objects are
> drawn from top row to the bottom and hence correctly overlap.


You may be overcomplicating things. I render overlapping tiles in the same
way, except that I take advantage of my observation that pyglet renders each
object in a batch in the order they are added to the batch. This may not
hold true in all cases, but it hasn't broken yet.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to pyglet-users@googlegroups.com
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