From 43539767e29f8d729b7f8e1ff6211902ddbc4b1a Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Thu, 01 Oct 2009 19:59:26 +0000 Subject: Added a constant so that the call to glGenBuffers matches the number of buffer objects used in the state structure. --- 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) v++; } - glGenBuffers (2, S.buffers); + glGenBuffers (NUM_BUFFERS, S.buffers); glBindBuffer (GL_ARRAY_BUFFER, S.buffers[BASE_VERTICES]); 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 @@ /* * Buffer object identifiers. */ +#define NUM_BUFFERS 2 #define BASE_VERTICES 0 #define BASE_COLORS 1 @@ -80,7 +81,7 @@ typedef struct /* * Buffer objects. */ - unsigned int buffers[1]; + unsigned int buffers[NUM_BUFFERS]; /* * GI Identifiers indexed by row. Storage is [rows][20]. -- cgit v0.8.3.1-22-g547a