summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-08-25 19:42:55 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-29 17:40:34 +0200
commitfe20f974cada3e1637e9f40508b6cfda1bc5b7d2 (patch)
tree7a39087aac388d2158ee8a938f2468591fbeaf6c /chart2
parent18ccf4035916b18cdb8145f06c69a04cd7269c43 (diff)
mpRenderer->init() needs a context
Change-Id: I9f6ce17fcc590597f357bf3ded5fe3eb41fb3810
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index e540dbd51d18..11406bfb0402 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -499,7 +499,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,
@@ -1318,7 +1320,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;
}
}