diff options
Diffstat (limited to 'progs/demos')
46 files changed, 107 insertions, 177 deletions
diff --git a/progs/demos/SConscript b/progs/demos/SConscript index f851870bcf3..742dd66f36f 100644 --- a/progs/demos/SConscript +++ b/progs/demos/SConscript @@ -1,84 +1,66 @@ Import('*') -if not env['GLUT']: - Return() - -env = env.Clone() - -env.Prepend(CPPPATH = [ - '../util', -]) - -env.Prepend(LIBS = [ - util, - '$GLUT_LIB' -]) - -if env['platform'] == 'windows': - env.Append(CPPDEFINES = ['NOMINMAX']) - env.Prepend(LIBS = ['winmm']) - progs = [ - 'arbfplight', - 'arbfslight', - 'arbocclude', - 'bounce', - 'clearspd', - 'copypix', - 'cubemap', - 'drawpix', - 'engine', - 'fbo_firecube', - 'fire', - 'fogcoord', - 'fplight', - 'fslight', - 'gamma', - 'gearbox', - 'gears', - 'geartrain', - 'glinfo', - 'gloss', - 'gltestperf', - 'ipers', - 'isosurf', - 'lodbias', - 'morph3d', - 'multiarb', - 'paltex', - 'pointblast', - 'ray', - 'readpix', - 'reflect', - 'renormal', - 'shadowtex', - 'singlebuffer', - 'spectex', - 'spriteblast', - 'stex3d', - 'teapot', - 'terrain', - 'tessdemo', - 'texcyl', - 'texenv', - 'textures', - 'trispd', - 'tunnel', - 'tunnel2', - 'vao_demo', - 'winpos', - 'dinoshade', - 'fbotexture', - 'projtex', + 'arbfplight', + 'arbfslight', + 'arbocclude', + 'bounce', + 'clearspd', + 'copypix', + 'cubemap', + 'drawpix', + 'engine', + 'fbo_firecube', + 'fire', + 'fogcoord', + 'fplight', + 'fslight', + 'gamma', + 'gearbox', + 'gears', + 'geartrain', + 'glinfo', + 'gloss', + 'gltestperf', + 'ipers', + 'isosurf', + 'lodbias', + 'morph3d', + 'multiarb', + 'paltex', + 'pointblast', + 'ray', + 'readpix', + 'reflect', + 'renormal', + 'shadowtex', + 'singlebuffer', + 'spectex', + 'spriteblast', + 'stex3d', + 'teapot', + 'terrain', + 'tessdemo', + 'texcyl', + 'texenv', + 'textures', + 'trispd', + 'tunnel', + 'tunnel2', + 'vao_demo', + 'winpos', + 'dinoshade', + 'fbotexture', + 'projtex', ] for prog in progs: - env.Program( + progs_env.Program( target = prog, source = prog + '.c', ) -env.Program( +progs_env.Program( target = 'rain', source = [ 'rain.cxx', diff --git a/progs/demos/arbfplight.c b/progs/demos/arbfplight.c index 7b7a12bf88d..861b3b72522 100644 --- a/progs/demos/arbfplight.c +++ b/progs/demos/arbfplight.c @@ -388,9 +388,8 @@ static void Init( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 200, 200 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); Win = glutCreateWindow(argv[0]); glutReshapeFunc( Reshape ); diff --git a/progs/demos/arbfslight.c b/progs/demos/arbfslight.c index 275c85105ed..a0ce7f3f5bc 100644 --- a/progs/demos/arbfslight.c +++ b/progs/demos/arbfslight.c @@ -311,9 +311,8 @@ static void Init (void) int main (int argc, char *argv[]) { - glutInit (&argc, argv); - glutInitWindowPosition ( 0, 0); glutInitWindowSize (200, 200); + glutInit (&argc, argv); glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutCreateWindow (argv[0]); glutReshapeFunc (Reshape); diff --git a/progs/demos/arbocclude.c b/progs/demos/arbocclude.c index 9188ad5a565..f669a1f26ba 100644 --- a/progs/demos/arbocclude.c +++ b/progs/demos/arbocclude.c @@ -268,9 +268,8 @@ static void Init( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 400, 400 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); Win = glutCreateWindow(argv[0]); glewInit(); diff --git a/progs/demos/bounce.c b/progs/demos/bounce.c index 436bc7d1fb8..a9a291e0a6f 100644 --- a/progs/demos/bounce.c +++ b/progs/demos/bounce.c @@ -192,10 +192,8 @@ visible(int vis) int main(int argc, char *argv[]) { - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(600, 450); - + glutInit(&argc, argv); IndexMode = argc > 1 && strcmp(argv[1], "-ci") == 0; if (IndexMode) diff --git a/progs/demos/clearspd.c b/progs/demos/clearspd.c index 42953f6675e..c40f118a64b 100644 --- a/progs/demos/clearspd.c +++ b/progs/demos/clearspd.c @@ -187,9 +187,8 @@ int main( int argc, char *argv[] ) Init( argc, argv ); - glutInit( &argc, argv ); glutInitWindowSize( (int) Width, (int) Height ); - glutInitWindowPosition( 0, 0 ); + glutInit( &argc, argv ); mode = ColorMode | GLUT_DOUBLE; if (BufferMask & GL_STENCIL_BUFFER_BIT) diff --git a/progs/demos/copypix.c b/progs/demos/copypix.c index a13339ea62f..98c835f44f8 100644 --- a/progs/demos/copypix.c +++ b/progs/demos/copypix.c @@ -237,6 +237,9 @@ int main( int argc, char *argv[] ) const char *filename = IMAGE_FILE; int i = 1; + glutInitWindowSize( WinWidth, WinHeight ); + glutInit( &argc, argv ); + if (argc > i && strcmp(argv[i], "-ci")==0) { ciMode = GL_TRUE; i++; @@ -245,10 +248,6 @@ int main( int argc, char *argv[] ) filename = argv[i]; } - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( WinWidth, WinHeight ); - if (ciMode) glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); else diff --git a/progs/demos/cubemap.c b/progs/demos/cubemap.c index 20332b1d960..3e79d6a5589 100644 --- a/progs/demos/cubemap.c +++ b/progs/demos/cubemap.c @@ -613,9 +613,8 @@ static void parse_args(int argc, char *argv[]) int main( int argc, char *argv[] ) { - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(600, 500); + glutInit(&argc, argv); glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); glutCreateWindow("Texture Cube Mapping"); glewInit(); diff --git a/progs/demos/drawpix.c b/progs/demos/drawpix.c index 5490bcc6355..9bc7086e04b 100644 --- a/progs/demos/drawpix.c +++ b/progs/demos/drawpix.c @@ -328,6 +328,9 @@ int main( int argc, char *argv[] ) const char *filename = IMAGE_FILE; int i = 1; + glutInitWindowSize( 500, 400 ); + glutInit( &argc, argv ); + if (argc > i && strcmp(argv[i], "-ci")==0) { ciMode = GL_TRUE; i++; @@ -336,10 +339,6 @@ int main( int argc, char *argv[] ) filename = argv[i]; } - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 500, 400 ); - if (ciMode) glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); else diff --git a/progs/demos/engine.c b/progs/demos/engine.c index 838d28c363c..7e485111da7 100644 --- a/progs/demos/engine.c +++ b/progs/demos/engine.c @@ -1320,8 +1320,8 @@ Init(void) int main(int argc, char *argv[]) { - glutInit(&argc, argv); glutInitWindowSize(WinWidth, WinHeight); + glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutCreateWindow("OpenGL Engine Demo"); glewInit(); diff --git a/progs/demos/fbo_firecube.c b/progs/demos/fbo_firecube.c index b3f7e00e5af..17767a148f9 100644 --- a/progs/demos/fbo_firecube.c +++ b/progs/demos/fbo_firecube.c @@ -1051,11 +1051,11 @@ visible(int vis) int main(int argc, char *argv[]) { + glutInitWindowSize(WinWidth, WinHeight); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - glutInitWindowSize(WinWidth, WinHeight); Win = glutCreateWindow("fbo_firecube"); glewInit(); init(argc, argv); diff --git a/progs/demos/fire.c b/progs/demos/fire.c index 475582c81ba..bb912fb4473 100644 --- a/progs/demos/fire.c +++ b/progs/demos/fire.c @@ -739,7 +739,6 @@ main(int ac, char **av) HEIGHT = atoi(av[3]); } - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTH, HEIGHT); glutInit(&ac, av); diff --git a/progs/demos/fogcoord.c b/progs/demos/fogcoord.c index 7d5c11aabf3..336aa580755 100644 --- a/progs/demos/fogcoord.c +++ b/progs/demos/fogcoord.c @@ -404,8 +404,8 @@ Init(void) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); glutInitWindowSize( 600, 600 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); glutCreateWindow(argv[0]); glewInit(); diff --git a/progs/demos/fplight.c b/progs/demos/fplight.c index c297354103f..f52a4f78686 100644 --- a/progs/demos/fplight.c +++ b/progs/demos/fplight.c @@ -268,9 +268,8 @@ static void Init( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 200, 200 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); Win = glutCreateWindow(argv[0]); glewInit(); diff --git a/progs/demos/fslight.c b/progs/demos/fslight.c index acba3e9583f..395b7caa2c1 100644 --- a/progs/demos/fslight.c +++ b/progs/demos/fslight.c @@ -600,9 +600,8 @@ ParseOptions(int argc, char *argv[]) int main(int argc, char *argv[]) { - glutInit(&argc, argv); - glutInitWindowPosition( 0, 0); glutInitWindowSize(200, 200); + glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); glutReshapeFunc(Reshape); diff --git a/progs/demos/gamma.c b/progs/demos/gamma.c index 9b2c3e1052b..61c6d125fbe 100644 --- a/progs/demos/gamma.c +++ b/progs/demos/gamma.c @@ -146,12 +146,9 @@ display(void) int main(int argc, char **argv) { + glutInitWindowSize(500, 400); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE); - - glutInitWindowPosition(50, 50); - glutInitWindowSize(500, 400); - glutCreateWindow("gamma test patterns"); glutReshapeFunc(Reshape); glutDisplayFunc(display); diff --git a/progs/demos/gearbox.c b/progs/demos/gearbox.c index 2dcf32f92ff..71d0281904b 100644 --- a/progs/demos/gearbox.c +++ b/progs/demos/gearbox.c @@ -474,10 +474,10 @@ visible(int vis) int main(int argc, char *argv[]) { + glutInitWindowSize(WinWidth, WinHeight); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - glutInitWindowSize(WinWidth, WinHeight); Win = glutCreateWindow("gearbox"); init(argc, argv); diff --git a/progs/demos/gears.c b/progs/demos/gears.c index 6016162d6f7..31a5b79eab9 100644 --- a/progs/demos/gears.c +++ b/progs/demos/gears.c @@ -385,11 +385,9 @@ visible(int vis) int main(int argc, char *argv[]) { + glutInitWindowSize(300, 300); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(300, 300); win = glutCreateWindow("Gears"); init(argc, argv); diff --git a/progs/demos/geartrain.c b/progs/demos/geartrain.c index e6567dd6470..00b6e78b724 100644 --- a/progs/demos/geartrain.c +++ b/progs/demos/geartrain.c @@ -1060,19 +1060,18 @@ main (int argc, char *argv[]) { char *file; - if (argc < 2) - file = "geartrain.dat"; - else - file = argv[1]; - - glutInit(&argc, argv); - glutInitWindowPosition (0, 0); glutInitWindowSize(640,480); + glutInit(&argc, argv); glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE) exit (1); + if (argc < 2) + file = "geartrain.dat"; + else + file = argv[1]; + getdata (file); process (); init (); diff --git a/progs/demos/gloss.c b/progs/demos/gloss.c index 69694b23a09..578736b4e27 100644 --- a/progs/demos/gloss.c +++ b/progs/demos/gloss.c @@ -436,8 +436,8 @@ static void Init( int argc, char *argv[] ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); glutInitWindowSize(WinWidth, WinHeight); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); glutCreateWindow(argv[0] ); glewInit(); diff --git a/progs/demos/gltestperf.c b/progs/demos/gltestperf.c index 2188b024192..3658a395988 100644 --- a/progs/demos/gltestperf.c +++ b/progs/demos/gltestperf.c @@ -569,10 +569,9 @@ main(int ac, char **av) if (ac == 2) frontbuffer = 0; + glutInitWindowSize(640, 480); glutInit(&ac, av); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowPosition(0, 0); - glutInitWindowSize(640, 480); glutCreateWindow("OpenGL/Mesa Performances"); glutDisplayFunc(display); glutMainLoop(); diff --git a/progs/demos/ipers.c b/progs/demos/ipers.c index ed03673cb62..265378b90a9 100644 --- a/progs/demos/ipers.c +++ b/progs/demos/ipers.c @@ -682,7 +682,6 @@ main(int ac, char **av) fprintf(stderr, "IperS V1.0\nWritten by David Bucciarelli ([email protected])\n"); - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTH, HEIGHT); glutInit(&ac, av); diff --git a/progs/demos/isosurf.c b/progs/demos/isosurf.c index d9e50a3c19d..a5b21ffb5c3 100644 --- a/progs/demos/isosurf.c +++ b/progs/demos/isosurf.c @@ -1062,9 +1062,8 @@ int main(int argc, char **argv) read_surface( "isosurf.dat" ); - glutInit( &argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(400, 400); + glutInit( &argc, argv); type = GLUT_DEPTH; type |= GLUT_RGB; diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index 8d39bd605a7..23488b1616e 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -282,9 +282,8 @@ static void Init( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 350, 350 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); win = glutCreateWindow(argv[0]); glutReshapeFunc( Reshape ); diff --git a/progs/demos/morph3d.c b/progs/demos/morph3d.c index eab520a9897..07458eb156f 100644 --- a/progs/demos/morph3d.c +++ b/progs/demos/morph3d.c @@ -840,9 +840,8 @@ int main(int argc, char **argv) object=1; - glutInit(&argc, argv); - glutInitWindowPosition(0,0); glutInitWindowSize(640,480); + glutInit(&argc, argv); glutInitDisplayMode( GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB ); diff --git a/progs/demos/multiarb.c b/progs/demos/multiarb.c index 3d89d3a13e9..82796a0c3f4 100644 --- a/progs/demos/multiarb.c +++ b/progs/demos/multiarb.c @@ -338,9 +338,8 @@ int main( int argc, char *argv[] ) { GLint i; - glutInit( &argc, argv ); glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); glutCreateWindow(argv[0] ); glewInit(); diff --git a/progs/demos/paltex.c b/progs/demos/paltex.c index d0cbcfb5e9a..5d4b8662b5c 100644 --- a/progs/demos/paltex.c +++ b/progs/demos/paltex.c @@ -248,12 +248,9 @@ static void Init2( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 400, 300 ); - + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); glewInit(); diff --git a/progs/demos/pointblast.c b/progs/demos/pointblast.c index 2d70b725894..b4d0a67f993 100644 --- a/progs/demos/pointblast.c +++ b/progs/demos/pointblast.c @@ -427,10 +427,10 @@ int main(int argc, char **argv) { int i; + + glutInitWindowSize(300, 300); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); - glutInitWindowPosition(0, 0); - glutInitWindowSize(300, 300); for (i=1; i<argc; i++) { if(!strcmp("-noms", argv[i])) { diff --git a/progs/demos/projtex.c b/progs/demos/projtex.c index 503cf5de088..d162568b9f0 100644 --- a/progs/demos/projtex.c +++ b/progs/demos/projtex.c @@ -998,18 +998,17 @@ menu(int selection) int main(int argc, char **argv) { + glutInitWindowSize(500,500); glutInit(&argc, argv); + glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE); + (void) glutCreateWindow("projtex"); + glewInit(); if (argc > 1) { NumTextures = atoi(argv[1]); } assert(NumTextures <= MAX_TEX); - glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE); - glutInitWindowSize(500,500); - (void) glutCreateWindow("projtex"); - glewInit(); - loadTexture = loadImageTextures; drawObject = drawCube; initialize(); diff --git a/progs/demos/ray.c b/progs/demos/ray.c index e9211aa3399..9cc464d2390 100644 --- a/progs/demos/ray.c +++ b/progs/demos/ray.c @@ -856,7 +856,6 @@ main(int ac, char **av) } */ - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTH, HEIGHT); glutInit(&ac, av); diff --git a/progs/demos/readpix.c b/progs/demos/readpix.c index 182b01d7ffc..cc4e4902694 100644 --- a/progs/demos/readpix.c +++ b/progs/demos/readpix.c @@ -383,12 +383,11 @@ int main( int argc, char *argv[] ) { GLboolean ciMode = GL_FALSE; + glutInitWindowSize( 750, 250 ); + glutInit( &argc, argv ); if (argc > 1 && strcmp(argv[1], "-ci")==0) { ciMode = GL_TRUE; } - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 750, 250 ); if (ciMode) glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); else diff --git a/progs/demos/renormal.c b/progs/demos/renormal.c index 9e5da95484c..61dd860ddbe 100644 --- a/progs/demos/renormal.c +++ b/progs/demos/renormal.c @@ -112,12 +112,9 @@ key(unsigned char k, int x, int y) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); glutInitWindowSize( 400, 400 ); - + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); Init(); diff --git a/progs/demos/shadowtex.c b/progs/demos/shadowtex.c index dc5a4bbc480..036f73d40b6 100644 --- a/progs/demos/shadowtex.c +++ b/progs/demos/shadowtex.c @@ -1022,9 +1022,8 @@ PrintHelp(void) int main(int argc, char *argv[]) { - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(WindowWidth, WindowHeight); + glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL); glutCreateWindow(argv[0]); glewInit(); diff --git a/progs/demos/spectex.c b/progs/demos/spectex.c index 6ab1191579c..c1dada9d634 100644 --- a/progs/demos/spectex.c +++ b/progs/demos/spectex.c @@ -239,13 +239,9 @@ static void ModeMenu(int entry) int main( int argc, char *argv[] ) { - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 300, 300 ); - + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow( "spectex" ); Init(); diff --git a/progs/demos/spriteblast.c b/progs/demos/spriteblast.c index d73b680b791..36e226e1d07 100644 --- a/progs/demos/spriteblast.c +++ b/progs/demos/spriteblast.c @@ -493,6 +493,8 @@ int main(int argc, char **argv) { int i; + + glutInitWindowSize(600,300); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); @@ -506,8 +508,6 @@ main(int argc, char **argv) linearFiltering = 0; } } - glutInitWindowPosition(0, 0); - glutInitWindowSize(600,300); glutCreateWindow("sprite blast"); glewInit(); glutReshapeFunc(reshape); diff --git a/progs/demos/teapot.c b/progs/demos/teapot.c index 6bf6e064095..04a675f36e6 100644 --- a/progs/demos/teapot.c +++ b/progs/demos/teapot.c @@ -638,7 +638,6 @@ int main(int ac, char **av) } */ - glutInitWindowPosition(0,0); glutInitWindowSize(WIDTH,HEIGHT); glutInit(&ac,av); diff --git a/progs/demos/terrain.c b/progs/demos/terrain.c index 9ba7b61a63f..a72c8d3caea 100644 --- a/progs/demos/terrain.c +++ b/progs/demos/terrain.c @@ -626,7 +626,6 @@ init(void) int main(int ac, char **av) { - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTH, HEIGHT); glutInit(&ac, av); diff --git a/progs/demos/tessdemo.c b/progs/demos/tessdemo.c index f71cea12744..8b988e36c13 100644 --- a/progs/demos/tessdemo.c +++ b/progs/demos/tessdemo.c @@ -503,10 +503,9 @@ int main( int argc, char **argv ) usage(); + glutInitWindowSize( 400, 400 ); glutInit( &argc, argv ); glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB ); - glutInitWindowPosition(0, 0); - glutInitWindowSize( 400, 400 ); glutCreateWindow( argv[0] ); /* GH: Bit of a hack... diff --git a/progs/demos/texcyl.c b/progs/demos/texcyl.c index 0e6089bced5..4df97ec4f50 100644 --- a/progs/demos/texcyl.c +++ b/progs/demos/texcyl.c @@ -261,10 +261,8 @@ static void Init( int argc, char *argv[] ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); glutInitWindowSize( 400, 400 ); - glutInitWindowPosition( 0, 0 ); - + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); Win = glutCreateWindow(argv[0] ); diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c index c5a8b13f35f..260ca8718f0 100644 --- a/progs/demos/texenv.c +++ b/progs/demos/texenv.c @@ -765,6 +765,7 @@ int main( int argc, char *argv[] ) GLboolean info = GL_FALSE; int i; + glutInitWindowSize( winWidth, winHeight ); glutInit( &argc, argv ); for ( i = 1 ; i < argc ; i++ ) { @@ -786,8 +787,6 @@ int main( int argc, char *argv[] ) glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE ); } - glutInitWindowSize( winWidth, winHeight ); - glutInitWindowPosition( 0, 0 ); Win = glutCreateWindow( "Texture Environment Test" ); initialize(); diff --git a/progs/demos/textures.c b/progs/demos/textures.c index 31e1bbb3db0..1415ef1c43c 100644 --- a/progs/demos/textures.c +++ b/progs/demos/textures.c @@ -356,9 +356,8 @@ Usage(void) int main(int argc, char *argv[]) { - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(700, 700); + glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); Win = glutCreateWindow(argv[0]); glutReshapeFunc(Reshape); diff --git a/progs/demos/trispd.c b/progs/demos/trispd.c index 165d088e3d3..c07c3409472 100644 --- a/progs/demos/trispd.c +++ b/progs/demos/trispd.c @@ -227,15 +227,12 @@ static void Help( const char *program ) int main( int argc, char *argv[] ) { - printf("For options: %s -help\n", argv[0]); - glutInit( &argc, argv ); glutInitWindowSize( (int) Width, (int) Height ); - glutInitWindowPosition( 0, 0 ); - + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow( argv[0] ); + printf("For options: %s -help\n", argv[0]); if (argc==2 && strcmp(argv[1],"-help")==0) { Help(argv[0]); return 0; diff --git a/progs/demos/tunnel.c b/progs/demos/tunnel.c index 6981da32988..efc007c79aa 100644 --- a/progs/demos/tunnel.c +++ b/progs/demos/tunnel.c @@ -491,7 +491,6 @@ main(int ac, char **av) fprintf(stderr, "Tunnel V1.5\nWritten by David Bucciarelli ([email protected])\n"); - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTH, HEIGHT); glutInit(&ac, av); diff --git a/progs/demos/tunnel2.c b/progs/demos/tunnel2.c index 0288ea0f8ce..f15da95b18b 100644 --- a/progs/demos/tunnel2.c +++ b/progs/demos/tunnel2.c @@ -559,7 +559,6 @@ main(int ac, char **av) fprintf(stderr, "Tunnel2 V1.0\nWritten by David Bucciarelli ([email protected])\n"); - glutInitWindowPosition(0, 0); glutInitWindowSize(WIDTHC0, HEIGHTC0); glutInit(&ac, av); diff --git a/progs/demos/vao_demo.c b/progs/demos/vao_demo.c index 206e06fc6c7..5ce07ecc63b 100644 --- a/progs/demos/vao_demo.c +++ b/progs/demos/vao_demo.c @@ -317,9 +317,8 @@ static void Init( void ) int main( int argc, char *argv[] ) { - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); glutInitWindowSize( Width, Height ); + glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); Win = glutCreateWindow( "GL_APPLE_vertex_array_object demo" ); glutReshapeFunc( Reshape ); diff --git a/progs/demos/winpos.c b/progs/demos/winpos.c index 13a9c7e9a8f..f935f9bee0f 100644 --- a/progs/demos/winpos.c +++ b/progs/demos/winpos.c @@ -96,9 +96,8 @@ static void init( void ) int main( int argc, char *argv[] ) { - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); glutInitWindowSize(500, 500); + glutInit(&argc, argv); glutInitDisplayMode( GLUT_RGB ); if (glutCreateWindow("winpos") <= 0) { |