瀏覽代碼

[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).
Jonathan Marler 2 週之前
父節點
當前提交
d7f16b6cc4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/platforms/rcore_desktop_win32.c

+ 2
- 2
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();
}
}

Loading…
取消
儲存