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
When compiling with the SDL platform, removing/not using SetTargetFPS does not seem to really work: framerate is actually matching the screen refresh rate.
Take any example, just remove SetTargetFPS(60)
Then right after BeginDrawing(), add DrawFPS(10, 10);
When doing this with the GLFW platform, you basically get unlocked/uncapped framerate: in my case it can be more than 10000-20000 FPS depending on the example.
When doing this exact same thing, but with SDL platform, I get 115-120 FPS, which is really close to my screen refresh rate (120 HZ).
Environment
Ubuntu 23.10 x86_64 under Gnome
AMD Ryzen 9 7900 + AMD Radeon 5700XT
SDL Platform
Issue Screenshot
With GLFW platform
With SDL platform
Code Example
Just take for instance textures_image_loading.c
Comment out SetTargetFPS
Add DrawFPS
Build first with GLFW, then with SDL
Observe completely different framerate
The text was updated successfully, but these errors were encountered:
mpalomas
changed the title
[core] uncapped framerate not working properly with SDL platform
[rcore] uncapped framerate not working properly with SDL platform
May 15, 2024
Strange indeed. No expert but I know that when using OpenGL, SDL controls vsync with https://wiki.libsdl.org/SDL2/SDL_GL_SetSwapInterval
As you can see, 0 means immediate, 1 is vsync. Need to look at the platform implementation, will try spend time this evening.
Please, before submitting a new issue verify and check:
Issue description
(this is on latest master commit)
When compiling with the SDL platform, removing/not using SetTargetFPS does not seem to really work: framerate is actually matching the screen refresh rate.
When doing this with the GLFW platform, you basically get unlocked/uncapped framerate: in my case it can be more than 10000-20000 FPS depending on the example.
When doing this exact same thing, but with SDL platform, I get 115-120 FPS, which is really close to my screen refresh rate (120 HZ).
Environment
Issue Screenshot
With GLFW platform
With SDL platform
Code Example
The text was updated successfully, but these errors were encountered: