[Bf-blender-cvs] [a123fc9e224] master: GHOST/EGL: Only draw grey into buffers attached to windows

Campbell Barton noreply at git.blender.org
Wed Aug 17 08:22:49 CEST 2022


Commit: a123fc9e224a3b379ddd0e587aa72859f783b130
Author: Campbell Barton
Date:   Wed Aug 17 16:21:13 2022 +1000
Branches: master
https://developer.blender.org/rBa123fc9e224a3b379ddd0e587aa72859f783b130

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

Avoid redundant drawing, match GHOST/GLX behavior.

===================================================================

M	intern/ghost/intern/GHOST_ContextEGL.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextEGL.cpp b/intern/ghost/intern/GHOST_ContextEGL.cpp
index 6de161fda2a..ef13133d3a3 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextEGL.cpp
@@ -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;



More information about the Bf-blender-cvs mailing list