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

  • Home
  • SEARCH
  • 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 6746525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:19:59+00:00 2026-05-26T12:19:59+00:00

Hope there are some GLKViewController experts out there because I have some problems :)

  • 0

Hope there are some GLKViewController experts out there because I have some problems 🙂

Just a quick description of my app. I have a UINavigationController in which I push different screens.

At some point, I get to my game screen which is a subclass of UINavigationController. In this screen, in viewDidLoad I manually create a EAGLContext, GLKView and instantiate a new GLKViewController (to handle my update&draw calls).

I am setting a preferred fps of 30.

The problem is that the first 3-4 update calls come with the correct DT, but then I have 2-3 frames with 1 second between them. I measure the DT using controller.timeSinceLastUpdate.
So I get like:

dt=0.33
dt=0.33
dt=0.33
dt=1.07
dt=1.05
dt=0.33
dt=0.33

After this, I get valid only DT times. I have no idea why those frames have that kind of delay. I measured the time it takes me in the update & draw method, and it’s nowhere near 1 second.

Also, I’m not loading any textures/creating any geometry. Everything is done at loading since it is a rather small game.

Also, if I pop the game screen controller and then push back another instance of the game screen, this new GLKViewController will only call my update method aproximately every 1 second.

Did anybody have a problem with the framerate when using GLKViewController?

Thanks,

  • 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-05-26T12:20:00+00:00Added an answer on May 26, 2026 at 12:20 pm

    Ok, so I finally figured it out. It turns out that it’s not even related to the GLKViewController (surprise surprise!).

    It had something to do with the way I’m displaying the game screen view controller, like this:

        GameAreaViewController* gameController = [[GameAreaViewController alloc] init];
    
        [UIView beginAnimations:@"animation" context:nil];
        [self.navigationController pushViewController: gameController animated:NO]; 
        [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; 
        [UIView setAnimationDuration:0.7f];
        [UIView commitAnimations];        
    
        SAFE_DEL(gameController);
    

    If I use an animation duration of 0.3f, then I don’t get any lag. At 0.5f sometimes I get it and at 0.7 I was always getting it.

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

Sidebar

Related Questions

I have quick question about jQuery plugins, hope somebody out there has some advice.
I hope someone out there can shed some light on the topic of creating
I have a simple question about Java's XML API and I hope there's a
I hope this is a simple enough question for any SQL people out there...
I have some inlines in one of my admin models which have default values
I have some application, which makes database requests. I guess it doesn't actually matter,
I'm new to the flex, so i hope there will be some simple explanation.
Are there some libraries with C API to draw pictures? Just like the library
I hope there's a SharePoint expert here on SO who can help with this.
I hope there's someone who can help me suggest a suitable data model to

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.