Commit 9538173f authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed timing issue in CampVisPainter that led CampVisPainter::paint() being...

Fixed timing issue in CampVisPainter that led CampVisPainter::paint() being called before CampVisPainter::init(). CampVisPainter::paint() now ensures the class (and in particular the shader) to be correctly initialized.

fixes #564
parent 418c5e78
......@@ -63,6 +63,11 @@ namespace campvis {
if (getCanvas() == 0)
return;
if (_copyShader == nullptr) {
LERROR("Shader not initialized!");
return;
}
const tgt::ivec2& size = getCanvas()->getSize();
glViewport(0, 0, size.x, size.y);
......@@ -126,7 +131,7 @@ namespace campvis {
_copyShader->setAttributeLocation(1, "in_TexCoords");
}
catch (tgt::Exception& e) {
LERRORC("main.cpp", "Encountered tgt::Exception: " << e.what());
LFATAL("Encountered tgt::Exception: " << e.what());
}
}
......
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