(Android) Fixed an issue where random garbage was sometimes briefly rendered on application startup

This commit is contained in:
Leon Styhre 2023-12-23 10:59:44 +01:00
parent 5fcf2ea49a
commit 3310b23b6f

View file

@ -305,10 +305,12 @@ bool Renderer::createWindow()
setIcon();
setSwapInterval();
#if defined(_WIN64)
#if defined(_WIN64) || defined(__ANDROID__)
// It seems as if Windows needs this to avoid a brief white screen flash on startup.
// Possibly this is driver-specific rather than OS-specific. There is additional code
// in init() to work around the white screen flash issue on all operating systems.
// On Android the swap is also necessary to avoid displaying random garbage when
// the rendering starts.
swapBuffers();
#endif