Limit frame rate to 60 fps on Linux

Started by
11 comments, last by owl 15 years, 9 months ago
Quote:Original post by farofeiro
Where can I find this xrandr lib. owl?


don't. In any case use what swiftcoder said:

SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1)

Eventually, that should work properly on all platforms. But again, do some research on time based gaming, because users can disable vsinc by themselves.

Limit the framerate by only drawing when you want to.
[size="2"]I like the Walrus best.
Advertisement
Quote:Original post by owl
But again, do some research on time based gaming, because users can disable vsinc by themselves. Limit the framerate by only drawing when you want to.
Using vsync to limit game speed is a abortion on anything but a console, but as far as I am concerned, vsync should always be enabled to reduce tearing. I also don't see wasting the cycles to let Quake render 120 fps on my 60hz LCD monitor, when I could be running stuff in the background.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by swiftcoder
Quote:Original post by owl
But again, do some research on time based gaming, because users can disable vsinc by themselves. Limit the framerate by only drawing when you want to.
Using vsync to limit game speed is a abortion on anything but a console, but as far as I am concerned, vsync should always be enabled to reduce tearing. I also don't see wasting the cycles to let Quake render 120 fps on my 60hz LCD monitor, when I could be running stuff in the background.


Agreed on all points. The OP probably wants to do things per frame because it is easier to code.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement