From 37f9432feed87226bd0f576e16a263be5fb3ebac Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 17 Dec 2018 19:05:51 +0100 Subject: Fix glDrawArray call --- src/buffer/vertex/particle_vertex_buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buffer/vertex/particle_vertex_buffer.cc') diff --git a/src/buffer/vertex/particle_vertex_buffer.cc b/src/buffer/vertex/particle_vertex_buffer.cc index fc61cc5..3f755dc 100644 --- a/src/buffer/vertex/particle_vertex_buffer.cc +++ b/src/buffer/vertex/particle_vertex_buffer.cc @@ -11,7 +11,7 @@ ParticleVertexBuffer::ParticleVertexBuffer(std::vector&& data): GL_ARRAY_BUFFER, _data.size() * sizeof(GLfloat), _data.data(), - GL_STATIC_DRAW + GL_DYNAMIC_DRAW ); glEnableVertexAttribArray(0); @@ -29,5 +29,5 @@ GLuint ParticleVertexBuffer::getBuffer() const { void ParticleVertexBuffer::draw() const { glBindVertexArray(_array); - glDrawArrays(GL_POINTS, 0, 3*_data.size()); + glDrawArrays(GL_POINTS, 0, _data.size()/3); } -- cgit v1.2.3