Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8190325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:35:14+00:00 2026-06-07T03:35:14+00:00

I have a GLKViewController to handle some OpenGL drawing. I have the glkView:drawInRect and

  • 0

I have a GLKViewController to handle some OpenGL drawing. I have the glkView:drawInRect and update method both implemented and have the preferredFramesPerSecond property set to 30 (the default).

The problem is that the delegate methods stop firing when the user interacts with other part of the app. The two cases that I have seen this happen on is when the user scrolls a UITableView or interacts with a MKMapView.

Is there a way to make sure these delegates always fire, regardless of what the rest of the app is doing. The only time I want these to stop is when the app enters the background (which is does automatically).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:35:16+00:00Added an answer on June 7, 2026 at 3:35 am

    The reason for this is that during scrolling in a table view or map view the runloop is in UITrackingRunLoopMode which has a higher priority than the default mode. This prevents some events from firing in order to guarantee a high scrolling performance.

    To solve your problem you must set up your own rendering loop instead of relying on the GLKViewController.

    • First set enableSetNeedsDisplay of the GLKView to NO (should be set automatically when using GLKViewController).
    • set preferredFramesPerSecond to 0 (or maybe 1) to disable the rendering loop of GLKViewController or don’t use GLKViewController at all
    • Import the QuartzCore framework: #import <QuartzCore/QuartzCore.h>
    • create a CADisplayLink and schedule it in NSRunLoopCommonModes:
    CADisplayLink* displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)];
    [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
    
    • optional: set the frameInterval of displayLink to 2 (= half the framerate)
    • the render method:
    - (void)render:(CADisplayLink*)displayLink {
        GLKView* view = (GLKView*)self.view;
        [view display];
    }
    

    I haven’t tested this, so tell me if it works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope there are some GLKViewController experts out there because I have some problems :)
Have 2 tables in Access 2007, both lists of certain tasks to be accomplished.
I have a large (-ish) GLES2 game implemented for Nokia Harmattan platform on C++.
Have some code: using (var ctx = new testDataContext()) { var options = new
I have a UITableView with custom Cells. These cells are containing each an OpenGL
Have some dates in my local Oracle 11g database that are in this format:
i try to set up an Xcode project based on the template OpenGL Game.
I'm trying to set an initial size of GLKView (basically, I want it to
Have some delimited files with improperly placed newline characters in the middle of fields
have written this little class, which generates a UUID every time an object of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.