diff options
author | Jakob Bornecrantz <[email protected]> | 2009-02-21 11:57:50 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-02-21 12:02:18 +0100 |
commit | b3bd315e572f55224393386dd2d171dc15600694 (patch) | |
tree | be8733e33697eb8c08d4dbbe9cd4598696e534f4 /progs/trivial | |
parent | 0be216c526c29726a73a26a37dcd5a00cfbefc86 (diff) |
trivial: Fix indentation in tri
Diffstat (limited to 'progs/trivial')
-rw-r--r-- | progs/trivial/tri.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c index 033d6ceae2b..d99d5872a90 100644 --- a/progs/trivial/tri.c +++ b/progs/trivial/tri.c @@ -41,28 +41,28 @@ static void Init(void) fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - glClearColor(0.3, 0.1, 0.3, 0.0); + glClearColor(0.3, 0.1, 0.3, 0.0); } static void Reshape(int width, int height) { - glViewport(0, 0, (GLint)width, (GLint)height); + glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); - glMatrixMode(GL_MODELVIEW); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); + glMatrixMode(GL_MODELVIEW); } static void Key(unsigned char key, int x, int y) { switch (key) { - case 27: - exit(0); - default: - glutPostRedisplay(); - return; + case 27: + exit(0); + default: + glutPostRedisplay(); + return; } } @@ -88,47 +88,47 @@ static void Draw(void) 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; + 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; } int main(int argc, char **argv) { - GLenum type; + GLenum type; - glutInit(&argc, argv); + glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + if (Args(argc, argv) == GL_FALSE) { + exit(1); + } - glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); - type = GLUT_RGB | GLUT_ALPHA; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); + type = GLUT_RGB | GLUT_ALPHA; + type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + glutInitDisplayMode(type); - win = glutCreateWindow(*argv); - if (!win) { - exit(1); - } + win = glutCreateWindow(*argv); + if (!win) { + exit(1); + } - Init(); + Init(); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; + glutReshapeFunc(Reshape); + glutKeyboardFunc(Key); + glutDisplayFunc(Draw); + glutMainLoop(); + return 0; } |