Re: [SOLVED] Problem getting my layers to draw in the right order
Re: [SOLVED] Problem getting my layers to draw in the right order
- Subject: Re: [SOLVED] Problem getting my layers to draw in the right order
- From: Kyle Sluder <email@hidden>
- Date: Tue, 26 Jul 2011 10:57:55 -0700
On Tue, Jul 26, 2011 at 10:51 AM, David Duncan <email@hidden> wrote:
> Except for certain situations, Core Animation effectively treats each layer as a rendering target – that is, all of that layer's sublayers are flattened into that layer to produce the final image for that layer. What this means is that only local sibling ordering matters at any given level of the layer tree. Graphically that means if you have this:
>
> X
> | \
> Y Z
> |
> W
>
> W can never render on top of Z, because W always renders "into" Y, and Z always renders on top of Y.
Okay, I misinterpreted your comment in that other thread.
> This is basically what you have with a CALayer already (zPosition should be usable as a way to order layers, but sublayer order is generally better). If you use a CATransformLayer, or a CAReplicatorLayer with preservesDepth=YES then you are effectively asking Core Animation to act more like a textured quad renderer. See the CATransformLayer documentation for details on the restrictions that come with that.
It sounds like an explicit render target would still be a handy thing
to have, though, for cases where you'd want to render a bunch of quads
into a billboard.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden