From 8e28a942f93a35fbe1a93361a8cd6039bdf5ddc2 Mon Sep 17 00:00:00 2001 From: Jonathan Marler Date: Fri, 4 Apr 2025 09:28:27 -0600 Subject: [PATCH] [rcore][win32] use SwapBuffers instead of wglSwapLayerBuffers I don't understand OpenGL well enough to know the difference between SwapBuffers and wglSwapLayerBuffers but the former seems to double my FPS (from 2000 to about 4000 in core_vr_simulator). --- src/platforms/rcore_desktop_win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index ef790f655..f24f51e41 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -1435,8 +1435,8 @@ void DisableCursor(void) void SwapScreenBuffer(void) { if (!global_hdc) abort(); - if (!wglSwapLayerBuffers(global_hdc, WGL_SWAP_MAIN_PLANE)) { - LogFail("wglSwapLayerBuffers", GetLastError()); + if (!SwapBuffers(global_hdc)) { + LogFail("SwapBuffers", GetLastError()); abort(); } }