diff --git a/tests/cubegeom.c b/tests/cubegeom.c index 949a1f9aaa726..fac0da2be259f 100644 --- a/tests/cubegeom.c +++ b/tests/cubegeom.c @@ -31,7 +31,10 @@ REDISTRIBUTION OF THIS SOFTWARE. int main(int argc, char *argv[]) { - int temp; // testing + // testing + GLint tempInt; + GLboolean tempBool; + void *tempPtr; SDL_Surface *screen; if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) { @@ -112,9 +115,9 @@ int main(int argc, char *argv[]) glActiveTexture(GL_TEXTURE0); - glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(!temp); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(!tempBool); glEnableClientState(GL_VERTEX_ARRAY); - glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool); GLuint arrayBuffer, elementBuffer; glGenBuffers(1, &arrayBuffer); @@ -197,19 +200,19 @@ int main(int argc, char *argv[]) glNormalPointer(GL_BYTE, 32, (void*)12); glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28); - 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); - glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &temp); assert(temp == 3); - glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &temp); assert(temp == GL_FLOAT); - glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &temp); assert(temp == 32); - glGetIntegerv(GL_COLOR_ARRAY_SIZE, &temp); assert(temp == 4); - glGetIntegerv(GL_COLOR_ARRAY_TYPE, &temp); assert(temp == GL_UNSIGNED_BYTE); - glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &temp); assert(temp == 32); - 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); + glGetPointerv(GL_VERTEX_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)0); + glGetPointerv(GL_COLOR_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)28); + glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)16); + glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &tempInt); assert(tempInt == 3); + glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT); + glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetIntegerv(GL_COLOR_ARRAY_SIZE, &tempInt); assert(tempInt == 4); + glGetIntegerv(GL_COLOR_ARRAY_TYPE, &tempInt); assert(tempInt == GL_UNSIGNED_BYTE); + glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool); glBindTexture(GL_TEXTURE_2D, texture); // diffuse? glActiveTexture(GL_TEXTURE0); diff --git a/tests/cubegeom_glew.c b/tests/cubegeom_glew.c index a3d86a404f1e3..210e1c60896b0 100644 --- a/tests/cubegeom_glew.c +++ b/tests/cubegeom_glew.c @@ -21,7 +21,10 @@ REDISTRIBUTION OF THIS SOFTWARE. int main(int argc, char *argv[]) { - int temp; // testing + // testing + GLint tempInt; + GLboolean tempBool; + void *tempPtr; SDL_Surface *screen; if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) { @@ -100,9 +103,9 @@ int main(int argc, char *argv[]) glActiveTexture(GL_TEXTURE0); - glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(!temp); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(!tempBool); glEnableClientState(GL_VERTEX_ARRAY); - glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool); GLuint arrayBuffer, elementBuffer; glGenBuffers(1, &arrayBuffer); @@ -185,19 +188,19 @@ int main(int argc, char *argv[]) glNormalPointer(GL_BYTE, 32, (void*)12); glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28); - 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); - glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &temp); assert(temp == 3); - glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &temp); assert(temp == GL_FLOAT); - glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &temp); assert(temp == 32); - glGetIntegerv(GL_COLOR_ARRAY_SIZE, &temp); assert(temp == 4); - glGetIntegerv(GL_COLOR_ARRAY_TYPE, &temp); assert(temp == GL_UNSIGNED_BYTE); - glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &temp); assert(temp == 32); - 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); + glGetPointerv(GL_VERTEX_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)0); + glGetPointerv(GL_COLOR_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)28); + glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)16); + glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &tempInt); assert(tempInt == 3); + glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT); + glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetIntegerv(GL_COLOR_ARRAY_SIZE, &tempInt); assert(tempInt == 4); + glGetIntegerv(GL_COLOR_ARRAY_TYPE, &tempInt); assert(tempInt == GL_UNSIGNED_BYTE); + glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT); + glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32); + glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool); glBindTexture(GL_TEXTURE_2D, texture); // diffuse? glActiveTexture(GL_TEXTURE0);