Hello,
basic_window example is taking a 100% of CPU, one whole core is occupied. I tried to use SetConfigFlags(FLAG_VSYNC_HINT) but it doesn't help. This is on Linux with Intel graphic card. Vsync is enabled, I can confirm that with glxgears util.
Now, I noticed that when I have both SetTargetFPS(60) and SetConfigFlags(FLAG_VSYNC_HINT) or just SetTargetFPS(60) CPU usage is 100%. If I disable SetTargetFPS() and enable just SetConfigFlags(FLAG_VSYNC_HINT) then CPU usage drops to 10% and everything works smooth, and all without the sound of CPU cooler :)
Maybe that can help in fixing this issue.
Also, I changed this line in core.c:
while (windowMinimized) glfwPollEvents()
to
while (windowMinimized) glfwWaitEvents()
so when window is minimized CPU usage drops to 0. Is there any reason to poll for events while window is minimized?
Hello,
basic_window example is taking a 100% of CPU, one whole core is occupied. I tried to use SetConfigFlags(FLAG_VSYNC_HINT) but it doesn't help. This is on Linux with Intel graphic card. Vsync is enabled, I can confirm that with glxgears util.
Now, I noticed that when I have both SetTargetFPS(60) and SetConfigFlags(FLAG_VSYNC_HINT) or just SetTargetFPS(60) CPU usage is 100%. If I disable SetTargetFPS() and enable just SetConfigFlags(FLAG_VSYNC_HINT) then CPU usage drops to 10% and everything works smooth, and all without the sound of CPU cooler :)
Maybe that can help in fixing this issue.
Also, I changed this line in core.c:
while (windowMinimized) glfwPollEvents()
to
while (windowMinimized) glfwWaitEvents()
so when window is minimized CPU usage drops to 0. Is there any reason to poll for events while window is minimized?