[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    [calligra/krita-testing-kazakov] krita/plugins/extensions/dockers/lut: Fix crash when switching from
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2014-04-25 9:43:44
Message-ID: E1WdcfY-0006W8-GS () scm ! kde ! org
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic