summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@drexel.edu>2009-10-01 19:59:26 (GMT)
committer Don Pellegrino <don@drexel.edu>2009-10-01 19:59:26 (GMT)
commit43539767e29f8d729b7f8e1ff6211902ddbc4b1a (patch) (unidiff)
treec7bef134f84b450dda2f5860c856221601c4afce
parent8c8aabdaf01cc1cc8e64536f15f3b26b75d11ab2 (diff)
downloadexp005-43539767e29f8d729b7f8e1ff6211902ddbc4b1a.zip
exp005-43539767e29f8d729b7f8e1ff6211902ddbc4b1a.tar.gz
exp005-43539767e29f8d729b7f8e1ff6211902ddbc4b1a.tar.bz2
Added a constant so that the call to glGenBuffers matches the number
of buffer objects used in the state structure.
-rw-r--r--src/model/data/base.sqc2
-rw-r--r--src/model/state/state.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/model/data/base.sqc b/src/model/data/base.sqc
index 41a651c..4627bea 100644
--- a/src/model/data/base.sqc
+++ b/src/model/data/base.sqc
@@ -169,7 +169,7 @@ base (void)
169 v++;169 v++;
170 }170 }
171171
172 glGenBuffers (2, S.buffers);172 glGenBuffers (NUM_BUFFERS, S.buffers);
173173
174 glBindBuffer (GL_ARRAY_BUFFER, S.buffers[BASE_VERTICES]);174 glBindBuffer (GL_ARRAY_BUFFER, S.buffers[BASE_VERTICES]);
175 glVertexPointer (2, GL_FLOAT, 0, 0);175 glVertexPointer (2, GL_FLOAT, 0, 0);
diff --git a/src/model/state/state.h b/src/model/state/state.h
index ba6d7ab..b18dc5b 100644
--- a/src/model/state/state.h
+++ b/src/model/state/state.h
@@ -8,6 +8,7 @@
8/*8/*
9 * Buffer object identifiers.9 * Buffer object identifiers.
10 */10 */
11#define NUM_BUFFERS 2
11#define BASE_VERTICES 012#define BASE_VERTICES 0
12#define BASE_COLORS 113#define BASE_COLORS 1
1314
@@ -80,7 +81,7 @@ typedef struct
80 /*81 /*
81 * Buffer objects.82 * Buffer objects.
82 */83 */
83 unsigned int buffers[1];84 unsigned int buffers[NUM_BUFFERS];
8485
85 /*86 /*
86 * GI Identifiers indexed by row. Storage is [rows][20].87 * GI Identifiers indexed by row. Storage is [rows][20].

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.