summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/drawer.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-12-09 10:49:49 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-12-10 09:01:45 +0200
commit3573055abe42ff283d011d8550bc8495156338a1 (patch)
treebb45d4f7e32a0c63329d9f52639081162b34e17e /src/datavisualization/engine/drawer.cpp
parent22557b312570cbefde584466a28f2b9bfcc570ba (diff)
Move series specific visual elements to series, part 4
Colors to series - Multiselection labels in bar slices still buggy - Selection in bars doesn't work correctly if not all series have items in that grid Task-number: QTRD-2557 Change-Id: Icd38428e5337a26b8410476104bb1f1f784cdc7f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/drawer.cpp')
-rw-r--r--src/datavisualization/engine/drawer.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index f88b1f49..14f0b315 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -148,10 +148,14 @@ void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLui
glDisableVertexAttribArray(shader->posAtt());
// Release textures
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, 0);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, 0);
+ if (depthTextureId) {
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ }
+ if (textureId) {
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ }
}
void Drawer::drawSurfaceGrid(ShaderHelper *shader, SurfaceObject *object)