W
W
wolf-98302014-03-13 14:14:07
C++ / C#
wolf-9830, 2014-03-13 14:14:07

How do I know the FPS in my application?

Hello, dear users of the site toster.ru. I have a question, how to calculate the FPS of my application and limit it (using C++ and SDL2)?
Please do not just give the code, but explain how it works.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
Codebaker, 2014-03-13
@wolf-9830

In this video tutorial (in broken English) the author explains how to control FPS in SDL. With sources.

N
Nikita Gusakov, 2014-03-13
@hell0w0rd

Or maybe even dance?
Write how you suppose it can be done, what did not work out - and they will help you!

N
nicolausYes, 2014-03-13
@nicolausYes

The simplest thing is to draw by time. Start a timer that knows when to draw next time, ask it with some frequency if the time to draw has come, if yes - draw and set the next timestamp, if not - do nothing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question