Skip to content

Commit 8e28a94

Browse files
committed
[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).
1 parent 69a1a0d commit 8e28a94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platforms/rcore_desktop_win32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,8 @@ void DisableCursor(void)
14351435
void SwapScreenBuffer(void)
14361436
{
14371437
if (!global_hdc) abort();
1438-
if (!wglSwapLayerBuffers(global_hdc, WGL_SWAP_MAIN_PLANE)) {
1439-
LogFail("wglSwapLayerBuffers", GetLastError());
1438+
if (!SwapBuffers(global_hdc)) {
1439+
LogFail("SwapBuffers", GetLastError());
14401440
abort();
14411441
}
14421442
}

0 commit comments

Comments
 (0)