diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-16 10:42:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-16 10:42:08 -0700 |
commit | 86fe72e8bfdcf5e6518c7e615ce599d1c6c491dd (patch) | |
tree | 53e56b4bb071578fbe409e3e21383dbb8a4df3f6 /tests | |
parent | 9ca5fc4f2af23e78e8f44e89b5024588d0f57cf8 (diff) | |
parent | c2ace4f8473ca8851be15d1f49f3f8bc2bb76ce5 (diff) |
Merge branch 'antialiasing' of github.com:wsmind/emscripten into incoming
Conflicts:
AUTHORS
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cubegeom.c | 35 | ||||
-rw-r--r-- | tests/cubegeom_glew.c | 35 |
2 files changed, 38 insertions, 32 deletions
diff --git a/tests/cubegeom.c b/tests/cubegeom.c index 949a1f9a..fac0da2b 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 a3d86a40..210e1c60 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); |