[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).
This commit is contained in:
Jonathan Marler 2025-04-04 09:28:27 -06:00
parent 69a1a0d6fd
commit 8e28a942f9

View File

@ -1435,8 +1435,8 @@ void DisableCursor(void)
void SwapScreenBuffer(void) void SwapScreenBuffer(void)
{ {
if (!global_hdc) abort(); if (!global_hdc) abort();
if (!wglSwapLayerBuffers(global_hdc, WGL_SWAP_MAIN_PLANE)) { if (!SwapBuffers(global_hdc)) {
LogFail("wglSwapLayerBuffers", GetLastError()); LogFail("SwapBuffers", GetLastError());
abort(); abort();
} }
} }