Re: Best solution for game loop on OSX?
Re: Best solution for game loop on OSX?
- Subject: Re: Best solution for game loop on OSX?
- From: Uli Kusterer <email@hidden>
- Date: Tue, 17 Dec 2013 12:07:06 +0100
On 17 Dec 2013, at 00:15, Dan Treiman <email@hidden> wrote:
> The two best solutions (and by best I mean least time-wasting) are CVDisplayLink and NSTimer.
>
> CVDisplayLink synchronizes with the display refresh rate and gives you callbacks in a background thread. This somewhat like CADisplayLink on iOS. Its pretty easy to do but your code must be thread-aware.
>
> NSTimer has more than enough resolution for games, and if you are using OpenGL for graphics you should do: (…)
He’s talking about OpenAL, not OpenGL. Audio, not graphics. So I don’t think the display links are a good choice here. They’re intended to avoid tearing when doing screen display, and depending on your screen and power saver settings may not get called as often as you’d want for sound.
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
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