only paint layer if it has data

refs #184
This commit is contained in:
Konstantin Käfer
2014-05-12 19:08:59 +02:00
parent 2a3377cc4d
commit 2b14579986
19 changed files with 50 additions and 25 deletions

View File

@@ -18,6 +18,10 @@ void DebugBucket::render(Painter& painter, const std::string& /*layer_name*/, co
painter.renderDebugText(*this);
}
bool DebugBucket::hasData() const {
return fontBuffer.index() > 0;
}
void DebugBucket::drawLines(PlainShader& shader) {
array.bind(shader, fontBuffer, BUFFER_OFFSET(0));
glDrawArrays(GL_LINES, 0, (GLsizei)(fontBuffer.index()));