• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [SOLVED] Problem getting my layers to draw in the right order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 07:50:20 -0700

On Jul 26, 2011, at 7:13 AM, Graham Cox <email@hidden> wrote:

> Anyway, what I've learned is that the z values need to be big, and probably not terribly precise.

David Duncan's post in this thread seems relevant: http://www.cocoabuilder.com/archive/cocoa/193266-reordering-calayer-sublayers-without-raping-my-performance.html

From the description given in the documentation, I would think that because CA is sorting the layers based on sibling order and zPosition that it would be possible to render a layer of zPosition=0 atop a nephew layer with zPosition=1000.

But I can see why this would be difficult: Core Animation apparently applies the zPosition to the layer's GL quad. In order to support rendering zPosition=0 atop zPosition=1000, it would need to maintain a copy of the depth buffer at each level of the layer. Rendering a layer would involve a depth test, then copying the depth buffer to be used when rendering the sublayers and discarding that depth buffer when done.

That's a *ton* of time- and memory-intensive copies.

This is a place where the abstraction leaks. I think the documentation should be updated to make it clearer that zPosition can't be used for general Quartz Transparency Layer type effects, which it seems to imply. We should also probably get a CALayerGroup layer class that *does* render all of its sublayers into a quad whose z position is equal to that of the CALayerGroup's zPosition property.

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

  • Follow-Ups:
    • Re: [SOLVED] Problem getting my layers to draw in the right order
      • From: David Duncan <email@hidden>
References: 
 >Problem getting my layers to draw in the right order (From: Graham Cox <email@hidden>)
 >Re: Problem getting my layers to draw in the right order (From: David Duncan <email@hidden>)
 >Re: Problem getting my layers to draw in the right order (From: Graham Cox <email@hidden>)
 >[SOLVED] Problem getting my layers to draw in the right order (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Fastest high-quality thumbnail display
  • Next by Date: Re: Dialog Command Keys
  • Previous by thread: [SOLVED] Problem getting my layers to draw in the right order
  • Next by thread: Re: [SOLVED] Problem getting my layers to draw in the right order
  • Index(es):
    • Date
    • Thread