From 073c94d948f2500a5333df9649dd3b7ffce94948 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Sat, 16 Sep 2023 19:47:05 +0200 Subject: [PATCH] [Windows, vsync] quick workaround for gles stutters on Windows: revert to doing a single blocking present on debug overlay --- src/runtime.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/runtime.c b/src/runtime.c index 9d2d3d7..176a6f7 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -230,7 +230,7 @@ i32 orca_surface_callback(void* user) data->surface = oc_surface_create_for_window(data->window, data->api); #if OC_PLATFORM_WINDOWS - //NOTE(martin): on windows we set all surfaces to non-synced, and do a single "manual" wait here. + //NOTE(martin): on windows we set all user surfaces to non-synced, and do a single wait on the debug overlay. // on macOS each surface is individually synced to the monitor refresh rate but don't block each other oc_surface_swap_interval(data->surface, 0); #endif @@ -892,12 +892,6 @@ i32 orca_runloop(void* user) oc_surface_present(app->debugOverlay.surface); oc_scratch_end(scratch); - -#if OC_PLATFORM_WINDOWS - //NOTE(martin): on windows we set all surfaces to non-synced, and do a single "manual" wait here. - // on macOS each surface is individually synced to the monitor refresh rate but don't block each other - oc_vsync_wait(app->window); -#endif } if(exports[OC_EXPORT_TERMINATE]) @@ -935,13 +929,7 @@ int main(int argc, char** argv) app->debugOverlay.maxEntries = 200; oc_arena_init(&app->debugOverlay.logArena); -#if OC_PLATFORM_WINDOWS - //NOTE(martin): on windows we set all surfaces to non-synced, and do a single "manual" wait here. - // on macOS each surface is individually synced to the monitor refresh rate but don't block each other - oc_surface_swap_interval(app->debugOverlay.surface, 0); -#else oc_surface_swap_interval(app->debugOverlay.surface, 1); -#endif oc_surface_deselect();