diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 19:25:46 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 19:25:46 -0500 |
commit | 4113375f1f0f6d3a807c1edd843e96596ee6e2c5 (patch) | |
tree | 3fc4abd08626f1f094fc313d473249f9e15212a2 | |
parent | bc1b905273c8b95a00ae6f5d17042eefae6a7be9 (diff) |
testing for glGetBooleanv
-rw-r--r-- | tests/cubegeom.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/cubegeom.c b/tests/cubegeom.c index 6158b124..787b8373 100644 --- a/tests/cubegeom.c +++ b/tests/cubegeom.c @@ -45,6 +45,8 @@ void verify() { int main(int argc, char *argv[]) { + int temp; // testing + SDL_Surface *screen; if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) { printf("Unable to initialize SDL: %s\n", SDL_GetError()); @@ -124,7 +126,9 @@ int main(int argc, char *argv[]) glActiveTexture(GL_TEXTURE0); + glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(!temp); glEnableClientState(GL_VERTEX_ARRAY); + glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp); GLuint arrayBuffer, elementBuffer; glGenBuffers(1, &arrayBuffer); @@ -207,7 +211,6 @@ int main(int argc, char *argv[]) glNormalPointer(GL_BYTE, 32, (void*)12); glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28); - int temp; // test glGetPointerv, glGetIntegerv glGetPointerv(GL_VERTEX_ARRAY_POINTER, &temp); assert(temp == 0); glGetPointerv(GL_COLOR_ARRAY_POINTER, &temp); assert(temp == 28); glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &temp); assert(temp == 16); @@ -220,6 +223,7 @@ int main(int argc, char *argv[]) glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &temp); assert(temp == 2); glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &temp); assert(temp == GL_FLOAT); glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &temp); assert(temp == 32); + glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp); glBindTexture(GL_TEXTURE_2D, texture); // diffuse? glActiveTexture(GL_TEXTURE0); |