diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-10-21 18:33:53 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-10-21 18:33:53 +0000 |
commit | f28cbb6a7f3132ba7455b158bcb8269b51d74daa (patch) | |
tree | 5a5e53305493f8f8a889964a6a3eacb52383c8a9 /progs/fp | |
parent | 32a7ab2197fc6df066b87940cc36cc537e44319c (diff) |
simplify, remove sgi messages
Diffstat (limited to 'progs/fp')
38 files changed, 111 insertions, 1966 deletions
diff --git a/progs/fp/Makefile b/progs/fp/Makefile index d6e0ef8b19..8c287d6ac3 100644 --- a/progs/fp/Makefile +++ b/progs/fp/Makefile @@ -45,6 +45,10 @@ SOURCES = \ tri-tex.c \ tri-xpd.c \ tri-position.c \ + tri-depth.c \ + tri-depth2.c \ + tri-depthwrite.c \ + tri-depthwrite2.c \ NOTDONE=\ tri-txb.c \ diff --git a/progs/fp/tri-abs.c b/progs/fp/tri-abs.c index 3e7d734325..44aa2cfa3a 100644 --- a/progs/fp/tri-abs.c +++ b/progs/fp/tri-abs.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,19 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } } -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-add.c b/progs/fp/tri-add.c index ffe88065d9..b086126c86 100644 --- a/progs/fp/tri-add.c +++ b/progs/fp/tri-add.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-cmp.c b/progs/fp/tri-cmp.c index 2ef37d199e..968b67f3d9 100644 --- a/progs/fp/tri-cmp.c +++ b/progs/fp/tri-cmp.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-cos.c b/progs/fp/tri-cos.c index 620db8dfa9..7ea2453218 100644 --- a/progs/fp/tri-cos.c +++ b/progs/fp/tri-cos.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -109,44 +81,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-dp3.c b/progs/fp/tri-dp3.c index bc45ce242a..0e18de2dc4 100644 --- a/progs/fp/tri-dp3.c +++ b/progs/fp/tri-dp3.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-dp4.c b/progs/fp/tri-dp4.c index daf593727a..400bbf4da2 100644 --- a/progs/fp/tri-dp4.c +++ b/progs/fp/tri-dp4.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-dph.c b/progs/fp/tri-dph.c index 5b8bb1d849..958073c413 100644 --- a/progs/fp/tri-dph.c +++ b/progs/fp/tri-dph.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-dst.c b/progs/fp/tri-dst.c index ba40a2418e..3d85e85643 100644 --- a/progs/fp/tri-dst.c +++ b/progs/fp/tri-dst.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-ex2.c b/progs/fp/tri-ex2.c index 79e0c6de9d..f09b1d7846 100644 --- a/progs/fp/tri-ex2.c +++ b/progs/fp/tri-ex2.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-flat.c b/progs/fp/tri-flat.c index 12ac920519..ea8cc7f0eb 100644 --- a/progs/fp/tri-flat.c +++ b/progs/fp/tri-flat.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init(void) { @@ -84,33 +56,13 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } + /* Exit after first frame */ exit(0); } -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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) { @@ -118,14 +70,12 @@ int main(int argc, char **argv) glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-flr.c b/progs/fp/tri-flr.c index 9c702babc4..059f6b6754 100644 --- a/progs/fp/tri-flr.c +++ b/progs/fp/tri-flr.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-fp.c b/progs/fp/tri-fp.c index fd25fb5258..4148a8def3 100644 --- a/progs/fp/tri-fp.c +++ b/progs/fp/tri-fp.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-frc.c b/progs/fp/tri-frc.c index 80cad47017..8d60c9dc20 100644 --- a/progs/fp/tri-frc.c +++ b/progs/fp/tri-frc.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -107,44 +79,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-inv.c b/progs/fp/tri-inv.c index badea7842a..e902332386 100644 --- a/progs/fp/tri-inv.c +++ b/progs/fp/tri-inv.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-kil.c b/progs/fp/tri-kil.c index d3e1da8d26..47dbd04964 100644 --- a/progs/fp/tri-kil.c +++ b/progs/fp/tri-kil.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -107,44 +79,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-lg2.c b/progs/fp/tri-lg2.c index 5321cbd436..c7eec46974 100644 --- a/progs/fp/tri-lg2.c +++ b/progs/fp/tri-lg2.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-lit.c b/progs/fp/tri-lit.c index 91e3ce5521..21e3b6f216 100644 --- a/progs/fp/tri-lit.c +++ b/progs/fp/tri-lit.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -107,44 +79,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-lrp.c b/progs/fp/tri-lrp.c index 26926877e2..a5659eed60 100644 --- a/progs/fp/tri-lrp.c +++ b/progs/fp/tri-lrp.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-mad.c b/progs/fp/tri-mad.c index 4090aad472..b46d139fb3 100644 --- a/progs/fp/tri-mad.c +++ b/progs/fp/tri-mad.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-max.c b/progs/fp/tri-max.c index 2e35cd8f2c..481a067916 100644 --- a/progs/fp/tri-max.c +++ b/progs/fp/tri-max.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-min.c b/progs/fp/tri-min.c index d25ac36b24..7bb722f85f 100644 --- a/progs/fp/tri-min.c +++ b/progs/fp/tri-min.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-mov.c b/progs/fp/tri-mov.c index 0a32aee859..40b5b66f5c 100644 --- a/progs/fp/tri-mov.c +++ b/progs/fp/tri-mov.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,13 +6,6 @@ #include <GL/glut.h> #include "GL/gl.h" - -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; - static void Init( void ) { static const char *modulate2D = @@ -104,30 +74,8 @@ static void Draw(void) glEnd(); glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } } -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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) { @@ -135,14 +83,9 @@ int main(int argc, char **argv) glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type = GLUT_RGB | GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-mul.c b/progs/fp/tri-mul.c index 30ba871b8d..61dd3e0458 100644 --- a/progs/fp/tri-mul.c +++ b/progs/fp/tri-mul.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-position.c b/progs/fp/tri-position.c index 25ed89916b..18e8182a68 100644 --- a/progs/fp/tri-position.c +++ b/progs/fp/tri-position.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,17 +7,12 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { static const char *modulate2D = "!!ARBfp1.0\n" - "MOV result.color, fragment.position; \n" + "MUL result.color, fragment.position, {.005}.x; \n" "END" ; GLuint modulateProg; @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-pow.c b/progs/fp/tri-pow.c index 8ef57173af..ef91e43e99 100644 --- a/progs/fp/tri-pow.c +++ b/progs/fp/tri-pow.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-rcp.c b/progs/fp/tri-rcp.c index 1698f37f36..e2a2704934 100644 --- a/progs/fp/tri-rcp.c +++ b/progs/fp/tri-rcp.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-rsq.c b/progs/fp/tri-rsq.c index 39c75e8eb1..c5b2c1b32e 100644 --- a/progs/fp/tri-rsq.c +++ b/progs/fp/tri-rsq.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -106,44 +78,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-scs.c b/progs/fp/tri-scs.c index ba342744c3..ce7c0062c3 100644 --- a/progs/fp/tri-scs.c +++ b/progs/fp/tri-scs.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -107,44 +79,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-sge.c b/progs/fp/tri-sge.c index 7f1d2df489..6a360ca932 100644 --- a/progs/fp/tri-sge.c +++ b/progs/fp/tri-sge.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-sge2.c b/progs/fp/tri-sge2.c index ea1a415328..c4330098ed 100644 --- a/progs/fp/tri-sge2.c +++ b/progs/fp/tri-sge2.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -110,44 +82,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-sin.c b/progs/fp/tri-sin.c index f98bfdd25e..772903e4b2 100644 --- a/progs/fp/tri-sin.c +++ b/progs/fp/tri-sin.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -110,44 +82,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-slt.c b/progs/fp/tri-slt.c index fd25fb5258..4148a8def3 100644 --- a/progs/fp/tri-slt.c +++ b/progs/fp/tri-slt.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-sub.c b/progs/fp/tri-sub.c index c676c4fa6a..6faa414550 100644 --- a/progs/fp/tri-sub.c +++ b/progs/fp/tri-sub.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-swz.c b/progs/fp/tri-swz.c index 848387c972..5f34f7a322 100644 --- a/progs/fp/tri-swz.c +++ b/progs/fp/tri-swz.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-swz2.c b/progs/fp/tri-swz2.c index 0d6bcbca3f..fd76b58f53 100644 --- a/progs/fp/tri-swz2.c +++ b/progs/fp/tri-swz2.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -29,11 +6,6 @@ #include <GL/glut.h> -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,22 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-tex.c b/progs/fp/tri-tex.c index 12fdc3730a..87f63894ce 100644 --- a/progs/fp/tri-tex.c +++ b/progs/fp/tri-tex.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <assert.h> #include <stdio.h> @@ -35,7 +12,6 @@ #define TEXTURE_FILE "../images/girl.rgb" -GLenum doubleBuffer; static void Init( void ) { @@ -123,30 +99,8 @@ static void Draw(void) glEnd(); glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } } -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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) { @@ -154,14 +108,12 @@ int main(int argc, char **argv) glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } + glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { diff --git a/progs/fp/tri-xpd.c b/progs/fp/tri-xpd.c index 4c5cc33c12..9aca46b2fa 100644 --- a/progs/fp/tri-xpd.c +++ b/progs/fp/tri-xpd.c @@ -1,26 +1,3 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ #include <stdio.h> #include <string.h> @@ -30,11 +7,6 @@ #include "GL/gl.h" -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum doubleBuffer; static void Init( void ) { @@ -105,44 +77,21 @@ static void Draw(void) glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - 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; glutInit(&argc, argv); - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; + type |= GLUT_SINGLE; glutInitDisplayMode(type); if (glutCreateWindow("First Tri") == GL_FALSE) { |