LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.84k stars 642 forks source link

Why does GLFWVidMode#refreshRate() not round the refresh rate? #999

Closed TCreutzenberg closed 2 months ago

TCreutzenberg commented 3 months ago

Question

Hey,

I have a Monitor with a refresh rate of 59.951Hz.

When I try to retrieve the refresh rate of this monitor with (LWJGL 3.3.3)

GLFWVidMode videoMode = GLFW.glfwGetVideoMode(monitor);
int refreshRate = videoMode.refreshRate();

refreshRate is 59. Shouldn't it round the 59.951Hz and return 60?

If I set the fps of my application (game) to 59 I get a visible stutter on fast moving elements every second which I don't get with 60 fps...

Thank you very much in advance!

Spasi commented 2 months ago

Hey @TCreutzenberg,

This is a known issue.