-
Notifications
You must be signed in to change notification settings - Fork 52
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
Feature-Request: Ability to limit FPS #56
Comments
Hey @reformat0r ! Sorry for the late response. The App struct contains some time information.
You can use the delta to calculate your uniforms, or if you want, you can check the init time or the delta to avoid draw to the GPU some frames. |
Nice!
|
I think it's a good idea to provide a way to limit the frames. Let me think about it a little because it's possible to do this with a plugin, but it will need some changes in how the app loop works probably (to be sure that the delta times are right). Said that I think that it's also a good idea to use the delta time to set the values of the uniforms or any other value that creates animation. Just to avoid weird visual glitches if the frame is not always the same. |
This is done in the |
Hey!
The examples update time-dependent uniforms by adding a constant value in each frame.
Since FPS are not limited, on my machine, this results in animations that are way too fast.
Additionally, this leads to the GPU running at full capacity at all times, wasting resources.
Naive solution:
Maybe it'd make sense for the framework to provide the time that has elapsed since starting the program.
The solution above does not cover the case where we fall below expected FPS.
Uniforms should just depend on the time since start to make them independent from FPS anyway.
The text was updated successfully, but these errors were encountered: