• 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: Hiding the Window Content View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding the Window Content View


  • Subject: Re: Hiding the Window Content View
  • From: David Blanton <email@hidden>
  • Date: Fri, 8 Jan 2010 17:06:57 -0700

Thanks for references and tips. I think I will be able to achieve the results I am looking for from all who have commented!

- db

On Jan 8, 2010, at 4:39 PM, Alastair Houghton wrote:

On 8 Jan 2010, at 20:46, David Blanton wrote:

I am just trying to find the best way to do rapid drawing with no flicker.

The answer to that question depends rather on what you mean by "rapid" and on what you're trying to draw.


The fastest way to draw on Mac OS X is generally OpenGL; it's also somewhat lower level than most of the alternatives, and unless you need to use it for some other reason it's usually best to go with something higher level.

For general drawing (including controls and the main views of the majority of applications), Quartz is usually more than fast enough; that's true even for fairly complex animation, though there may be better alternatives for various kinds of animated content. Quartz usually also gives you the best rendering quality, if that matters to you, and has the significant advantage of device independence (so you can draw to a printer just as easily as to the display).

If you want to do the kinds of animations you often see in apps these days, or in the demo programs Apple shows off in some of its presentations, Core Animation is the way to go. You can use that from a view's animator, using layer-backed views, or by creating CALayers yourself.

Finally if you're doing image processing, you might want to investigate Core Image and/or the Accelerate framework functions (vImage, vDSP et al).

In addition, you can do many of these things without any code by using Quartz Composer...

There are probably other things I haven't mentioned as well... this is just OTOH.

As for flicker, for OpenGL obviously you're going to want to configure things for double buffered operation, and you might care about display synchronisation too (see QA1385 and QA1521). The higher level APIs flush the window buffers automatically in a manner that is synchronised with display refresh so you won't see tearing--- though the implication, of course, is that there's a maximum rate at which you can draw before the system starts to throttle your updates (see TN2133). If you're using Core Animation, you need not worry about this at all as it handles the issue for you.

Kind regards,

Alastair.

--
http://alastairs-place.net




_______________________________________________

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


References: 
 >Hiding the Window Content View (From: David Blanton <email@hidden>)
 >Re: Hiding the Window Content View (From: Kyle Sluder <email@hidden>)
 >Re: Hiding the Window Content View (From: David Blanton <email@hidden>)
 >Re: Hiding the Window Content View (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Hiding the Window Content View
  • Next by Date: NSFilesPromisePboardType
  • Previous by thread: Re: Hiding the Window Content View
  • Next by thread: Re: Workspace Configuration
  • Index(es):
    • Date
    • Thread