Not fixed at 60fps for glfw apps

anonymous wrote on Monday, April 16, 2012:

I would like not to fix my game integrating with glfw to 60 fps or any values
automatically set in glfw.

How can I do that ?


What’s the default time interval (in ms or secs) for swap buffer to be
processed (or content drew on screen)?

To be more elaborate on this, please see my situation below.
In glut, I implemented my own timing system which hooks up call to
update/render function if the time is right, so I can restrict fps for my game
say 30fps, or non-fixed at all. In addition, I’ve experimented with glfw and
found that glfw already restricted or targeted fps at 60 automatically (but
not sure whether it’s always at 60 fps or not) so I have to set my timing
system to non-fixed timestep to allow glfw to cap it outside of my system. If
I set my timing system to be fixed timestep then the app will be double slow
in time because it’s capped by glfw and my own timing system.

anonymous wrote on Monday, April 16, 2012:

(may not relavant here)
In addition, I have tested with glfwSwapInterval(0) and enabled fixed-mode
in my timing system. Things go as expect, I can restrict it to says 30 fps or
60 fps. But the smooth is only on window mode. When I go into fullscreen mode,
I saw tear of polygon and non-sync, and jittering. I guess it’s because I set
glfwSwapInterval(0) so no v-sync.

So additional question (sorry for popping up a new question inside my own
again, but I think it relates and should be in continuing) -> How can I
prevent those tear / unsync / jittering but allowing the software or hardware
to as fast as possible render its content with glfwSwapInterval(0) ?

elmindreda wrote on Monday, April 16, 2012:

You cannot both disable vsync and avoid tearing. Synchronising to the
display’s refresh rate is what allows tear-free output.

anonymous wrote on Monday, April 16, 2012:

@elmindreda, thanks for your reply. I finally found out that the (too much)
tearing / unsynced / jittering are affected from my own timing system. After
fixed it, result is nice both in window and full screen. It works as expected
now. GLFW just works fine.

Thanks !