Fixed a few warnings in cubegeom tests
This commit is contained in:
Родитель
b89aaf0419
Коммит
250b58cb09
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче