Commit 7f0ac514 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

* Fixed possible OpenGL stack overflow in DataContainerInspectorCanvas.

* Added OpenGL thread guard to image conversions to ImageRepresentationGL.
parent c4cc94ba
......@@ -167,16 +167,16 @@ namespace campvis {
_geometriesDirty = false;
}
if (_textures.empty()) {
return;
}
glPushAttrib(GL_ALL_ATTRIB_BITS);
glViewport(0, 0, size_.x, size_.y);
glClearColor(0.7f, 0.7f, 0.7f, 1.f);
glClear(GL_COLOR_BUFFER_BIT);
LGL_ERROR;
if (_textures.empty()) {
return;
}
// update layout dimensions
_numTiles.x = ceil(sqrt(static_cast<float>(_textures.size())));
_numTiles.y = ceil(static_cast<float>(_textures.size()) / _numTiles.x);
......
......@@ -46,6 +46,7 @@ namespace campvis {
return nullptr;
}
OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
ImageRepresentationGL* toReturn = ImageRepresentationGL::create(const_cast<ImageData*>(tester->getParent()), wtp);
switch (wtp._baseType) {
......@@ -78,6 +79,7 @@ namespace campvis {
return toReturn;
}
else if (const ImageRepresentationLocal* tester = dynamic_cast<const ImageRepresentationLocal*>(source)) {
OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
ImageRepresentationGL* toReturn = ImageRepresentationGL::create(const_cast<ImageData*>(tester->getParent()), tester->getWeaklyTypedPointer());
return toReturn;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment