• 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
OpenGL Vertical Syncing effect on run loops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OpenGL Vertical Syncing effect on run loops


  • Subject: OpenGL Vertical Syncing effect on run loops
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 22 Sep 2015 18:56:39 -0700

In Apple document QA1385, in Listing 2, describing how to drive OpenGL Rendering Loops 10 years ago, an NSTimer, repeating every 1 millisecond, is added to an app’s run loop [1].  Referring to this timer, the text says that:

"When vertical synchronization is enabled in your OpenGL application, during each retrace period, when the timer fires, …”

Hmmmm, a timer with time interval of 1 millisecond is now going to fire during each retrace period, 16.7 milliseconds or so!  This implies that when vertical synchronization is enabled in an OpenGL application, the application’s run loop, in all modes, is synchronized to the video frame and can go no faster.  Is this correct?

Jerry

[1]
renderTimer = [NSTimer timerWithTimeInterval:0.001   // 1ms
                                      target:self
                                    selector:@selector(timerFired:)
                                    userInfo:nil
                                     repeats:YES] ;
[[NSRunLoop currentRunLoop] addTimer:renderTimer
                             forMode:NSDefaultRunLoopMode];
[[NSRunLoop currentRunLoop] addTimer:renderTimer
                             forMode:NSEventTrackingRunLoopMode];
_______________________________________________

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: OpenGL Vertical Syncing effect on run loops
      • From: Greg Parker <email@hidden>
  • Prev by Date: Re: Two Array Controllers, loading from CoreData, without a contentArray...
  • Next by Date: Re: Two Array Controllers, loading from CoreData, without a contentArray...
  • Previous by thread: Localised alert/confirm message
  • Next by thread: Re: OpenGL Vertical Syncing effect on run loops
  • Index(es):
    • Date
    • Thread