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 167257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:14:35+00:00 2026-05-11T12:14:35+00:00

This is what happens: The drawGL function is called at the exact end of

  • 0

This is what happens:

  • The drawGL function is called at the exact end of the frame thanks to a usleep, as suggested. This already maintains a steady framerate.

  • The actual presentation of the renderbuffer takes place with drawGL(). Measuring the time it takes to do this, gives me fluctuating execution times, resulting in a stutter in my animation. This timer uses mach_absolute_time so it’s extremely accurate.

  • At the end of my frame, I measure timeDifference. Yes, it’s on average 1 millisecond, but it deviates a lot, ranging from 0.8 milliseconds to 1.2 with peaks of up to more than 2 milliseconds.

Example:

// Every something of a second I call tick -(void)tick {   drawGL();  }  - (void)drawGL {      // startTime using mach_absolute_time;    glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);    [context presentRenderbuffer:GL_RENDERBUFFER_OES];   // endTime using mach_absolute_time;  // timeDifference = endTime - startTime; } 

My understanding is that once the framebuffer has been created, presenting the renderbuffer should always take the same effort, regardless of the complexity of the frame? Is this true? And if not, how can I prevent this?

By the way, this is an example for an iPhone app. So we’re talking OpenGL ES here, though I don’t think it’s a platform specific problem. If it is, than what is going on? And shouldn’t this be not happening? And again, if so, how can I prevent this from happening?

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

    The deviations you encounter maybe be caused by a lot of factors, including OS scheduler that kicks in and gives cpu to another process or similar issues. In fact normal human won’t tell a difference between 1 and 2 ms render times. Motion pictures run at 25 fps, which means each frame is shown for roughly 40ms and it looks fluid for human eye.

    As for animation stuttering you should examine how you maintain constant animation speed. Most common approach I’ve seen looks roughly like this:

    while(loop) {   lastFrameTime; // time it took for last frame to render   timeSinceLastUpdate+= lastFrameTime;    if(timeSinceLastUpdate > (1 second / DESIRED_UPDATES_PER_SECOND))   {      updateAnimation(timeSinceLastUpdate);      timeSinceLastUpdate = 0;   }    // do the drawing    presentScene(); } 

    Or you could just pass lastFrameTime to updateAnimation every frame and interpolate between animation states. The result will be even more fluid.

    If you’re already using something like the above, maybe you should look for culprits in other parts of your render loop. In Direct3D the costly things were calls for drawing primitives and changing render states, so you might want to check around OpenGL analogues of those.

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

Sidebar

Ask A Question

Stats

  • Questions 121k
  • Answers 121k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer x = m - abs(i % (2*m) - m) May 12, 2026 at 12:21 am
  • Editorial Team
    Editorial Team added an answer this.dataGridView1.Sort(dataGridView1.Columns["DateTime"], ListSortDirection.Ascending); May 12, 2026 at 12:21 am
  • Editorial Team
    Editorial Team added an answer file_put_contents("filelist.txt", ""); You can redirect by using the header() function… May 12, 2026 at 12:21 am

Related Questions

I've read a bunch of tutorials about the proper way to generate a logarithmic
I am using the JQuery Form Plugin , the JQuery validation plugin and the
I want to render something like this in firefox <div style=float:left> Row1,Column1 </div> <div>
I'm trying to open and read from a serial port using the System.IO.Ports.SerialPort class.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.