summaryrefslogtreecommitdiff
path: root/bulletpattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bulletpattern.cpp')
-rw-r--r--bulletpattern.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/bulletpattern.cpp b/bulletpattern.cpp
index 1e8da5e..a2504f9 100644
--- a/bulletpattern.cpp
+++ b/bulletpattern.cpp
@@ -7,7 +7,8 @@
#include "bulletpattern.h"
BulletPattern::BulletPattern() {
- num_bullets = 0;
+ num_bullets = stride = color_g = color_b = 0;
+ color_r = 1;
bullets = new float[2048];
int k = 0;
@@ -33,10 +34,10 @@ void BulletPattern::update(unsigned int time, unsigned int step) {
void BulletPattern::draw() {
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(4, GL_FLOAT, 4 * sizeof(float), bullets);
+ glVertexPointer(4, GL_FLOAT, 4 * sizeof(float) + stride, bullets);
glDrawArrays(GL_POINTS, 0, num_bullets);
glDisableClientState(GL_VERTEX_ARRAY);
-} \ No newline at end of file
+}