correctly specify the number of attribute elements

This commit is contained in:
Konstantin Käfer
2014-02-05 12:38:04 +01:00
parent bf916ae1e2
commit e97fcda9f3

View File

@@ -352,9 +352,9 @@ void Painter::renderLine(LineBucket& bucket, const std::string& layer_name, cons
bucket.bind();
char *vertex_index = bucket.vertexOffset();
glVertexAttribPointer(lineShader->a_pos, 4, GL_SHORT, false, 8, vertex_index);
glVertexAttribPointer(lineShader->a_pos, 2, GL_SHORT, false, 8, vertex_index);
glVertexAttribPointer(lineShader->a_extrude, 2, GL_BYTE, false, 8, vertex_index + 6);
glVertexAttribPointer(lineShader->a_linesofar, 2, GL_SHORT, false, 8, vertex_index + 4);
glVertexAttribPointer(lineShader->a_linesofar, 1, GL_SHORT, false, 8, vertex_index + 4);
glDrawArrays(GL_TRIANGLE_STRIP, 0, bucket.size());
if (bucket.geometry.join == JoinType::Round) {