Add a glClear() in GHOST/X11 between creating the GLX context and
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 26 Dec 2011 19:12:13 +0000 (19:12 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 26 Dec 2011 19:12:13 +0000 (19:12 +0000)
displaying the window.

This fixes a brief flash of random data on Blender startup on my
system (Ubuntu 11.10, ATI Mobility Radeon HD 5650, Gallium drivers.)

Code review link:
http://codereview.appspot.com/5505071/

intern/ghost/intern/GHOST_WindowX11.cpp

index d882ae41c9c0aad53c28359d8837d91f4a69ab68..5611644f8f2e8da193746fa3b73a3d911dcc4c06 100644 (file)
@@ -1344,7 +1344,9 @@ installDrawingContext(
                        if (!s_firstContext) {
                                s_firstContext = m_context;
                        }
-                       glXMakeCurrent(m_display, m_window,m_context);                                          
+                       glXMakeCurrent(m_display, m_window,m_context);
+                       glClearColor(0.447, 0.447, 0.447, 0);
+                       glClear(GL_COLOR_BUFFER_BIT);
                        success = GHOST_kSuccess;
                } else {
                        success = GHOST_kFailure;