aboutsummaryrefslogtreecommitdiff
path: root/src/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/vertex/particle_vertex_buffer.cc4
-rw-r--r--src/buffer/vertex/texture_display_vertex_buffer.cc2
2 files changed, 3 insertions, 3 deletions
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<GLfloat>&& 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);
}
diff --git a/src/buffer/vertex/texture_display_vertex_buffer.cc b/src/buffer/vertex/texture_display_vertex_buffer.cc
index 005ea76..d7efc73 100644
--- a/src/buffer/vertex/texture_display_vertex_buffer.cc
+++ b/src/buffer/vertex/texture_display_vertex_buffer.cc
@@ -19,7 +19,7 @@ TextureDisplayVertexBuffer::TextureDisplayVertexBuffer():
GL_ARRAY_BUFFER,
_data.size() * sizeof(GLfloat),
_data.data(),
- GL_STATIC_DRAW
+ GL_DYNAMIC_DRAW
);
glEnableVertexAttribArray(0);