From kde-kimageshop Fri Apr 25 09:43:44 2014 From: Dmitry Kazakov Date: Fri, 25 Apr 2014 09:43:44 +0000 To: kde-kimageshop Subject: [calligra/krita-testing-kazakov] krita/plugins/extensions/dockers/lut: Fix crash when switching from Message-Id: X-MARC-Message: https://marc.info/?l=kde-kimageshop&m=139841904127571 Git commit 1716b8228259caa89627ab25ea17a37a6d786817 by Dmitry Kazakov. Committed on 25/04/2014 at 09:43. Pushed by dkazakov into branch 'krita-testing-kazakov'. Fix crash when switching from QPainter to openGL canvas for the first time Yeah, openGL context whould be initialized first. WARNING: There is a a small bug still. When switching for the first time, the first three changes of the Display Exposure make the canvas contain garbage, after that, everything starts working fine. I don't know, what it is related to. I didn't spend time on that, because it happens *only* when switching QPainter->openGL for the first time during a single run of Krita. CCMAIL:kimageshop@kde.org M +2 -0 krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp http://commits.kde.org/calligra/1716b8228259caa89627ab25ea17a37a6d786817 diff --git a/krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp b/krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp index f14084f..66702db 100644 --- a/krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp +++ b/krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp @@ -224,6 +224,8 @@ void OcioDisplayFilter::updateProcessor() KisConfig cfg; if (!cfg.useOpenGL()) return; + KisOpenGL::initialMakeContextCurrent(); + if (m_lut3d.size() == 0) { //qDebug() << "generating lut"; glGenTextures(1, &m_lut3dTexID); _______________________________________________ Krita mailing list kimageshop@kde.org https://mail.kde.org/mailman/listinfo/kimageshop