summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/drawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/drawer.cpp')
-rw-r--r--src/datavisualization/engine/drawer.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index b3b0fe99..e2ed6748 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -117,12 +117,10 @@ void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLui
glBindBuffer(GL_ARRAY_BUFFER, object->normalBuf());
glVertexAttribPointer(shader->normalAtt(), 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
- if (textureId || depthTextureId) {
- // 3rd attribute buffer : UVs
- glEnableVertexAttribArray(shader->uvAtt());
- glBindBuffer(GL_ARRAY_BUFFER, object->uvBuf());
- glVertexAttribPointer(shader->uvAtt(), 2, GL_FLOAT, GL_FALSE, 0, (void*)0);
- }
+ // 3rd attribute buffer : UVs
+ glEnableVertexAttribArray(shader->uvAtt());
+ glBindBuffer(GL_ARRAY_BUFFER, object->uvBuf());
+ glVertexAttribPointer(shader->uvAtt(), 2, GL_FLOAT, GL_FALSE, 0, (void*)0);
// Index buffer
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, object->elementBuf());
@@ -134,9 +132,7 @@ void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLui
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- if (textureId || depthTextureId)
- glDisableVertexAttribArray(shader->uvAtt());
-
+ glDisableVertexAttribArray(shader->uvAtt());
glDisableVertexAttribArray(shader->normalAtt());
glDisableVertexAttribArray(shader->posAtt());