You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GLFW 3.3.8-1
Raspberry Pi 5.
Raspberry Pi OS: Linux raspberrypi 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
Windowing: Wayland
My monitors native resolution is 1920 x 1200. If I make a window that is just not full screen (1920, 1180) and then repeatedly call glfwSwapBuffers() with no kind of rendering and time how long between buffer swaps, I get about 0.2 milliseconds, i.e. 5000 FPS
However, if I make the window full screen, and perform the same test I get a handful of frames with a 0.2 inter-frame time. Then it drops to 33.3 millisecond (which is very curiously, almost exactly 2 refreshes), i.e. 30 FPS
I appreciate I am on some atypical hardware, so I'm happy to try to look into anything.
My test code is as follows:
#include<stdio.h>#include<GLFW/glfw3.h>#include<sys/time.h>structtimevaltv;
unsigned longframeCount=0,
time_in_micros,
oldTime;
intmain(void) {
glfwInit();
GLFWmonitor*primaryMonitor=glfwGetPrimaryMonitor();
constGLFWvidmode*mode=glfwGetVideoMode(primaryMonitor);
//glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate); //This makes no difference//Swapping between these two versions are what causes problems.//GLFWwindow* window = glfwCreateWindow(1920, 1180, "My Title", NULL, NULL);GLFWwindow*window=glfwCreateWindow(1920, 1200, "My Title", primaryMonitor, NULL);
glfwMakeContextCurrent(window);
glfwSwapInterval(0);
while (!glfwWindowShouldClose(window)) {
frameCount++;
glfwSwapBuffers(window);
if (frameCount % 10==0) {
oldTime=time_in_micros;
gettimeofday(&tv,NULL);
time_in_micros=1000000*tv.tv_sec+tv.tv_usec;
printf("Interframe time is %f\n", (float)(time_in_micros-oldTime)/10000);
}
}
glfwTerminate();
return0;
}
The text was updated successfully, but these errors were encountered:
GLFW 3.3.8-1
Raspberry Pi 5.
Raspberry Pi OS: Linux raspberrypi 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
Windowing: Wayland
My monitors native resolution is 1920 x 1200. If I make a window that is just not full screen (1920, 1180) and then repeatedly call glfwSwapBuffers() with no kind of rendering and time how long between buffer swaps, I get about 0.2 milliseconds, i.e. 5000 FPS
However, if I make the window full screen, and perform the same test I get a handful of frames with a 0.2 inter-frame time. Then it drops to 33.3 millisecond (which is very curiously, almost exactly 2 refreshes), i.e. 30 FPS
I appreciate I am on some atypical hardware, so I'm happy to try to look into anything.
My test code is as follows:
The text was updated successfully, but these errors were encountered: