add cleanup call for destroying framebuffers

This commit is contained in:
Konstantin Käfer
2014-05-22 12:41:17 +02:00
parent 5bf52bfcd7
commit 67ab9ff6f5
4 changed files with 34 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ Painter::Painter(Map &map)
}
Painter::~Painter() {
clearFramebuffers();
cleanup();
}
bool Painter::needsAnimation() const {
@@ -75,6 +75,10 @@ void Painter::setupShaders() {
compositeShader = std::make_unique<CompositeShader>();
}
void Painter::cleanup() {
clearFramebuffers();
}
void Painter::resize() {
const TransformState &state = map.getState();
if (gl_viewport != state.getFramebufferDimensions()) {