aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-18 08:12:55 -0700
committerBrian Paul <[email protected]>2009-12-18 13:58:14 -0700
commit263f4322e7bfa03a6c025dbc2b280e7f60e2cab1 (patch)
tree25aeab0940d8440aa88893d90f7cce7ee6a5fa99
parentc8de081dc1f077a026a962244117ec69f0ba7055 (diff)
progs/demos: fix glut initialization calls
Remove glutInitWindowPosition() calls to play nicer with window managers. Move glutInitWindowSize() calls before glutInit() so the the default window size can be overridden by the -geometry cmd line option.
-rw-r--r--progs/demos/arbfplight.c3
-rw-r--r--progs/demos/arbfslight.c3
-rw-r--r--progs/demos/arbocclude.c3
-rw-r--r--progs/demos/bounce.c4
-rw-r--r--progs/demos/clearspd.c3
-rw-r--r--progs/demos/copypix.c7
-rw-r--r--progs/demos/cubemap.c3
-rw-r--r--progs/demos/drawpix.c7
-rw-r--r--progs/demos/engine.c2
-rw-r--r--progs/demos/fbo_firecube.c2
-rw-r--r--progs/demos/fire.c1
-rw-r--r--progs/demos/fogcoord.c2
-rw-r--r--progs/demos/fplight.c3
-rw-r--r--progs/demos/fslight.c3
-rw-r--r--progs/demos/gamma.c5
-rw-r--r--progs/demos/gearbox.c2
-rw-r--r--progs/demos/gears.c4
-rw-r--r--progs/demos/geartrain.c13
-rw-r--r--progs/demos/gloss.c2
-rw-r--r--progs/demos/gltestperf.c3
-rw-r--r--progs/demos/ipers.c1
-rw-r--r--progs/demos/isosurf.c3
-rw-r--r--progs/demos/lodbias.c3
-rw-r--r--progs/demos/morph3d.c3
-rw-r--r--progs/demos/multiarb.c3
-rw-r--r--progs/demos/paltex.c5
-rw-r--r--progs/demos/pointblast.c4
-rw-r--r--progs/demos/projtex.c9
-rw-r--r--progs/demos/ray.c1
-rw-r--r--progs/demos/readpix.c5
-rw-r--r--progs/demos/renormal.c5
-rw-r--r--progs/demos/shadowtex.c3
-rw-r--r--progs/demos/spectex.c6
-rw-r--r--progs/demos/spriteblast.c4
-rw-r--r--progs/demos/teapot.c1
-rw-r--r--progs/demos/terrain.c1
-rw-r--r--progs/demos/tessdemo.c3
-rw-r--r--progs/demos/texcyl.c4
-rw-r--r--progs/demos/texenv.c3
-rw-r--r--progs/demos/textures.c3
-rw-r--r--progs/demos/trispd.c7
-rw-r--r--progs/demos/tunnel.c1
-rw-r--r--progs/demos/tunnel2.c1
-rw-r--r--progs/demos/vao_demo.c3
-rw-r--r--progs/demos/winpos.c3
45 files changed, 54 insertions, 106 deletions
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 3cf311e7782..c54e3b8fb80 100644
--- a/progs/demos/engine.c
+++ b/progs/demos/engine.c
@@ -1308,8 +1308,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 dd70f6141db..3db45418fad 100644
--- a/progs/demos/fire.c
+++ b/progs/demos/fire.c
@@ -733,7 +733,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 8fe405e8076..d2a195f39a2 100644
--- a/progs/demos/geartrain.c
+++ b/progs/demos/geartrain.c
@@ -1049,19 +1049,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 2e9dff17261..56781f68189 100644
--- a/progs/demos/isosurf.c
+++ b/progs/demos/isosurf.c
@@ -1061,9 +1061,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 01a06aba0ff..0f8ac426f33 100644
--- a/progs/demos/morph3d.c
+++ b/progs/demos/morph3d.c
@@ -841,9 +841,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 bbb3a68effa..05f89bb53ea 100644
--- a/progs/demos/readpix.c
+++ b/progs/demos/readpix.c
@@ -382,12 +382,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 be78ea4950f..627c3bfb57a 100644
--- a/progs/demos/terrain.c
+++ b/progs/demos/terrain.c
@@ -623,7 +623,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 d94154a2008..773d7378b19 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) {