Jump to content

[C++][OpenGL][GLFW] Consistent average framerate but inconsistent frame times in borderless fullscreen

DarkSkela

I am currently working on a game project for Uni, which is written in C++ using OpenGL 4.6 and GLFW. Recently, after looking at the frame times I am getting, I've noticed something peculiar.
When the game is running in windowed mode, I get very consistent frametimes around 6.9ms which coincides with my monitors refresh rate of 144Hz. However if the window is then set to borderless fullscreen mode, the frame times I am getting move more into a 1:2 ratio over two frames, where the first frame might take around 3.45ms and the second 10.35ms. When I average the frametimes of both window settings over a second, I still get to 144 FPS on both, so this doesn't break the user experience of the program, but I'm still perplexed as to what could cause this inconsistency. I think I can pretty much discount performance problems with the rendering, as using a maximised window doesn't lead to inconsistent frame times, only borderless fullscreen does. I'm currently on Windows 11 and am using a G-SYNC monitor and NVIDIA GPU in case that has some impact on things.

 

Thanks in advance for any insight you can give.

Link to comment
Share on other sites

Link to post
Share on other sites

How are you measuring this exactly? I have no idea about why this would happen but measuring time is genuinely difficult to do accurately. 

Link to comment
Share on other sites

Link to post
Share on other sites

Aside from the possibility of this being a measuring artifact, consider that opengl4.6 was released 7 years ago and opengl as a whole is no longer in active development, so it's possible this is just a matter of imperfect compatibility with windows 11.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Sauron said:

Aside from the possibility of this being a measuring artifact, consider that opengl4.6 was released 7 years ago and opengl as a whole is no longer in active development, so it's possible this is just a matter of imperfect compatibility with windows 11.

Seconding this, I would suggest using opengl 5.0 AKA Vulkan.

 

For a bit of context, AMD launched Mantle to address the shortcomings to opengl 4 and afterwards gave the code away to khronos group (the group behind opengl). Much of their Mantle team also transferred over and vulkan was born as the successor to opengl 4

This is a signature.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×