[Libreoffice-commits] core.git: Branch 'feature/chart_opengl_window' - chart2/source

Zolnai Tamás tamas.zolnai at collabora.com
Mon Aug 25 10:45:31 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 8d06c4c9206ffa07d84249132048f985a5a78f0c
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Mon Aug 25 19:42:55 2014 +0200

    mpRenderer->init() needs a context
    
    Change-Id: I9f6ce17fcc590597f357bf3ded5fe3eb41fb3810

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index cabfe41..c887059 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -455,7 +455,9 @@ GL3DBarChart::GL3DBarChart(
     }
     mpRenderer->SetSize(aSize);
     mpWindow->setRenderer(this);
+    mpWindow->getContext().makeCurrent();
     mpRenderer->init();
+    mpWindow->getContext().resetCurrent();
 }
 
 GL3DBarChart::BarInformation::BarInformation(const glm::vec3& rPos, float nVal,
@@ -944,7 +946,9 @@ void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow)
         Size aSize = mpWindow->GetSizePixel();
         mpRenderer->SetSize(aSize);
         mpWindow->setRenderer(this);
+        mpWindow->getContext().makeCurrent();
         mpRenderer->init();
+        mpWindow->getContext().resetCurrent();
         mbValidContext = true;
     }
 }


More information about the Libreoffice-commits mailing list