diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -363,12 +363,8 @@ } } -static SceneOpenGL *gs_debuggedScene = nullptr; SceneOpenGL::~SceneOpenGL() { - // do cleanup after initBuffer() - gs_debuggedScene = nullptr; - if (init_ok) { makeOpenGLContextCurrent(); } @@ -380,23 +376,6 @@ delete m_backend; } -static void scheduleVboReInit() -{ - if (!gs_debuggedScene) - return; - - static QPointer timer; - if (!timer) { - delete timer; - timer = new QTimer(gs_debuggedScene); - timer->setSingleShot(true); - QObject::connect(timer.data(), &QTimer::timeout, gs_debuggedScene, []() { - GLVertexBuffer::cleanup(); - GLVertexBuffer::initStatic(); - }); - } - timer->start(250); -} void SceneOpenGL::initDebugOutput() { @@ -424,8 +403,6 @@ } } - gs_debuggedScene = this; - // Set the callback function auto callback = [](GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, @@ -444,14 +421,6 @@ break; case GL_DEBUG_TYPE_OTHER: - // at least the nvidia driver seems prone to end up with invalid VBOs after - // transferring them between system heap and VRAM - // so we re-init them whenever this happens (typically when switching VT, resuming - // from STR and XRandR events - #344326 - if (strstr(message, "Buffer detailed info:") && strstr(message, "has been updated")) - scheduleVboReInit(); - // fall through! for general message printing - Q_FALLTHROUGH(); case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: case GL_DEBUG_TYPE_PORTABILITY: case GL_DEBUG_TYPE_PERFORMANCE: