• 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: Smooth OpenGL animation possible, even if main thread blocks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smooth OpenGL animation possible, even if main thread blocks?


  • Subject: Re: Smooth OpenGL animation possible, even if main thread blocks?
  • From: Markus Hanauska <email@hidden>
  • Date: Mon, 28 Jun 2010 15:01:12 +0200

On Monday, 2010-06-28, at 14:43, vincent habchi wrote:

>> "Possible" or "Allowed"? ;-)
>
> Both, I think. If I am not mistaken, it was some Apple guy (David Duncan?) who pointed out the role of the runloop. I therefore take for granted that, if it is not "allowed", it must at least be "tolerated".

What does work, but I doubt it is allowed, is to directly call 'display' on the CALayer. Apple says "you should not call this method directly", but so far it seems to work and has not crashed... on the other hand it might crash if the CALayer is destroyed on the main thread asynchronously (that can be avoided, though, by making sure the other thread stops first, before the CALayer is ever destroyed). Another issue is that it might cause refreshes of the CALayer, even thought the layer is not even visible right now (e.g. the whole Window is minimized); but that could be solvable, too, though I'm not sure how (querying UI properties of elements from a thread other than main is definitely not thread-safe).

--
Markus Hanauska
_______________________________________________

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: Smooth OpenGL animation possible, even if main thread blocks?
      • From: vincent habchi <email@hidden>
References: 
 >Smooth OpenGL animation possible, even if main thread blocks? (From: Markus Hanauska <email@hidden>)
 >Re: Smooth OpenGL animation possible, even if main thread blocks? (From: vincent habchi <email@hidden>)
 >Re: Smooth OpenGL animation possible, even if main thread blocks? (From: Markus Hanauska <email@hidden>)
 >Re: Smooth OpenGL animation possible, even if main thread blocks? (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: Smooth OpenGL animation possible, even if main thread blocks?
  • Next by Date: Re: How tell tell if an NSNumber was initialized from a float or int?
  • Previous by thread: Re: Smooth OpenGL animation possible, even if main thread blocks?
  • Next by thread: Re: Smooth OpenGL animation possible, even if main thread blocks?
  • Index(es):
    • Date
    • Thread