diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 621428e..1f196f0 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -174,7 +174,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() return 0; } - ClearBuffer(); + // ClearBuffer(); // Return to direct rendering (we were asked only to create a buffer, not switch to one) glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 4668145..5534ffe 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -984,6 +984,9 @@ OPENGL_GAL::OPENGL_TEST::OPENGL_TEST( wxDialog* aParent, OPENGL_GAL* aGal ) : void OPENGL_GAL::OPENGL_TEST::Render( wxPaintEvent& WXUNUSED( aEvent ) ) { + if( !m_parent->IsShown() ) + return; + if( !m_tested ) { m_result = true; // Assume everything is fine, until proven otherwise diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index bfaafed..8af1bea 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -363,6 +363,7 @@ private: public: OPENGL_TEST( wxDialog* aParent, OPENGL_GAL* aGal ); void Render( wxPaintEvent& aEvent ); + inline bool IsTested() const { return m_tested; } inline bool IsOk() const { return m_result && m_tested; } inline std::string GetError() const { return m_error; }