I’m trying to combine GTK with OpenGL and I could use some help with an issue I’m seeing.
I’m using a 120Hz screen but I’m struggling to reach 120 fps (or exceed 60fps for that matter) in my
GtkGLArea code. I’d like to get continuous rendering at full refresh rate.
Here’s the minimal sample which demonstrates my issue:
My results from the program are:
- GTK 3 on X11:
278 ticks in 4.623727 = 60.124657 FPS
- GTK 4 on X11:
424 ticks in 7.062998 = 60.031165 FPS
- GTK 3 on Wayland (
299 ticks in 4.979353 = 60.047962 FPS
- GTK 4 on Wayland (
598 ticks in 4.977516 = 120.140247 FPS
I’m only able to reach 120fps using GTK4 under Wayland. Why not in other configurations? Am I doing something wrong?
My screen is properly configured for high refresh rate. I can get 120fps in
What am I missing?