GHOST/EGL: Only draw grey into buffers attached to windows

Avoid redundant drawing, match GHOST/GLX behavior.
This commit is contained in:
Campbell Barton 2022-08-17 16:21:13 +10:00
parent b1d3097fa9
commit a123fc9e22
1 changed files with 4 additions and 2 deletions

View File

@ -582,8 +582,10 @@ GHOST_TSuccess GHOST_ContextEGL::initializeDrawingContext()
goto error;
}
initClearGL();
::eglSwapBuffers(m_display, m_surface);
if (m_nativeWindow != 0) {
initClearGL();
::eglSwapBuffers(m_display, m_surface);
}
return GHOST_kSuccess;