Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPS drift in Linux port #5

Open
GoogleCodeExporter opened this issue Apr 7, 2015 · 0 comments
Open

FPS drift in Linux port #5

GoogleCodeExporter opened this issue Apr 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run any example
2. wait for a minute
3. read console output

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
svn rev 58

Please provide any additional information below.

The time counter in the fps calculations will drift over time because of a 
subtraction instead of a reset on line 318 of LinuxX11/Common/esUtil.c

This means that even simple examples like the Hello triangle will report a 
framerate that keeps decreasing until the timer comparison rolls over and 
everything starts over. It is only visible when running with vsync enabled or 
at a low framerate (intel driver has vsync turned on by default). If running 
with vsync the accumulated error in totaltime grows until it is > 1 frame time, 
at which point the fps report will trigger one frame early and the whole 
process begins anew.

I've attached a patch that fixes the problem.

Original issue reported on code.google.com by [email protected] on 3 Mar 2012 at 7:04

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant