X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=apps%2Fgl%2Ftri.c;h=c6c1849607b3ac6367541a58f5e414838335602f;hp=005c227e5e029bed60358ff5a1f96e6b03ee81a8;hb=68f16d73f902506982815195220215866640ccdb;hpb=1902daf4c77939649b15ad49cdecd475c33264c0 diff --git a/apps/gl/tri.c b/apps/gl/tri.c index 005c227..c6c1849 100644 --- a/apps/gl/tri.c +++ b/apps/gl/tri.c @@ -38,21 +38,12 @@ #endif -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - static GLboolean doubleBuffer = GL_TRUE; static int win; static void Init(void) { - fprintf(stdout, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - fprintf(stdout, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - fprintf(stdout, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - fflush(stdout); - - glClearColor(0.3, 0.1, 0.3, 0.0); + glClearColor(0.3, 0.1, 0.3, 1.0); } static void Reshape(int width, int height) @@ -84,25 +75,10 @@ static void Draw(void) if (doubleBuffer) { glutSwapBuffers(); } - + glutDestroyWindow(win); -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - fprintf(stderr, "%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; + exit(0); } int main(int argc, char **argv) @@ -111,12 +87,7 @@ int main(int argc, char **argv) glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); - glutInitWindowSize( 250, 250); + glutInitWindowSize(250, 250); type = GLUT_RGB | GLUT_ALPHA; type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;